From 10ecaafd798c5e3b95659d04597ac91ecf06aaaf Mon Sep 17 00:00:00 2001 From: cwegener Date: Sun, 21 Apr 2024 19:53:04 +1000 Subject: [PATCH] chore: layer shell programs need privileged (#172) * chore: layer shell programs need privileged see 6efb6b8 * fix: correct use of privileged exec in config * fix: correct use of privileged exec in config --------- Co-authored-by: mahkoh --- docs/config.md | 2 +- toml-config/src/default-config.toml | 2 +- toml-spec/spec/spec.generated.json | 2 +- toml-spec/spec/spec.generated.md | 4 ++-- toml-spec/spec/spec.yaml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/config.md b/docs/config.md index 266bc349..c2f21096 100644 --- a/docs/config.md +++ b/docs/config.md @@ -79,7 +79,7 @@ alt-shift-f = "toggle-floating" # For example, the exec action spawns an application and has the exec field # that describes how to spawn the application. Super_L = { type = "exec", exec = "alacritty" } -alt-p = { type = "exec", exec = "bemenu-run" } +alt-p = { type = "exec", exec = { prog = "bemenu-run", privileged = true } } # The quit action terminates the compositor. alt-q = "quit" diff --git a/toml-config/src/default-config.toml b/toml-config/src/default-config.toml index 2507bf36..496264d5 100644 --- a/toml-config/src/default-config.toml +++ b/toml-config/src/default-config.toml @@ -31,7 +31,7 @@ alt-f = "focus-parent" alt-shift-c = "close" alt-shift-f = "toggle-floating" Super_L = { type = "exec", exec = "alacritty" } -alt-p = { type = "exec", exec = "bemenu-run" } +alt-p = { type = "exec", exec = { prog = "bemenu-run", privileged = true } } alt-q = "quit" alt-shift-r = "reload-config-toml" diff --git a/toml-spec/spec/spec.generated.json b/toml-spec/spec/spec.generated.json index ebf1ba64..2f194626 100644 --- a/toml-spec/spec/spec.generated.json +++ b/toml-spec/spec/spec.generated.json @@ -447,7 +447,7 @@ "required": [] }, "Config": { - "description": "This is the top-level table.\n\n- Example:\n\n ```toml\n keymap = \"\"\"\n xkb_keymap {\n xkb_keycodes { include \"evdev+aliases(qwerty)\" };\n xkb_types { include \"complete\" };\n xkb_compat { include \"complete\" };\n xkb_symbols { include \"pc+us+inet(evdev)\" };\n };\n \"\"\"\n\n on-graphics-initialized = { type = \"exec\", exec = \"mako\" }\n\n [shortcuts]\n alt-h = \"focus-left\"\n alt-j = \"focus-down\"\n alt-k = \"focus-up\"\n alt-l = \"focus-right\"\n\n alt-shift-h = \"move-left\"\n alt-shift-j = \"move-down\"\n alt-shift-k = \"move-up\"\n alt-shift-l = \"move-right\"\n\n alt-d = \"split-horizontal\"\n alt-v = \"split-vertical\"\n\n alt-t = \"toggle-split\"\n alt-m = \"toggle-mono\"\n alt-u = \"toggle-fullscreen\"\n\n alt-f = \"focus-parent\"\n alt-shift-c = \"close\"\n alt-shift-f = \"toggle-floating\"\n Super_L = { type = \"exec\", exec = \"alacritty\" }\n alt-p = { type = \"exec\", exec = \"bemenu-run\" }\n alt-q = \"quit\"\n alt-shift-r = \"reload-config-toml\"\n\n ctrl-alt-F1 = { type = \"switch-to-vt\", num = 1 }\n ctrl-alt-F2 = { type = \"switch-to-vt\", num = 2 }\n # ...\n\n alt-F1 = { type = \"show-workspace\", name = \"1\" }\n alt-F2 = { type = \"show-workspace\", name = \"2\" }\n # ...\n\n alt-shift-F1 = { type = \"move-to-workspace\", name = \"1\" }\n alt-shift-F2 = { type = \"move-to-workspace\", name = \"2\" }\n # ...\n ```\n", + "description": "This is the top-level table.\n\n- Example:\n\n ```toml\n keymap = \"\"\"\n xkb_keymap {\n xkb_keycodes { include \"evdev+aliases(qwerty)\" };\n xkb_types { include \"complete\" };\n xkb_compat { include \"complete\" };\n xkb_symbols { include \"pc+us+inet(evdev)\" };\n };\n \"\"\"\n\n on-graphics-initialized = { type = \"exec\", exec = { prog = \"mako\", privileged = true } }\n\n [shortcuts]\n alt-h = \"focus-left\"\n alt-j = \"focus-down\"\n alt-k = \"focus-up\"\n alt-l = \"focus-right\"\n\n alt-shift-h = \"move-left\"\n alt-shift-j = \"move-down\"\n alt-shift-k = \"move-up\"\n alt-shift-l = \"move-right\"\n\n alt-d = \"split-horizontal\"\n alt-v = \"split-vertical\"\n\n alt-t = \"toggle-split\"\n alt-m = \"toggle-mono\"\n alt-u = \"toggle-fullscreen\"\n\n alt-f = \"focus-parent\"\n alt-shift-c = \"close\"\n alt-shift-f = \"toggle-floating\"\n Super_L = { type = \"exec\", exec = \"alacritty\" }\n alt-p = { type = \"exec\", exec = { prog = \"bemenu-run\", privileged = true } }\n alt-q = \"quit\"\n alt-shift-r = \"reload-config-toml\"\n\n ctrl-alt-F1 = { type = \"switch-to-vt\", num = 1 }\n ctrl-alt-F2 = { type = \"switch-to-vt\", num = 2 }\n # ...\n\n alt-F1 = { type = \"show-workspace\", name = \"1\" }\n alt-F2 = { type = \"show-workspace\", name = \"2\" }\n # ...\n\n alt-shift-F1 = { type = \"move-to-workspace\", name = \"1\" }\n alt-shift-F2 = { type = \"move-to-workspace\", name = \"2\" }\n # ...\n ```\n", "type": "object", "properties": { "keymap": { diff --git a/toml-spec/spec/spec.generated.md b/toml-spec/spec/spec.generated.md index c2e7e11e..0184926d 100644 --- a/toml-spec/spec/spec.generated.md +++ b/toml-spec/spec/spec.generated.md @@ -679,7 +679,7 @@ This is the top-level table. }; """ - on-graphics-initialized = { type = "exec", exec = "mako" } + on-graphics-initialized = { type = "exec", exec = { prog = "mako", privileged = true } } [shortcuts] alt-h = "focus-left" @@ -703,7 +703,7 @@ This is the top-level table. alt-shift-c = "close" alt-shift-f = "toggle-floating" Super_L = { type = "exec", exec = "alacritty" } - alt-p = { type = "exec", exec = "bemenu-run" } + alt-p = { type = "exec", exec = { prog = "bemenu-run", privileged = true } } alt-q = "quit" alt-shift-r = "reload-config-toml" diff --git a/toml-spec/spec/spec.yaml b/toml-spec/spec/spec.yaml index 4454b080..6efbfb9b 100644 --- a/toml-spec/spec/spec.yaml +++ b/toml-spec/spec/spec.yaml @@ -1642,7 +1642,7 @@ Config: }; """ - on-graphics-initialized = { type = "exec", exec = "mako" } + on-graphics-initialized = { type = "exec", exec = { prog = "mako", privileged = true } } [shortcuts] alt-h = "focus-left" @@ -1666,7 +1666,7 @@ Config: alt-shift-c = "close" alt-shift-f = "toggle-floating" Super_L = { type = "exec", exec = "alacritty" } - alt-p = { type = "exec", exec = "bemenu-run" } + alt-p = { type = "exec", exec = { prog = "bemenu-run", privileged = true } } alt-q = "quit" alt-shift-r = "reload-config-toml"