aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-08-20 14:31:34 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-08-20 14:43:50 +0300
commite81f356908fe38ec45c74cf822dd102efbcf6457 (patch)
tree5c5263b210a0755f48b1511cc1ff8c2697e095a6 /resources
parent1013147ba3154788cb16ffc32b8155fd2008dfa3 (diff)
downloadniri-e81f356908fe38ec45c74cf822dd102efbcf6457.tar.gz
niri-e81f356908fe38ec45c74cf822dd102efbcf6457.tar.bz2
niri-e81f356908fe38ec45c74cf822dd102efbcf6457.zip
Add spawn-sh, spawn-at-startup-sh
Our top 10 most confusing config moments
Diffstat (limited to 'resources')
-rw-r--r--resources/default-config.kdl9
1 files changed, 6 insertions, 3 deletions
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.