diff options
| author | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
| commit | 0860db73ae6fd9a6f6347219d820bf026a6b8b91 (patch) | |
| tree | 11318c3670d1c32c5aa0bf404c22fba3bf63fc53 /.config/waybar | |
| parent | 4e34cbf9673aeaba252e01df554a0d204e83c5e2 (diff) | |
| download | dotfiles-master.tar.gz | |
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/waybar')
| -rw-r--r-- | .config/waybar/config.jsonc | 140 | ||||
| -rw-r--r-- | .config/waybar/menu-network.xml | 10 | ||||
| -rwxr-xr-x | .config/waybar/module-calendar.sh | 11 | ||||
| -rwxr-xr-x | .config/waybar/module-tailscale.sh | 7 | ||||
| -rw-r--r-- | .config/waybar/style-dark.css | 3 | ||||
| -rw-r--r-- | .config/waybar/style-light.css | 5 | ||||
| -rw-r--r-- | .config/waybar/style.css | 35 |
7 files changed, 143 insertions, 68 deletions
diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index eac00c8..66cc917 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -6,18 +6,32 @@ // ------------------------------------------------------------------------ // "modules-left": [ - "custom/launcher", + "custom/home", + "river/layout", "river/mode", "river/tags", "river/window", + // "custom/argen-context", + // "wlr/workspaces", + "group/mpris", ], - "custom/launcher": { - "format": "", - "tooltip": false, - "on-click": "riverctl spawn fuzzel", + "custom/home": { + "format": "{icon}", + "format-icons": { + "dark": "", + "light": "", + }, + "tooltip-format": "{alt}", + "exec": "~/.config/waybar/module-home.sh", + "return-type": "json", + "interval": 7200, // 2h + "on-click": "pkill -x fuzzel || riverctl spawn fuzzel", + "on-click-right": "darkman toggle", }, + "river/layout": {}, + "river/mode": {}, "river/tags": { @@ -31,6 +45,47 @@ "max-length": 50, }, + "custom/argen-context": { + "exec": "~/src/argen/zig-out/bin/argenctl context list --json | jq -rc '.[]|select(.current)|.name'", + "interval": 2 + }, + + "group/mpris": { + "orientation": "inherit", + "drawer": { + "transition-duration": 0, + "click-to-reveal": false, + }, + "modules": [ + "mpris#icon", + "mpris#detail", + ], + }, + + "mpris#icon": { + "format": "{player_icon}", + "player-icons": { + "default": "", + "firefox": "", + "librewolf": "", + "spotify": "", + "mpv": "", + }, + "status-icons": { + "paused": "", + "playing": "", + "stopped": "", + } + }, + + "mpris#detail": { + "max-length": 50, + "format": "{dynamic}", + "format-paused": "<i>{dynamic}</i>", + "dynamic-order": ["artist", "title", "length"], + }, + + // ------------------------------------------------------------------------ // "modules-center": [ @@ -40,6 +95,7 @@ "clock#utc", "custom/calendar", "custom/timew", + "custom/syncthing", ], "privacy": { @@ -101,20 +157,27 @@ "custom/calendar": { "exec": "~/.config/waybar/module-calendar.sh", "return-type": "json", - "interval": 10800, - "on-click": "calm", + "interval": 7200, // 2h + "on-click": "riverctl spawn calm", }, "custom/timew": { "exec": "~/.config/waybar/module-timew.sh", "return-type": "json", - "interval": 900, + "interval": 900, // 15min + }, + + "custom/syncthing": { + "exec": "~/.config/waybar/module-syncthing.sh", + "return-type": "json", + "interval": 900, // 15min + "on-click": "xdg-open http://localhost:8384", + "signal": 3, }, // ------------------------------------------------------------------------ // "modules-right": [ - "mpris", "tray", "group/tailscale", "group/net", @@ -127,25 +190,6 @@ "upower", ], - "mpris": { - "max-length": 50, - "format": "{player_icon} {dynamic}", - "format-paused": "{status_icon} <i>{dynamic}</i>", - "dynamic-order": ["artist", "title", "length"], - "player-icons": { - "default": "", - "firefox": "", - "librewolf": "", - "spotify": "", - "mpv": "", - }, - "status-icons": { - "paused": "", - "playing": "", - "stopped": "", - } - }, - "tray": { "icon-size": 13, "spacing": 2 @@ -153,10 +197,6 @@ "group/net": { "orientation": "inherit", - "drawer": { - "transition-duration": 0, - "click-to-reveal": true, - }, "modules": [ "network#primary", "network#bandwidth", @@ -164,9 +204,11 @@ }, "network#primary": { - "format-wifi": "{signalStrength}%", - "format-ethernet": "", "format-disconnected": "", + "format-ethernet": "", + "tooltip-format-ethernet": " Interface: {ifname}\n IP: {ipaddr}\n Gateway: {gwaddr}/{cidr}", + "format-wifi": "{signalStrength}%", + "tooltip-format-wifi": " SSID: {essid}\n {bssid}\n Signal: {signaldBm} dBm\n Frequency: {frequency} MHz\n\n Interface: {ifname}\n IP: {ipaddr}\n Gateway: {gwaddr}/{cidr}", // SSID: {essid} // {bssid} // Signal: {signaldBm} dBm @@ -175,19 +217,19 @@ // Interface: {ifname} // IP: {ipaddr} // Gateway: {gwaddr}/{cidr} - "tooltip-format-wifi": " SSID: {essid}\n {bssid}\n Signal: {signaldBm} dBm\n Frequency: {frequency} MHz\n\n Interface: {ifname}\n IP: {ipaddr}\n Gateway: {gwaddr}/{cidr}", - "tooltip-format-ethernet": " Interface: {ifname}\n IP: {ipaddr}\n Gateway: {gwaddr}/{cidr}", - "menu": "on-click-right", "menu-file": "~/.config/waybar/menu-network.xml", "menu-actions": { "open-netm": "netm", - "airplane-mode": "fyi todo", + "airplane-mode": "nmcli radio all off", + "copy-ipaddr": "nmcli -g IP4.ADDRESS c show $(nmcli -s -g uuid c show --active | head -1) | wl-copy -n", + "copy-gateway": "nmcli -g IP4.GATEWAY c show $(nmcli -s -g uuid c show --active | head -1) | wl-copy -n", }, - "on-click": "netm", + "menu": "on-click-right", }, "network#bandwidth": { - "format": "{bandwidthUpBytes} {bandwidthDownBytes}", + "format": "<small>{bandwidthUpBytes}</small><small>{bandwidthDownBytes}</small>", + "tooltip-format": "Total: {bandwidthTotalBytes}", }, "group/tailscale": { @@ -204,9 +246,9 @@ "format-disconnected": "", "format-disabled": "", "format-linked": "", - "tooltip-format": "{ifname}: {bandwidthUpBits} {bandwidthDownBits}", + "tooltip-format": "{ifname} / {ipaddr}:\n<small>{bandwidthUpBytes}</small><small>{bandwidthDownBytes}</small>", "tooltip-format-disconnected": "disconnected", - "on-click": "vpnm", + "on-click": "riverctl spawn vpnm", }, "custom/tailscale": { @@ -218,7 +260,7 @@ "exec": "~/.config/waybar/module-tailscale.sh", "return-type": "json", "signal": 2, - "on-click": "vpnm", + "on-click": "riverctl spawn vpnm", }, "bluetooth": { @@ -232,20 +274,20 @@ "tooltip-format": "{device_enumerate}", "tooltip-format-enumerate-connected": "{device_alias} {device_address}", "tooltip-format-enumerate-connected-battery": "{device_alias} {device_address} {device_battery_percentage}%", - "on-click": "blum" + "on-click": "riverctl spawn blum" }, "group/sys": { "orientation": "inherit", "drawer": { "transition-duration": 0, - "click-to-reveal": true, + "click-to-reveal": false, }, "modules": [ "load", + "temperature", "cpu", "memory", - "temperature", ], }, @@ -255,12 +297,12 @@ }, "cpu": { - "format": "cpu:{usage}%", + "format": "{icon}{usage}%", "format-icons": ["","","","",""], }, "memory": { - "format": "mem:{percentage}%", + "format": "{icon}{percentage}%", "format-icons": [""], }, @@ -300,7 +342,7 @@ }, "reverse-scrolling": true, "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", - "on-click-right": "audm", + "on-click-right": "riverctl spawn audm", }, "power-profiles-daemon": { diff --git a/.config/waybar/menu-network.xml b/.config/waybar/menu-network.xml index 11b78f7..deb56b0 100644 --- a/.config/waybar/menu-network.xml +++ b/.config/waybar/menu-network.xml @@ -11,5 +11,15 @@ <property name="label">Toggle airplane mode</property> </object> </child> + <child> + <object class="GtkMenuItem" id="copy-ipaddr"> + <property name="label">Copy IP address</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="copy-gateway"> + <property name="label">Copy gateway address</property> + </object> + </child> </object> </interface> diff --git a/.config/waybar/module-calendar.sh b/.config/waybar/module-calendar.sh index 6b20e2f..f779a5c 100755 --- a/.config/waybar/module-calendar.sh +++ b/.config/waybar/module-calendar.sh @@ -5,15 +5,14 @@ set -eu shopt -s extglob update() { - local today tn + local events tn local text # get events - today=$(~/src/calsync/ics2calendartxt ~/calendars/**/**/* 2>/dev/null | - grep -I "$(date -I)") - [ -z "$today" ] && return + events=$(env COLOR=never cdar 2>/dev/null) + [ -z "$events" ] && return - tn=$(wc -l <<<"$today") + tn=$(wc -l <<<"$events") # text="$today" # text="${text##"$(date +'%Y-%m-%d w%V %a ')"}" @@ -22,7 +21,7 @@ update() { text=" $tn" jq -nrc '{text:$text,tooltip:$tip}' \ - --arg tip "$today" \ + --arg tip "$events" \ --arg text "$text" } diff --git a/.config/waybar/module-tailscale.sh b/.config/waybar/module-tailscale.sh index 53b0409..3a2ce75 100755 --- a/.config/waybar/module-tailscale.sh +++ b/.config/waybar/module-tailscale.sh @@ -15,16 +15,19 @@ update() { alt="$ts_acct" class="$ts_acct" + tip="$ts_ip" # only display account name when not "main" [ "$ts_acct" = "main" ] || text=$ts_acct - if tailscale exit-node list | grep -q selected; then + en_name=$(tailscale exit-node list | grep selected) + if test -n "$en_name"; then alt="exit-node" class="exit-node" + tip="$(awk '{printf "%s (%s)", $2, $1}' <<<"$en_name")" fi jq -nrc '{text:$text,tooltip:$tip,class:$class,alt:$alt}' \ - --arg tip "${ts_ip:?}" \ + --arg tip "${tip:?}" \ --arg class "${class:?}" \ --arg alt "${alt:?}" \ --arg text "${text:-}" diff --git a/.config/waybar/style-dark.css b/.config/waybar/style-dark.css index 5fd324c..a9f1583 100644 --- a/.config/waybar/style-dark.css +++ b/.config/waybar/style-dark.css @@ -5,9 +5,10 @@ @define-color ur #ff5733; @define-color gr #86cd82; @define-color ye #d9ba73; -@define-color bl #5abfb5; +@define-color bl #458ee6; @define-color fg @wh; @define-color bg @bk; @define-color di shade(@fg, 0.5); +@define-color bb alpha(@bg, 0.95); /* ::end style */ @import url("style.css"); diff --git a/.config/waybar/style-light.css b/.config/waybar/style-light.css index be6995d..930dd99 100644 --- a/.config/waybar/style-light.css +++ b/.config/waybar/style-light.css @@ -3,12 +3,13 @@ @define-color wh #faf9f5; @define-color ac #70649a; @define-color ur #ca0043; -@define-color gr #86cd82; -@define-color ye #926200; +@define-color gr #019833; +@define-color ye #b07700; @define-color bl #007d7d; @define-color fg @bk; @define-color bg @wh; @define-color di shade(@bg, 0.4); +@define-color bb alpha(@bg, 0.6); /* ::end style */ @import url("style.css"); #tags button.focused label { diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 7e22eb3..d455b23 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -21,15 +21,16 @@ } window#waybar { - background: alpha(@bg, 0.99); + background: @bb; } -.module { +widget .module { padding: 0 3px; - padding-bottom: 1px; } -label.module { +label, image { color: @di; + padding-top: 1px; + padding-bottom: 1px; } tooltip, menu { @@ -57,9 +58,11 @@ menuitem:hover label { } -#custom-launcher { - margin-left: 5px; +#custom-home { + margin: 0; + padding: 0 6px; color: @fg; + background: @bg; } #mode { @@ -76,6 +79,16 @@ menuitem:hover label { opacity: 0; } +#layout { + box-shadow: inset 0 -1px @ac; + color: @fg; +} + +#layout.left { + min-width: 0; +} + + #tags button { min-width: unset; padding: 0 3px; @@ -121,11 +134,17 @@ menuitem:hover label { color: @fg; } +#mpris.icon { + box-shadow: inset 0 -1px @ac; + color: @ac; +} #mpris.paused { color: shade(@di, 1.5); font-style: italic; } +#network.bandwidth { +} #network.tailscale { color: @fg; } @@ -149,6 +168,7 @@ menuitem:hover label { } #pulseaudio.bluetooth { + box-shadow: inset 0 -1px @bl; color: @bl; } #pulseaudio.muted { @@ -165,11 +185,10 @@ menuitem:hover label { background: @ye; } -#upower * { +#upower { } #upower.charging { box-shadow: inset 0 -1px @gr; - background: unset; } #upower.empty { background: @ur; |