diff --git a/.config/waybar/config b/.config/waybar/config index 2b23ce8..f079c98 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,12 +1,13 @@ { "layer": "top", "position": "bottom", - "height": 24, + "height": 28, "spacing": 6, "modules-left": [ "hyprland/workspaces" ], "modules-center": [ + "mpris" ], "modules-right": [ "network", diff --git a/.config/waybar/custom/pacman b/.config/waybar/custom/pacman index 23b6654..0336ca7 100755 --- a/.config/waybar/custom/pacman +++ b/.config/waybar/custom/pacman @@ -1,5 +1,7 @@ #!/usr/bin/env sh +set -e + updates=$(checkupdates) text=$(echo "$updates" | wc -l) tooltip=$(echo "$updates" | sed 's/$/\\n/' | tr -d '\n' | sed 's/\\n$//') diff --git a/.config/waybar/default-modules.json b/.config/waybar/default-modules.json index c888a86..598ac08 100644 --- a/.config/waybar/default-modules.json +++ b/.config/waybar/default-modules.json @@ -2,15 +2,15 @@ "hyprland/workspaces": { "on-click": "activate", "all-outputs": true, - "sort-by-number": true, + "sort-by-number": true }, "hyprland/window": { "max-length": 128 }, "clock": { "interval": 1, - "format": " {:%Y-%m-%d %H:%M:%S}", - "tooltip-format": "{:%Y %B}\n{calendar}" + "format": " {:%Y-%m-%d %H:%M:%S}", + "tooltip-format": "{:%Y %B}\n{calendar}" }, "cpu": { "format": " {usage}%" @@ -18,6 +18,29 @@ "memory": { "format": " {percentage}%" }, + "mpris": { + "format": "{player_icon} {status_icon} {dynamic}", + "interval": 5, + "dynamic-order": [ + "title", + "artist", + "position", + "length" + ], + "player-icons": { + "default": "󰎈", + "chromium": "", + "firefox": "", + "spotify": "", + "spotifyd": "", + "vlc": "" + }, + "status-icons": { + "paused": "󰏤", + "playing": "󰐊", + "stopped": "󰓛" + } + }, "network": { "format": " {ipaddr}" }, @@ -28,17 +51,17 @@ "tray": { "spacing": 4 }, - "custom/pacman": { - "format": "󰏕 {}", - "interval": 3600, - "exec": "~/.config/waybar/custom/pacman", - "on-click": "alacritty -e 'archlinux-update'", + "custom/pacman": { + "format": "󰏕 {}", + "interval": 3600, + "exec": "~/.config/waybar/custom/pacman", + "on-click": "alacritty -e 'archlinux-update'", "return-type": "json", - "signal": 8 - }, + "signal": 8 + }, "custom/weather": { - "exec": "~/.config/waybar/custom/weather", - "on-click": "xdg-open 'https://www.wetter.com/deutschland/oranienburg/DE0007983.html'", + "exec": "~/.config/waybar/custom/weather", + "on-click": "xdg-open 'https://www.wetter.com/deutschland/oranienburg/DE0007983.html'", "return-type": "json", "format": "{}", "tooltip": true, @@ -46,8 +69,8 @@ }, "custom/status": { "format": "󱖫 {}", - "exec": "~/.config/waybar/custom/status-serguzim-net", - "on-click": "xdg-open 'https://status.serguzim.net'", + "exec": "~/.config/waybar/custom/status-serguzim-net", + "on-click": "xdg-open 'https://status.serguzim.net'", "return-type": "json", "tooltip": true, "interval": 500 diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 8a25327..358f42b 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -27,10 +27,14 @@ window#waybar { border-bottom: solid 2px @pink; } -#network { +#mpris { border-bottom: solid 2px @green; } +#network { + border-bottom: solid 2px @yellow; +} + #temperature { border-bottom: solid 2px @red; }