This implementation allows each platform to choose how to launch Steam (on Linux, we use the snap as the examples suggested before), and keeps Steam alive after an activity exits so that save sync, game updates, etc. can continue to run. Change written by Codex 5.2 on medium: Consider this GitHub issue https://github.com/aarmea/shepherd-launcher/issues/4. On Linux, an activity that uses the "steam" type should launch Steam via the snap as shown in the example configuration in this repository. Go ahead and implement the feature. I'm expecting one of the tricky bits to be killing the activity while keeping Steam alive, as we can no longer just kill the Steam snap cgroup.
352 lines
9.3 KiB
TOML
352 lines
9.3 KiB
TOML
# Sample shepherdd configuration
|
|
# This file defines the policy for what applications can run and when
|
|
|
|
config_version = 1
|
|
|
|
[service]
|
|
# Uncomment to customize paths (defaults use XDG directories for user-writable access)
|
|
# socket_path defaults to $XDG_RUNTIME_DIR/shepherdd/shepherdd.sock
|
|
# log_dir defaults to $XDG_STATE_HOME/shepherdd or ~/.local/state/shepherdd
|
|
# data_dir defaults to $XDG_DATA_HOME/shepherdd or ~/.local/share/shepherdd
|
|
# socket_path = "/run/user/1000/shepherdd/shepherdd.sock"
|
|
# log_dir = "~/.local/state/shepherdd"
|
|
# data_dir = "~/.local/share/shepherdd"
|
|
|
|
# Capture stdout/stderr from child applications to log files
|
|
# Logs are written to child_log_dir (or log_dir/sessions if not set)
|
|
# File format: <entry_id>_<timestamp>.log
|
|
# capture_child_output = true
|
|
# child_log_dir = "~/.local/state/shepherdd/sessions"
|
|
|
|
# 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
|
|
[service.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
|
|
[[service.default_warnings]]
|
|
seconds_before = 300
|
|
severity = "info"
|
|
message = "5 minutes remaining"
|
|
|
|
[[service.default_warnings]]
|
|
seconds_before = 60
|
|
severity = "warn"
|
|
message = "1 minute remaining!"
|
|
|
|
[[service.default_warnings]]
|
|
seconds_before = 10
|
|
severity = "critical"
|
|
message = "10 seconds remaining!"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Entries
|
|
# -----------------------------------------------------------------------------
|
|
|
|
## === Native Linux executables ===
|
|
|
|
# Tux Math - math games
|
|
# Ubuntu: sudo apt install tuxmath
|
|
[[entries]]
|
|
id = "tuxmath"
|
|
label = "Tux Math"
|
|
icon = "tuxmath" # Icon name from system icon theme
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "tuxmath"
|
|
|
|
[entries.availability]
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
# Putt Putt Joins the Circus via ScummVM
|
|
# This requires ScummVM to be installed (Ubuntu: `sudo apt install scummvm`).
|
|
# You must install the game files from your copy of the game into ScummVM first.
|
|
# See https://docs.scummvm.org/en/v2.9.1/use_scummvm/game_files.html for how to do this.
|
|
# If you do not have the game files, you can purchase and run via Steam instead (see below).
|
|
# https://store.steampowered.com/app/294690/PuttPutt_Joins_the_Circus/
|
|
[[entries]]
|
|
id = "scummvm-putt-putt"
|
|
label = "Putt Putt Joins the Circus"
|
|
icon = "~/Games/Icons/Putt_Putt_Circus.png" # Custom icon path
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "scummvm"
|
|
args = ["puttcircus-win-us"] # ScummVM game ID for Putt Putt Joins the Circus
|
|
|
|
[entries.availability]
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
# Secret of Monkey Island via ScummVM
|
|
# Like above, but with the following caveats:
|
|
# * I have only tested this with the original CD-ROM version of the game.
|
|
# * The GOG version available for purchase at https://www.gog.com/en/game/the_secret_of_monkey_island_special_edition uses a different engine.
|
|
# * It does *not* contain ScummVM-compatible data files, so this entry will not work with that version.
|
|
# * It may be possible to extract compatible files from the GOG installer or run it via WINE, but that is outside the scope of this example.
|
|
# * See https://www.gratissaugen.de/ultimatetalkies/ for how to do this.
|
|
[[entries]]
|
|
id = "scummvm-monkey-island"
|
|
label = "Secret of Monkey Island"
|
|
icon = "~/Games/Icons/Secret_of_Monkey_Island.png" # Custom icon path
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "scummvm"
|
|
args = ["monkey"] # ScummVM game ID for Secret of Monkey Island
|
|
|
|
[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
|
|
|
|
## === Snap-based applications ===
|
|
# Snap entries use the "snap" type for proper process management.
|
|
|
|
# GCompris - educational games suite
|
|
# Ubuntu: sudo snap install gcompris
|
|
[[entries]]
|
|
id = "gcompris"
|
|
label = "GCompris"
|
|
icon = "~/Games/Icons/GCompris.png" # Custom icon path
|
|
|
|
[entries.kind]
|
|
type = "snap"
|
|
snap_name = "gcompris"
|
|
|
|
[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]
|
|
max_run_seconds = 0 # Unlimited
|
|
daily_quota_seconds = 0 # Unlimited
|
|
cooldown_seconds = 0 # No cooldown
|
|
|
|
## === Steam games ===
|
|
# Steam can be used via Canonical's Steam snap package:
|
|
# https://snapcraft.io/steam
|
|
# Install it with: sudo snap install steam
|
|
# Steam must be set up and logged in before using these entries.
|
|
# You must have the games installed in your Steam library.
|
|
|
|
# Celeste via Steam
|
|
# https://store.steampowered.com/app/504230/Celeste
|
|
[[entries]]
|
|
id = "steam-celeste"
|
|
label = "Celeste"
|
|
icon = "~/Games/Icons/Celeste.png"
|
|
|
|
[entries.kind]
|
|
type = "steam"
|
|
app_id = 504230 # Steam App ID
|
|
|
|
[entries.availability]
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
# No [entries.limits] section - uses service defaults
|
|
# Omitting limits entirely uses default_max_run_seconds
|
|
|
|
# A Short Hike via Steam
|
|
# https://store.steampowered.com/app/1055540/A_Short_Hike/
|
|
[[entries]]
|
|
id = "steam-a-short-hike"
|
|
label = "A Short Hike"
|
|
icon = "~/Games/Icons/A_Short_Hike.png"
|
|
|
|
[entries.kind]
|
|
type = "steam"
|
|
app_id = 1055540 # Steam App ID
|
|
|
|
[entries.availability]
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
## === Flatpak-based applications ===
|
|
# Flatpak entries use the "flatpak" type for proper process management.
|
|
# Similar to Snap, Flatpak apps run in sandboxed environments and use
|
|
# systemd scopes for process management.
|
|
|
|
# Prism Launcher - Minecraft launcher (Flatpak)
|
|
# Install: flatpak install flathub org.prismlauncher.PrismLauncher
|
|
[[entries]]
|
|
id = "prism-launcher"
|
|
label = "Prism Launcher"
|
|
icon = "org.prismlauncher.PrismLauncher"
|
|
|
|
[entries.kind]
|
|
type = "flatpak"
|
|
app_id = "org.prismlauncher.PrismLauncher"
|
|
|
|
[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]
|
|
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
|
|
|
|
# Krita - digital painting (Flatpak)
|
|
# Install: flatpak install flathub org.kde.krita
|
|
[[entries]]
|
|
id = "krita"
|
|
label = "Krita"
|
|
icon = "org.kde.krita"
|
|
|
|
[entries.kind]
|
|
type = "flatpak"
|
|
app_id = "org.kde.krita"
|
|
|
|
[entries.availability]
|
|
always = true
|
|
|
|
[entries.limits]
|
|
max_run_seconds = 0 # Unlimited
|
|
daily_quota_seconds = 0 # Unlimited
|
|
cooldown_seconds = 0 # No cooldown
|
|
|
|
## === Media ===
|
|
# Just use `mpv` to play media (for now).
|
|
# Files can be local on your system or URLs (YouTube, etc).
|
|
|
|
# "Big Buck Bunny" saved on local disk
|
|
# Available for free as CC BY 3.0 at https://peach.blender.org/download/
|
|
[[entries]]
|
|
id = "big-buck-bunny"
|
|
label = "Big Buck Bunny"
|
|
icon = "mpv"
|
|
|
|
[entries.kind]
|
|
type = "process" # TODO: change to "media" type once supported
|
|
command = "mpv"
|
|
args = ["~/Videos/big_buck_bunny_720p_h264.mov"] # Local file path
|
|
|
|
[entries.availability]
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekdays"
|
|
start = "15:00"
|
|
end = "18:00"
|
|
|
|
[[entries.availability.windows]]
|
|
days = "weekends"
|
|
start = "10:00"
|
|
end = "20:00"
|
|
|
|
# "lofi hip hop radio 📚 beats to relax/study to" streamed live from YouTube
|
|
[[entries]]
|
|
id = "lofi-beats"
|
|
label = "Lofi Beats"
|
|
icon = "mpv"
|
|
|
|
[entries.kind]
|
|
type = "process" # TODO: change to "media" type once supported
|
|
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
|
|
|
|
# Terminal for debugging only
|
|
[[entries]]
|
|
id = "terminal"
|
|
label = "Terminal"
|
|
icon = "utilities-terminal"
|
|
disabled = true # Typically disabled, since it's:
|
|
disabled_reason = "For debugging only"
|
|
|
|
[entries.kind]
|
|
type = "process"
|
|
command = "ptyxis"
|
|
|
|
[entries.availability]
|
|
always = true
|