feat(bar): idle-inhibit (caffeine) toggle — generated bar + summer-day parity (item 13 slice)
All checks were successful
Check / eval (push) Successful in 2m55s
All checks were successful
Check / eval (push) Successful in 2m55s
Summer-night's whole-swap bar had an idle_inhibitor the generated bar lacked (reverse parity gap from the 2026-07-04 sweep). The generated bar now carries it — click → , warm tint while active, tooltips saying what it holds — blocking hypridle's lock/display-off/suspend for videos and presentations; state deliberately resets with the bar. summer-day mirrors summer-night's module + CSS, and the keybinds cheatsheet mentions the bar click (via keybinds.extra). V1: rendered config has the module with correct glyphs, CSS rules present, cheatsheet row renders. Inhibit behaviour needs a session → V3 queued. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,5 +76,6 @@
|
||||
{ keys = "SUPER + SHIFT + 1-9"; desc = "Move window to workspace 1-9"; }
|
||||
{ keys = "SUPER + drag"; desc = "Move (LMB) / resize (RMB) window"; }
|
||||
{ keys = "Volume / Brightness"; desc = "Hardware keys, shown via the OSD"; }
|
||||
{ keys = "Bar: click"; desc = "Caffeine — hold the screen awake (idle inhibitor)"; }
|
||||
];
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ let
|
||||
|
||||
modules-left = [ "hyprland/workspaces" "hyprland/window" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "custom/recording" "tray" "custom/vpn" "pulseaudio" "cpu" "memory" "custom/powerprofile" "custom/nightlight" ]
|
||||
modules-right = [ "custom/recording" "idle_inhibitor" "tray" "custom/vpn" "pulseaudio" "cpu" "memory" "custom/powerprofile" "custom/nightlight" ]
|
||||
++ lib.optional showLanguage "hyprland/language"
|
||||
++ [ "battery" "custom/updates" "custom/notification" ];
|
||||
|
||||
@@ -155,6 +155,19 @@ let
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
|
||||
# Idle inhibitor (caffeine): click → to hold the screen awake —
|
||||
# blocks hypridle's lock / display-off / suspend during video or a
|
||||
# presentation. Waybar holds a Wayland idle-inhibit while activated;
|
||||
# the state resets with the bar (deliberate — caffeine shouldn't
|
||||
# survive a relogin). Summer-night's whole-swap bar had this first
|
||||
# (reverse parity gap, 2026-07-04).
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = { activated = ""; deactivated = ""; };
|
||||
tooltip-format-activated = "Screen held awake — click to release";
|
||||
tooltip-format-deactivated = "Keep the screen awake (caffeine)";
|
||||
};
|
||||
|
||||
# No network module: nm-applet lives in the tray (the GUI path), so the
|
||||
# bar's wifi/ethernet indicator would just duplicate it.
|
||||
|
||||
@@ -296,11 +309,14 @@ let
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #cpu, #memory, #custom-powerprofile, #custom-nightlight, #custom-updates, #custom-vpn, #custom-recording, #language, #battery, #custom-notification {
|
||||
#tray, #pulseaudio, #cpu, #memory, #custom-powerprofile, #custom-nightlight, #custom-updates, #custom-vpn, #custom-recording, #idle_inhibitor, #language, #battery, #custom-notification {
|
||||
color: alpha(@text, 0.85);
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* Caffeine engaged → warm tone (the screen is being held awake). */
|
||||
#idle_inhibitor.activated { color: @warn; }
|
||||
|
||||
/* Recording in progress → the alert red; the ⏺ is also the stop button. */
|
||||
#custom-recording.recording { color: @bad; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user