aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:33 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:33 +0100
commitda1de8c64955f2ca5bb4891764e4b183f4250566 (patch)
treed116da84c69619aa635e1d142580f3ed1fb0b576 /etc
parentd1891aad42ea4f633e7a731c2f140e592c3d9244 (diff)
downloaddotfiles-da1de8c64955f2ca5bb4891764e4b183f4250566.tar.gz
dotfiles-da1de8c64955f2ca5bb4891764e4b183f4250566.tar.bz2
dotfiles-da1de8c64955f2ca5bb4891764e4b183f4250566.zip
feat(waybar,sway): htop click handler, app keybinds, VPN toggle
waybar: - cpu / custom/memory: on-click opens floating ghostty with htop - new custom/vpn module between custom/memory and network#bond: shows 'VPN' coloured by interface UP flag (green up, dim down); on-click toggles networkctl up/down hodor; SIGRTMIN+8 used for instant refresh after toggle sway: - Super+Shift+Return -> ghostty -e yazi - Super+Shift+b -> librewolf vpn-toggle.sh runs networkctl (no sudo) thanks to a new polkit rule allowing wheel-group members to invoke org.freedesktop.network1.* without a password prompt. systemd-networkd's polkit gate is a separate path from sudoers, so this is the idiomatic fix. KEYBINDS.md updated for both new sway bindings.
Diffstat (limited to 'etc')
-rw-r--r--etc/polkit-1/rules.d/50-networkd-wheel.rules13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/polkit-1/rules.d/50-networkd-wheel.rules b/etc/polkit-1/rules.d/50-networkd-wheel.rules
new file mode 100644
index 0000000..089616a
--- /dev/null
+++ b/etc/polkit-1/rules.d/50-networkd-wheel.rules
@@ -0,0 +1,13 @@
+// Allow members of the `wheel` group to manage systemd-networkd links
+// (e.g. `networkctl up/down <iface>`) without a polkit password prompt.
+// This single-user system already trusts wheel for administrative work
+// via sudo-rs; networkd's polkit gate is a separate path that does not
+// honour sudoers, so a polkit rule is the idiomatic fix.
+polkit.addRule(function (action, subject) {
+ if (
+ action.id.indexOf("org.freedesktop.network1.") === 0 &&
+ subject.isInGroup("wheel")
+ ) {
+ return polkit.Result.YES;
+ }
+});