186 lines
4.2 KiB
TOML
186 lines
4.2 KiB
TOML
# Sample shepherdd configuration
|
|
# This file defines the policy for what applications can run and when
|
|
|
|
config_version = 1
|
|
|
|
[daemon]
|
|
# Uncomment to customize paths
|
|
# socket_path = "/run/shepherdd/shepherdd.sock"
|
|
# log_dir = "/var/log/shepherdd"
|
|
# data_dir = "/var/lib/shepherdd"
|
|
|
|
# Default max run duration if not specified per entry (1 hour)
|
|
# Set to 0 for unlimited (no time limit)
|
|
default_max_run_seconds = 3600
|
|
|
|
# Global volume restrictions (optional)
|
|
# These apply when no entry-specific restrictions are defined
|
|
[daemon.volume]
|
|
max_volume = 80 # Maximum volume percentage (0-100)
|
|
# min_volume = 20 # Minimum volume percentage (0-100)
|
|
allow_mute = true # Whether mute toggle is allowed
|
|
allow_change = true # Whether volume changes are allowed at all
|
|
|
|
# Default warning thresholds
|
|
[[daemon.default_warnings]]
|
|
seconds_before = 300
|
|
severity = "info"
|
|
message = "5 minutes remaining"
|
|
|
|
[[daemon.default_warnings]]
|
|
seconds_before = 60
|
|
severity = "warn"
|
|
message = "1 minute remaining!"
|
|
|
|
[[daemon.default_warnings]]
|
|
seconds_before = 10
|
|
severity = "critical"
|
|
message = "10 seconds remaining!"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Entries
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Example: ScummVM - classic adventure games
|
|
[[entries]]
|
|
id = "scummvm"
|
|
label = "ScummVM"
|
|
icon = "scummvm"
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "scummvm"
|
|
args = ["-f"]
|
|
|
|
[entries.availability]
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
[entries.limits]
|
|
# Set max_run_seconds or daily_quota_seconds to 0 for unlimited
|
|
max_run_seconds = 3600 # 1 hour max (0 = unlimited)
|
|
daily_quota_seconds = 7200 # 2 hours per day (0 = unlimited)
|
|
cooldown_seconds = 300 # 5 minute cooldown after each session
|
|
|
|
# Example: Minecraft (via snap mc-installer)
|
|
# Uses the special "snap" entry type for proper process management
|
|
[[entries]]
|
|
id = "minecraft"
|
|
label = "Minecraft"
|
|
icon = "minecraft"
|
|
|
|
[entries.kind]
|
|
type = "snap"
|
|
snap_name = "mc-installer"
|
|
# command = "mc-installer" # Optional: defaults to snap_name
|
|
|
|
[entries.availability]
|
|
always = true # No time restrictions
|
|
|
|
[entries.limits]
|
|
max_run_seconds = 1800 # 30 minutes (roughly 3 in-game days)
|
|
daily_quota_seconds = 3600 # 1 hour per day
|
|
cooldown_seconds = 600 # 10 minute cooldown
|
|
|
|
[[entries.warnings]]
|
|
seconds_before = 600
|
|
severity = "info"
|
|
message = "10 minutes left - start wrapping up!"
|
|
|
|
[[entries.warnings]]
|
|
seconds_before = 120
|
|
severity = "warn"
|
|
message = "2 minutes remaining - save your game!"
|
|
|
|
[[entries.warnings]]
|
|
seconds_before = 30
|
|
severity = "critical"
|
|
message = "30 seconds! Save NOW!"
|
|
|
|
# Entry-specific volume restrictions (overrides global)
|
|
[entries.volume]
|
|
max_volume = 60 # Limit volume during gaming sessions
|
|
|
|
# Example: Educational games
|
|
[[entries]]
|
|
id = "tuxmath"
|
|
label = "Tux Math"
|
|
icon = "tuxmath"
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "tuxmath"
|
|
|
|
[entries.availability]
|
|
always = true
|
|
|
|
[[entries]]
|
|
id = "gcompris"
|
|
label = "GCompris"
|
|
icon = "gcompris"
|
|
|
|
[entries.kind]
|
|
type = "snap"
|
|
snap_name = "gcompris"
|
|
|
|
[entries.availability]
|
|
always = true
|
|
|
|
[entries.limits]
|
|
max_run_seconds = 0 # Unlimited: sleep/study aid
|
|
daily_quota_seconds = 0 # Unlimited
|
|
cooldown_seconds = 0 # No cooldown
|
|
|
|
# Example: Steam game
|
|
[[entries]]
|
|
id = "steam-human-resource-machine"
|
|
label = "Human Resource Machine"
|
|
icon = "steam"
|
|
|
|
[entries.kind]
|
|
type = "snap"
|
|
snap_name = "steam"
|
|
args = ["steam://rungameid/375820"] # Steam App ID (passed to 'snap run steam')
|
|
|
|
[entries.availability]
|
|
always = true
|
|
|
|
# No [entries.limits] section - uses daemon defaults
|
|
# Omitting limits entirely uses default_max_run_seconds
|
|
|
|
# Example: YouTube video via mpv
|
|
[[entries]]
|
|
id = "lofi-beats"
|
|
label = "Lofi Beats"
|
|
icon = "mpv"
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "mpv"
|
|
args = ["https://www.youtube.com/watch?v=jfKfPfyJRdk"]
|
|
|
|
[entries.availability]
|
|
always = true
|
|
|
|
[entries.limits]
|
|
max_run_seconds = 0 # Unlimited: sleep/study aid
|
|
daily_quota_seconds = 0 # Unlimited
|
|
cooldown_seconds = 0 # No cooldown
|
|
|
|
# Example: Disabled entry
|
|
[[entries]]
|
|
id = "disabled-game"
|
|
label = "Game Under Maintenance"
|
|
disabled = true
|
|
disabled_reason = "This game is being updated"
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "/bin/false"
|