swaymode-exec

Crates.ioswaymode-exec
lib.rsswaymode-exec
version1.0.1
created_at2024-08-30 18:43:16.00076+00
updated_at2025-05-29 08:51:32.577198+00
descriptionrun commands when sway changes keybind mode
homepage
repository
max_upload_size
id1358047
size11,754
(jlo62)

documentation

README

swaymode-exec

Hi, this is a daemon for sway that runs commands on kekybind mode changes.
I like to use it to set screen timeouts or for custom keybinds for eww.

Configuring

# This should go into $HOME/${XDG_CONFIG_HOME:-.config}/swaymode-exec.toml
# All commands are run by sh; so if you need to run multiple commands use '&'

[mode-name-to-trigger-on]
start = "command-to-run-when-mode-is-activated"
end = "command-to-run-when-mode-is-deactivated"
kill_start = "command-to-run-when-mode-is-activated-and-to-kill-when-mode-is-deactivated"

ToDo:

  • specify custom config file
  • run commands via swayipc
  • warn if sway does not know the mode specified in the config file
  • handle shell commands that fail
Commit count: 0

cargo fmt