2.home-manager/modules/services
Patrick Steinhardt 281e9398cc swayidle: improve confusing "events" configuration
With swayidle one can configure two different kinds of hooks:

  - Idle timeouts are executed after the session has been idle for a
    specific amount of time.

  - Events are executed when systemd notifies us that for example the
    user session is locked or that the device is about to suspend.

While not obvious, there is a significant difference between how these
two kinds are configured: there can be several timeouts with separate
commands to be executed, but each event can only be specified once. If
an event is specified multiple times, then the last command wins.

This can be very easy to miss in swayidle's documentation. Furthermore,
because the config is a list of `{ event = "..."; command = "..."; }`
attrset, we double down on this confusion and make it seem like having
multiple handlers for an event was actually supported.

Fix this by converting from a list of "event" submodules to an attrset
where the key is the event name and the value is the command to be
executed. This makes it impossible to specify multiple commands for a
single event by accident.

If a user _does_ want to have multiple commands executed on any event
they can for example use `pkgs.writeShellScript` and manually chain the
commands in that script.
2025-12-02 22:24:56 -06:00
..
imapnotify
macos-remap-keys
podman-linux
redshift-gammastep
window-managers
activitywatch.nix
amberol.nix
arrpc.nix
autorandr.nix
autotiling.nix
avizo.nix
batsignal.nix
betterlockscreen.nix
blanket.nix
blueman-applet.nix
borgmatic.nix
cachix-agent.nix
caffeine.nix
cbatticon.nix
clipcat.nix
cliphist.nix
clipman.nix
clipmenu.nix
clipse.nix
comodoro.nix
conky.nix
copyq.nix
darkman.nix
davmail.nix
devilspie2.nix
dropbox.nix
dunst.nix
dwm-status.nix
easyeffects.nix
emacs.nix
espanso.nix
etesync-dav.nix
flameshot.nix
fluidsynth.nix
fnott.nix
fusuma.nix
getmail.nix
git-sync.nix
glance.nix
gnome-keyring.nix
gpg-agent.nix
grobi.nix
gromit-mpx.nix
home-manager-auto-expire.nix
home-manager-auto-upgrade.nix
hound.nix
hypridle.nix
hyprpaper.nix
hyprpolkitagent.nix
hyprshell.nix
hyprsunset.nix
jankyborders.nix
jellyfin-mpv-shim.nix
kanshi.nix
kbfs.nix
kdeconnect.nix
keybase.nix
keynav.nix
librespot.nix
lieer.nix
linux-wallpaperengine.nix
listenbrainz-mpd.nix
local-ai.nix
lorri.nix
ludusavi.nix
lxqt-policykit-agent.nix
mako.nix
mbsync.nix
megasync.nix
mopidy.nix
mpd-discord-rpc.nix
mpd-mpris.nix
mpd.nix
mpdris2.nix
mpdscribble.nix
mpris-proxy.nix
muchsync.nix
network-manager-applet.nix
nextcloud-client.nix
nix-gc.nix
notify-osd.nix
ollama.nix
opensnitch-ui.nix
osmscout-server.nix
owncloud-client.nix
pantalaimon.nix
parcellite.nix
pass-secret-service.nix
pasystray.nix
pbgopy.nix
picom.nix
pimsync.nix
pizauth.nix
plan9port.nix
playerctld.nix
plex-mpv-shim.nix
polkit-gnome.nix
polybar.nix
poweralertd.nix
protonmail-bridge.nix
psd.nix
pueue.nix
pulseeffects.nix
radicle.nix
random-background.nix
recoll.nix
remmina.nix
rescrobbled.nix
restic.nix
rsibreak.nix
safeeyes.nix
screen-locker.nix
sctd.nix
shikane.nix
shpool.nix
signaturepdf.nix
skhd.nix
snixembed.nix
spotifyd.nix
ssh-agent.nix
ssh-tpm-agent.nix
stalonetray.nix
status-notifier-watcher.nix
swayidle.nix swayidle: improve confusing "events" configuration 2025-12-02 22:24:56 -06:00
swaync.nix
swayosd.nix
swww.nix
sxhkd.nix
syncthing.nix
systembus-notify.nix
taffybar.nix
tahoe-lafs.nix
tailscale-systray.nix
taskwarrior-sync.nix
tldr-update.nix
tomat.nix
trayer.nix
trayscale.nix
twmn.nix
udiskie.nix
unclutter.nix
unison.nix
vdirsyncer.nix
volnoti.nix
walker.nix
way-displays.nix
wayvnc.nix
wl-clip-persist.nix
wlsunset.nix
wluma.nix
wob.nix
wpaperd.nix
xcape.nix
xembed-sni-proxy.nix
xidlehook.nix
xscreensaver.nix
xsettingsd.nix
xsuspender.nix
yubikey-agent.nix