aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/waybar/config.jsonc
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:36 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:36 +0100
commit1238e4dfc33bc4347564350bbfadac50aa8da0cd (patch)
tree3898cd089a601e30db6311da45006fc68b953f12 /dot_config/waybar/config.jsonc
parentf685f20f7a41e6b5c4d56e46a9c8fba7c3287a68 (diff)
downloaddotfiles-1238e4dfc33bc4347564350bbfadac50aa8da0cd.tar.gz
dotfiles-1238e4dfc33bc4347564350bbfadac50aa8da0cd.tar.bz2
dotfiles-1238e4dfc33bc4347564350bbfadac50aa8da0cd.zip
fix(waybar): pacdiff click — set DIFFPROG inside the root shell
sudo-rs scrubs the env by default, so neither `DIFFPROG=… sudo pacdiff` nor `sudo DIFFPROG=… pacdiff` reaches pacdiff with the variable set. Sidestep the env-policy question entirely by running sudo sh -c 'DIFFPROG="nvim -d" pacdiff' so the assignment happens inside the privileged shell, after the env-scrubbing boundary. No sudoers-rs change required, and the same form works identically under stock sudo if the user ever switches back.
Diffstat (limited to 'dot_config/waybar/config.jsonc')
-rw-r--r--dot_config/waybar/config.jsonc2
1 files changed, 1 insertions, 1 deletions
diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc
index 12d1255..a68278f 100644
--- a/dot_config/waybar/config.jsonc
+++ b/dot_config/waybar/config.jsonc
@@ -227,7 +227,7 @@
"exec": "~/.config/waybar/pacdiff-status.sh",
"return-type": "json",
"interval": 300,
- "on-click": "ghostty --class=floating -e sh -c 'sudo DIFFPROG=\"nvim -d\" pacdiff; printf \"\\n[done — press enter] \"; read _'",
+ "on-click": "ghostty --class=floating -e sh -c 'sudo sh -c \"DIFFPROG=\\\"nvim -d\\\" pacdiff\"; printf \"\\n[done — press enter] \"; read _'",
"tooltip": true,
},