From d14c4fccfbe7c453b4c70207b6c4ecb039bb6a3a Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Fri, 5 Sep 2025 18:50:07 +0300 Subject: [PATCH] waybar: add idle_inhibitor; disable most of tooltips; fix startup warnings --- config/niri/waybar.jsonc | 3 ++- config/waybar/modules/info.jsonc | 12 +++++++++++- config/waybar/modules/niri.json | 7 ++++++- config/waybar/style.css | 7 ++++++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/config/niri/waybar.jsonc b/config/niri/waybar.jsonc index 5a8953c..11c20f0 100644 --- a/config/niri/waybar.jsonc +++ b/config/niri/waybar.jsonc @@ -1,7 +1,7 @@ { "position": "top", "layer": "top", - "height": 14, + "height": 38, "margin-top": 0, "margin-bottom": 0, "margin-left": 0, @@ -18,6 +18,7 @@ "battery", "power-profiles-daemon", "backlight", + "idle_inhibitor", "pulseaudio", "network" ] diff --git a/config/waybar/modules/info.jsonc b/config/waybar/modules/info.jsonc index 2920145..2dc15cf 100644 --- a/config/waybar/modules/info.jsonc +++ b/config/waybar/modules/info.jsonc @@ -6,11 +6,13 @@ "clock": { "format": " {:%a, %d %b %H:%M}", // replace %I with %H for 24h format + "tooltip": false }, "temperature": { "hwmon-path": "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.0/hwmon/hwmon3/temp1_input", - "format": " {temperatureC}°C" + "format": " {temperatureC}°C", + "tooltip": false }, "battery": { @@ -78,6 +80,14 @@ "tooltip": false, "on-scroll-up": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+", "on-scroll-down": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" + }, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": " ", + "deactivated": " " + } } } // vim: ft=jsonc diff --git a/config/waybar/modules/niri.json b/config/waybar/modules/niri.json index e5ce336..93ebe39 100644 --- a/config/waybar/modules/niri.json +++ b/config/waybar/modules/niri.json @@ -13,6 +13,11 @@ "niri/language": { "format": "󰌌 {}", "format-uk": "укр", - "format-en": "eng" + "format-en": "eng", + "tooltip": false + }, + "niri/window": { + "swap-icon-label": true, + "tooltip": false } } diff --git a/config/waybar/style.css b/config/waybar/style.css index 42613e4..f2bba7a 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -29,7 +29,9 @@ tooltip { border: 1px solid @bg-darker-color; } -#language, #cpu, #memory, #workspaces, #window, #tray, #clock, #battery, #power-profiles-daemon, #pulseaudio, #network, #backlight, #temperature { +#language, #cpu, #memory, #workspaces, #window, #tray, #clock, #battery, +#power-profiles-daemon, #pulseaudio, #network, #backlight, #temperature, +#idle_inhibitor { background-color: @bg-darker-color; color: @fg-color; border-radius: 16px; @@ -69,3 +71,6 @@ tooltip { #power-profiles-daemon.performance { color: @blue; } #power-profiles-daemon.balanced { color: @green; } #power-profiles-daemon.power-saver { color: @red; } + +#idle_inhibitor.activated { color: @red; } +#idle_inhibitor.deactivated { color: @green; }