From d02c324c605e9aabdd8c5d2d69ae68d3e0f5e195 Mon Sep 17 00:00:00 2001 From: NotXia <35894453+NotXia@users.noreply.github.com> Date: Sun, 28 Jul 2024 11:21:57 +0200 Subject: [PATCH] Update Waybar --- .config/hypr/hyprland.conf | 2 +- .config/waybar/{config-hypr => config} | 86 ++++------- .config/waybar/style.css | 199 ++++++++++--------------- 3 files changed, 108 insertions(+), 179 deletions(-) rename .config/waybar/{config-hypr => config} (58%) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 8565036..e8a78a1 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -18,7 +18,7 @@ exec-once = dbus-update-activation-environment --systemd & # Wallpaper exec-once = hyprpaper exec-once = hypridle & -exec-once = waybar -c .config/waybar/config-hypr & +exec-once = waybar -c ~/.config/waybar/config & exec-once = fcitx5 -d & exec-once = mako & exec-once = bash -c "mkfifo /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob && tail -f /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob | wob & disown" & diff --git a/.config/waybar/config-hypr b/.config/waybar/config similarity index 58% rename from .config/waybar/config-hypr rename to .config/waybar/config index 9d17acb..9b5c32a 100644 --- a/.config/waybar/config-hypr +++ b/.config/waybar/config @@ -6,23 +6,22 @@ "margin-bottom": 0, "margin-right": 3, - "spacing": 1, + "spacing": 0, "modules-left": [ "hyprland/workspaces", "custom/screenshot_t", - "idle_inhibitor" + "idle_inhibitor", + "tray" ], "modules-right": [ - "cpu", - "memory", "network", "bluetooth", + "memory", + "cpu", "pulseaudio", "battery", - "clock", - // "custom/power", - "tray" + "clock" ], @@ -38,16 +37,16 @@ "cpu": { "interval": 3, - "format": " {usage}%", - "max-length": 7, - "min-length": 7 + "format": "{usage}% ", + "max-length": 6, + "min-length": 6 }, "memory": { "interval": 3, - "format": " {used:0.2f}GB", - "max-length": 12, - "min-length": 12 + "format": "{used:0.2f}GB ", + "max-length": 9, + "min-length": 9 }, "battery": { @@ -57,9 +56,9 @@ "warning": 30, "critical": 15 }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": " {capacity}%", + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", "format-icons": [ "", "", @@ -70,22 +69,21 @@ }, "network": { - "format-wifi": " {signalStrength}% | {bandwidthUpBytes} {bandwidthDownBytes}", - "format-ethernet": "{ifname} | {bandwidthUpBytes} {bandwidthDownBytes}", + "format-wifi": " {signalStrength}% | {bandwidthUpBytes:>3} 󰇚 {bandwidthDownBytes:>3} 󰕒", + "format-ethernet": "{ifname} | {bandwidthUpBytes:>3} 󰇚 {bandwidthDownBytes:>3} 󰕒", "format-linked": "{ifname} No IP", "format": "", "format-disconnected": "¯\\_(ツ)_/¯", "on-click": "alacritty -e 'nmtui'", "tooltip-format": "{ifname}\n{ipaddr}/{cidr}", "tooltip-format-wifi": "{essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}", - "interval": 3, - "min-length": 32 + "interval": 3 }, "bluetooth": { - "format-disabled": " off", - "format-off": " off", - "format-on": " on", + "format-disabled": "off ", + "format-off": "off ", + "format-on": "on ", "interval": 3, "on-click": "blueman-manager" }, @@ -99,14 +97,8 @@ "tooltip": "true" }, - "custom/power": { - "format": "", - "tooltip": false, - "on-click": "wlogout" - }, - "clock": { - "format": " {:%d %b %Y | %H:%M}", + "format": "{:%d %b %Y | %H:%M}", "tooltip-format": "{:%Y %B}\n{calendar}" }, @@ -131,17 +123,12 @@ "active-only": false }, - "hyprland/window": { - "max-length": 100, - "separate-outputs": true - }, - "pulseaudio": { - "scroll-step": 2, // %, can be a float - "format": "{icon} {volume}% | {format_source}", + "scroll-step": 2, + "format": "{volume}% {icon} | {format_source}", "format-bluetooth": "{volume}% {icon} | {format_source}", "format-bluetooth-muted": " {icon} | {format_source}", - "format-muted": " | {format_source}", + "format-muted": "󰖁 | {format_source}", //"format-source": "{volume}% ", //"format-source-muted": "", "format-source": "", @@ -159,29 +146,6 @@ "on-click-right": "amixer sset Master toggle" }, - "wireplumber": { - "on-click": "pavucontrol", - "on-click-right": "amixer sset Master toggle 1>/dev/null", - //on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; - //on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+"; - //on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-"; - "format": "{icon} {volume}%", - "format-muted": " ", - "format-source": "", - "format-source-muted": "", - //"format-muted": "", - //"format-icons": [ "" ] - "format-icons": { - "headphone": " ", - "hands-free": " ", - "headset": " ", - "phone": " ", - "portable": " ", - "car": " ", - "default": [" ", " ", " "] - } - }, - "tray": { "icon-size": 15, "spacing": 5 diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 2947c10..de0d620 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,61 +1,18 @@ * { - font-family: "Mono"; - font-size: 9pt; - font-weight: 600; - padding: 0; - transition-property: background-color; - transition-duration: 0.5s; - border: none; - border-radius: 3px; - min-height: 0; - margin: 0.2em 0.2em 0.2em 0.2em; + font-family: "Mono"; + font-size: 9pt; + font-weight: 600; + margin: 0.2em 0 0.2em 0; + padding: 0; } -/* The whole bar */ + #waybar { - /*background: @bg;*/ background-color: transparent; - /*color: @light;*/ color: #ffffff; - transition-property: background-color; - transition-duration: 0.5s; - /*border-top: 8px transparent;*/ - border-radius: 0px; - margin: 0px 0px; } -window#waybar.hidden { - opacity: 0.2; -} -#workspaces button { - padding: 0 0px; - color: #7984a4; - background-color: transparent; - box-shadow: inset 0 -3px transparent; - border: none; - border-radius: 0; -} - -#workspaces button.focused { - background-color: transparent; -} -#workspace button.hover { - background-color: transparent; -} -#workspaces button.active { - color: #fff; -} - -#workspaces button.urgent { - background-color: #eb4d4b; -} - -#window { - color: #64727d; -} - -/* Each module */ #clock, #battery, #cpu, @@ -72,122 +29,130 @@ window#waybar.hidden { #custom-hyprPicker, #custom-power-menu, #custom-power { - padding: 0px 15px; - color: #e5e5e5; - /* color: #bf616a; */ - border-radius: 20px; - background-color: #1e1e1e; + padding-right: 15px; + padding-left: 15px; + background-color: #1e1e1e; } -#window, -#workspaces { - border-radius: 20px; - padding: 0px 10px; - background-color: #1e1e1e; + +.modules-right > widget:last-child > * { + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; } +.modules-right > widget:first-child > * { + border-top-left-radius: 15px; + border-bottom-left-radius: 15px; +} + +.modules-left > widget > * { + border-radius: 20px; + margin-left: 0.2em; + margin-right: 0.2em; +} + + +#workspaces { + border-radius: 20px; + padding: 0px 10px; + background-color: #1e1e1e; +} + +#workspaces button { + color: #7984a4; + background-color: transparent; +} + +#workspaces button.focused { + background-color: transparent; +} + +#workspace button.hover { + background-color: transparent; +} + +#workspaces button.active { + color: #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + + #cpu { - color: #fb958b; - background-color: #1e1e1e; + color: #fb958b; } + #memory { - color: #ebcb8b; - background-color: #1e1e1e; + color: #ebcb8b; } -#custom-power-menu { - border-radius: 9.5px; - background-color: #1b242b; - border-radius: 7.5px; - padding: 0 0px; -} - -#custom-launcher { - background-color: #1b242b; - color: #6a92d7; - border-radius: 7.5px; - padding: 0 0px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; -} - -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { - margin-right: 0; -} #pulseaudio { - color: #7d9bba; + color: #629e67; } + #clock { - color: #c8d2e0; + color: #c8d2e0; } + #battery { - color: #c0caf5; + color: #c0caf5; } #battery.charging, #battery.full, #battery.plugged { - color: #26a65b; + color: #26a65b; } @keyframes blink { - to { - background-color: rgba(30, 34, 42, 0.5); - color: #abb2bf; - } + to { + background-color: rgba(30, 34, 42, 0.5); + color: #abb2bf; + } } #battery.critical:not(.charging) { - color: #f53c3c; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; + color: #f53c3c; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; } + label:focus { - background-color: #000000; + background-color: #000000; } + #bluetooth { - color: #707d9d; + color: #707d9d; } -/* #bluetooth.disconnected { - color: #f53c3c; -} */ #network { - color: #b48ead; + color: #b48ead; } -/* #network.disconnected { - color: #f53c3c; -} */ #tray > .passive { - -gtk-icon-effect: dim; + -gtk-icon-effect: dim; } #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; + -gtk-icon-effect: highlight; + background-color: #eb4d4b; } -/* #idle_inhibitor { - background-color: #2d3436; -} */ #idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; + background-color: #ffffff; + color: #2d3436; }