diff --git a/.config/waybar/config b/.config/waybar/config index 1b1d857..fd05a78 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,58 +1,80 @@ { - "layer": "top", // Waybar at top layer - "height": 24, // Waybar height (to be removed for auto height) - "modules-left": ["sway/workspaces"], - "modules-center": ["sway/window"], - "modules-right": ["custom/notification","tray","custom/player","network","battery","clock"], - "tray": { - "spacing": 10 - }, - "clock": { - "tooltip-format": "{:%Y %B}\n{calendar}", - "format-alt": "{:%Y-%m-%d}" - }, - "battery": { - "states": { - "good": 80, - "warning": 30, - "critical": 15 - }, - "format": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - "format-alt": "{time} {icon}", - "format-icons": ["", "", "", "", ""] - }, - "battery#bat2": { - "bat": "BAT2" - }, - "network": { - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ", - "format-alt": "{ifname}: {ipaddr}/{cidr}" - }, - "custom/notification": { - "tooltip": false, - "format": "{icon}", - "format-icons": { - "notification": "", - "none": "", - "dnd-notification": "", - "dnd-none": "" - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true - }, - "custom/player": { - "escape": true, - "exec": "playerctl metadata --format '{{uc(playerName)}}: {{ artist }} - {{ album }} - {{ title }} {{emoji(status)}}' | cut -c -48 || echo 'Stopped  '", - "interval": 15, - "on-click": "playerctl play-pause && sleep 0.2 && notify-send `playerctl status` -t 1000" - } + "layer": "top", + "height": 30, + "modules-left": [ + "sway/workspaces" + ], + "modules-center": [ + "sway/window" + ], + "modules-right": [ + "tray", + "custom/notification", + "custom/player", + "network", + "battery", + "clock" + ], + "sway/window": { + "max-length": 50 + }, + "tray": { + "spacing": 10 + }, + "network": { + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}: {ipaddr}/{cidr}", + "format-linked": " {ifname} (No IP)", + "format-disconnected": " Disconnected", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "battery": { + "states": { + "good": 80, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{icon} {time}", + "format-icons": [ + "", + "", + "", + "", + "" + ] + }, + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + "custom/player": { + "format": "{icon} {}", + "format-icons": { + "Playing": " ", + "Paused": " " + }, + "return-type": "json", + "exec": "playerctl -a metadata --format '{\"text\": \"{{uc(playerName)}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", + "max-length": 35, + "on-click": "playerctl play-pause && sleep 0.2 && notify-send `playerctl status` -t 1000" + } } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 37e35fb..dc2504a 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -42,12 +42,12 @@ window#waybar { #clock { - background-color: @green; + background-color: @blue; color: @background; } #battery { - background-color: @yellow; + background-color: @aqua; color: @background; } @@ -63,34 +63,6 @@ window#waybar { } } -/* #idle_inhibitor, */ -/* #pulseaudio, */ -/* #custom-openvpn, */ -/* #network, */ -/* #cpu, */ -/* #memory, */ -/* #temperature, */ -/* #backlight, */ -/* #battery, */ -/* #clock, */ -/* #tray { */ -/* padding: 0 6px; */ -/* margin: 0 3px; */ -/* } */ - -#clock, -#battery, -#network, -#custom-notification, -#custom-player { - padding: 0px 10px; - margin: 0px 5px; -} - -#clock { - margin-right: 10px; -} - #battery.warning:not(.charging) { background: @red; color: @white_b; @@ -100,3 +72,17 @@ window#waybar { animation-iteration-count: infinite; animation-direction: alternate; } + +#clock, +#battery, +#network, +#custom-notification, +#tray, +#custom-player { + padding: 0px 10px; + margin: 0px 5px; +} + +#clock { + margin-right: 10px; +}