Browse Source

Sync: 2026-11-07 20:58:00

Gabriel Capella 3 ngày trước cách đây
mục cha
commit
b7ebb5c149
2 tập tin đã thay đổi với 6 bổ sung và 5 xóa
  1. 6 4
      dots/.config/waybar/scripts/inhibit.sh
  2. 0 1
      pkglist

+ 6 - 4
dots/.config/waybar/scripts/inhibit.sh

@@ -1,14 +1,16 @@
 #!/usr/bin/env bash
 # Three-state idle inhibitor for waybar (custom/inhibit):
 #   off   -> normal: swayidle active, wluma adjusting brightness
-#   idle  -> idle inhibited (wlinhibit running)
+#   idle  -> idle inhibited (idlehold running)
 #   movie -> idle inhibited AND wluma stopped (brightness held steady)
 # Usage: inhibit.sh [status|cycle]
 
 SIGNAL=9
+# idlehold: git.capella.pro/capella/idlehold (wlinhibit doesn't work on sway)
+IDLEHOLD="$HOME/.local/bin/idlehold"
 
 has_wluma() { systemctl --user cat wluma.service >/dev/null 2>&1; }
-inhibiting() { pgrep -x -u "$USER" wlinhibit >/dev/null; }
+inhibiting() { pgrep -x -u "$USER" idlehold >/dev/null; }
 wluma_on() { systemctl --user -q is-active wluma.service; }
 
 state() {
@@ -21,8 +23,8 @@ state() {
     fi
 }
 
-inhibit_on() { inhibiting || setsid -f wlinhibit >/dev/null 2>&1; }
-inhibit_off() { pkill -x -u "$USER" wlinhibit; }
+inhibit_on() { inhibiting || setsid -f "$IDLEHOLD" >/dev/null 2>&1; }
+inhibit_off() { pkill -x -u "$USER" idlehold; }
 
 case "${1:-status}" in
     cycle)

+ 0 - 1
pkglist

@@ -66,7 +66,6 @@ ttf-jetbrains-mono
 vim
 waybar
 wl-clipboard
-wlinhibit
 wluma
 woff2-font-awesome
 wtype