From e81f356908fe38ec45c74cf822dd102efbcf6457 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 20 Aug 2025 14:31:34 +0300 Subject: Add spawn-sh, spawn-at-startup-sh Our top 10 most confusing config moments --- resources/default-config.kdl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'resources') diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 9d45242e..55949bc4 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -270,6 +270,9 @@ layout { // This line starts waybar, a commonly used bar for Wayland compositors. spawn-at-startup "waybar" +// To run a shell command (with variables, pipes, etc.), use spawn-at-startup-sh: +// spawn-at-startup-sh "qs -c ~/source/qs/MyAwesomeShell" + hotkey-overlay { // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. // skip-at-startup @@ -363,10 +366,10 @@ binds { Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } - // You can also use a shell. Do this if you need pipes, multiple commands, etc. - // Note: the entire command goes as a single argument in the end. + // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. + // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. // For example, this is a standard bind to toggle the screen reader (orca). - Super+Alt+S hotkey-overlay-title=null { spawn "sh" "-c" "pkill orca || exec orca"; } + Super+Alt+S hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } // Example volume keys mappings for PipeWire & WirePlumber. // The allow-when-locked=true property makes them work even when the session is locked. -- cgit