From 519493f32477d3ced31e754e21db3e18edcfcc8d Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Wed, 22 Feb 2023 22:18:36 +0200 Subject: [PATCH] Changed `waybar` style/settings --- .config/waybar/config | 57 +++++++++++++++++++++++++++++++++++----- .config/waybar/style.css | 17 +++++++----- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/.config/waybar/config b/.config/waybar/config index a5a77053..01ac91eb 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -7,7 +7,7 @@ // Choose the order of the modules "modules-left": ["wlr/workspaces", "custom/media"], "modules-center": ["hyprland/window"], - "modules-right": ["network", "custom/pacman", "backlight", "temperature", "pulseaudio", "battery", "custom/weather", "tray", "clock"], + "modules-right": ["network", "custom/pacman", "backlight", "temperature", "pulseaudio", "battery", "custom/dunst", "custom/weather", "tray", "clock"], // Modules configuration "wlr/workspaces": { "format": "{icon}", @@ -131,7 +131,7 @@ "states": { "good": 95, "warning": 30, - "critical": 20 + "critical": 10 }, "format": "{capacity}% {icon}", "format-charging": "{capacity}% ", @@ -152,6 +152,13 @@ "format-alt": "{ifname}: {ipaddr}/{cidr}" }, + "wireplumber": { + "format": "{volume}% {icon}", + "format-muted": "", + "on-click": "pulsemixer --toggle-mute", + "format-icons": ["", "", ""] + }, + "pulseaudio": { "scroll-step": 1, // %, can be a float "format": "{volume}% {icon} {format_source}", @@ -186,13 +193,13 @@ }, "escape": true, "smooth-scrolling-threshold": 10, // This value was tested using a trackpad, it should be lowered if using a mouse. - "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - /* "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name */ + "exec": "$HOME/.config/waybar/scripts/mediaplayer.py 2> /dev/null" // Script in resources folder + /* "exec": "$HOME/.config/waybar/scripts/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name */ }, "custom/pacman": { - "format": "{} ", + "format": "{} ", "interval": 600, // every hour "exec": "checkupdates | wc -l", // # of updates "exec-if": "exit 0", // always run; consider advanced run conditions @@ -202,8 +209,46 @@ "custom/weather": { "exec": "curl 'https://wttr.in/?format=1'", - "interval": 3600 + "interval": 600, + "on-click": "curl 'https://wttr.in/?format=1'", }, + "custom/vpn": { + "format": "VPN ", + "exec": "echo '{\"class\": \"connected\"}'", + "exec-if": "test -d /proc/sys/net/ipv4/conf/tun0", + "return-type": "json", + "interval": 5 + }, + + "custom/pipewire": { + "tooltip": true, + "max-length": 10, + "exec": "$HOME/.config/waybar/scripts/pipewire.sh", + "on-click": "pulsemixer --toggle-mute", + "on-click-right": "qpwgraph" + }, + + "custom/wireguard": { + "format": "{}", + "exec": "~/.config/waybar/scripts/wireguard.sh", + "on-click": "rofi -modi 'WireGuard:~/.config/waybar/scripts/wireguard-rofi.sh' -show WireGuard", + "interval": 60, + "return-type": "json" + }, + + "custom/github": { + "format": "{} ", + "return-type": "json", + "interval": 60, + "exec": "$HOME/.config/waybar/scripts/github.sh", + "on-click": "xdg-open https://github.com/notifications" + }, + + "custom/dunst": { + "exec": "~/.config/waybar/scripts/dunst.sh", + "on-click": "dunstctl set-paused toggle", + "restart-interval": 1, + }, } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 1a58c4b6..3e6f8d78 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -7,11 +7,11 @@ } window#waybar { - background-color: transparent; border-top: 3px solid transparent; color: #fff; transition-property: background-color; transition-duration: 0.5s; + background-color: transparent; } #window { @@ -49,7 +49,6 @@ button:hover { #workspaces button { padding: 0 5px; - background-color: transparent; color: #fff; } @@ -83,9 +82,17 @@ button:hover { #mode, #idle_inhibitor, #scratchpad, -#mpd { +#mpd, +#custom-wireguard, +#custom-github, +#custom-dunst { padding: 0 10px; font-weight: bold; + background-color: transparent; +} + +#custom-pipewire.muted { + color: #5b5b5b; } #window, @@ -183,7 +190,3 @@ button:hover { #scratchpad { background: rgba(0, 0, 0, 0.2); } - -#scratchpad.empty { - background-color: transparent; -}