waybar: Add river modules,Update for new nerdfonts

Added a window entry on the bar for the currently displayed window. If
it annoys me I will delete it again but it helps distinguish the active
and the inactive output.
Also added the current river *mode* which is a lovely feature to have,
though I would like to hide it if no mode (other than normal) is
currently active.
This commit is contained in:
Marty Oehme 2023-05-15 09:38:20 +02:00
parent 8606652b93
commit 42e8504b1b
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 27 additions and 10 deletions

View file

@ -1,13 +1,13 @@
{ {
"layer": "top", "layer": "top",
"modules-left": ["river/tags", "custom/events", "custom/vidl"], "modules-left": ["river/tags", "custom/events", "custom/vidl", "river/window"],
"modules-center": ["clock", "custom/media"], "modules-center": ["clock", "custom/media"],
"modules-right": ["custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "battery", "tray"], "modules-right": ["river/mode", "custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "battery", "tray"],
"custom/archupdates": { "custom/archupdates": {
"format": "{} {icon}", "format": "{} {icon}",
"format-alt-click": "right", "format-alt-click": "right",
"format-icons": { "format-icons": {
"default": "" "default": ""
}, },
"return-type": "json", "return-type": "json",
"exec": "~/.config/waybar/modules/archupdates 5 json", "exec": "~/.config/waybar/modules/archupdates 5 json",
@ -56,7 +56,8 @@
}, },
"exec": "~/.config/waybar/modules/khal.py 2>/dev/null", "exec": "~/.config/waybar/modules/khal.py 2>/dev/null",
"exec-if": "command -v khal >/dev/null 2>&1", "exec-if": "command -v khal >/dev/null 2>&1",
"return-type": "json" "return-type": "json",
"on-click": "$TERMINAL start --class float ikhal"
}, },
"memory": { "memory": {
"interval": 30, "interval": 30,
@ -105,14 +106,13 @@
"on-click-right": "playerctl stop", "on-click-right": "playerctl stop",
}, },
"network": { "network": {
"interface": "wlp58s0",
"format": "{ifname}", "format": "{ifname}",
"format-wifi": "{signalStrength}% ", "format-wifi": "{signalStrength}% ",
"format-ethernet": "{ipaddr}/{cidr} ", "format-ethernet": "{ipaddr}/{cidr} 󰈀",
"format-disconnected": "", "format-disconnected": "󰖪",
"tooltip-format": "{ifname} via {gwaddr} ", "tooltip-format": "{ifname} via {gwaddr} 󰈁",
"tooltip-format-wifi": "{essid}: {bandwidthDownBits}-{bandwidthUpBits} ({signalStrength}%)  {ifname}", "tooltip-format-wifi": "{essid}: {bandwidthDownBits}-{bandwidthUpBits} ({signalStrength}%)  {ifname}",
"tooltip-format-ethernet": "{ifname} ", "tooltip-format-ethernet": "{ifname} 󰈀",
"tooltip-format-disconnected": "Disconnected", "tooltip-format-disconnected": "Disconnected",
"max-length": 50, "max-length": 50,
"on-click": "$TERMINAL start --class float nmtui", "on-click": "$TERMINAL start --class float nmtui",
@ -140,6 +140,13 @@
"num-tags": 10, "num-tags": 10,
"tag-labels": [ "", "", "", "", "", "", "", "", "", "" ] "tag-labels": [ "", "", "", "", "", "", "", "", "", "" ]
}, },
"river/mode": {
"format": "{} 󱐁",
},
"river/window": {
"format": " {}",
"max-length": 70
},
"temperature": { "temperature": {
// "thermal-zone": 2, // "thermal-zone": 2,
"hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input", "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
@ -171,7 +178,7 @@
"format": "{} {icon}", "format": "{} {icon}",
"format-alt-click": "right", "format-alt-click": "right",
"format-icons": { "format-icons": {
"default": "" "default": ""
}, },
"exec": "wc -l ~/.local/share/vidl/vidl_queue | cut -d' ' -f1", "exec": "wc -l ~/.local/share/vidl/vidl_queue | cut -d' ' -f1",
"exec-if": "[ -f ~/.local/share/vidl/vidl_queue ]", "exec-if": "[ -f ~/.local/share/vidl/vidl_queue ]",

View file

@ -2,6 +2,7 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
font-family: Iosevka Nerd Font, Iosevka, monospace;
} }
window#waybar { window#waybar {
@ -57,6 +58,7 @@ window#waybar.hidden {
#mode, #mode,
#idle_inhibitor, #idle_inhibitor,
#mpd, #mpd,
#window,
#custom-archupdates, #custom-archupdates,
#custom-wireguard, #custom-wireguard,
#custom-events, #custom-events,
@ -82,6 +84,14 @@ window#waybar.hidden {
background-color: @base02; background-color: @base02;
} }
/* Mark active output through highlighted window background */
#window {
background-color: transparent;
}
#window.focused {
background-color: @base01;
}
#battery.warning { #battery.warning {
background-color: @base09; background-color: @base09;
color: @base00; color: @base00;