From 2945051b03a2c3e0f8a2fe618145f5672d41b462 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Thu, 8 Dec 2022 17:43:13 +0300 Subject: [PATCH] Remaster waybar config --- configs/sway/config | 5 +-- configs/waybar/config | 27 +++++++++------- configs/waybar/style.css | 67 ++++++++++++++++++++-------------------- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/configs/sway/config b/configs/sway/config index 724e933..fda622a 100644 --- a/configs/sway/config +++ b/configs/sway/config @@ -8,7 +8,7 @@ for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 p set $menu exec $term --class=launcher -e env zsh -c "source ~/.profile && /usr/bin/sway-launcher-desktop" set $filemgr nemo -output * bg ~/.config/sway/magenta_blue.png stretch +output * bg #181924 solid_color input * { xkb_layout us,ru @@ -19,10 +19,7 @@ input * { bar swaybar_command waybar xwayland enable -smart_borders on default_border pixel 1 -hide_edge_borders smart -smart_gaps on gaps inner 8 font "JetBrains Mono" 9 diff --git a/configs/waybar/config b/configs/waybar/config index 8cde3f3..ebfc22d 100644 --- a/configs/waybar/config +++ b/configs/waybar/config @@ -1,8 +1,8 @@ { "position": "top", "modules-left": ["sway/workspaces", "sway/mode"], - "modules-center": ["sway/window"], - "modules-right": ["idle_inhibitor", "network", "cpu", "memory", "pulseaudio", "battery", "sway/language", "clock", "tray"], + "modules-center": [], + "modules-right": ["idle_inhibitor", "cpu", "temperature", "memory", "custom/loadavg", "network", "pulseaudio", "battery", "sway/language", "clock", "tray"], "sway/mode": { "format": "{}" }, @@ -17,15 +17,14 @@ "spacing": 10 }, "clock": { - "format": "{:%H:%M:%S}", - "format-alt": "{:%d.%m.%Y}", + "format": "{:%H:%M:%S %d.%m.%Y}", "interval": 1 }, "pulseaudio": { "scroll-step": 1, - "format": "Vol: {volume}%", - "format-bluetooth": "Vol: {volume}% ", - "format-bluetooth-muted": "Vol: {icon}", + "format": "Volume: {volume}%", + "format-bluetooth": "Volume: {volume}% (BT)", + "format-bluetooth-muted": "Volume: {icon} (BT)", "format-muted": "Vol: {volume}%", "on-click": "pavucontrol" }, @@ -37,14 +36,20 @@ "format": "RAM: {}%", "interval": 1 }, + "custom/loadavg": { + "exec": "cat /proc/loadavg | head -c 14", + "return-type": "{}", + "format": "Load average: {}", + "interval": 1 + }, "temperature": { - "format": "{temperatureC}°C", + "format": "Temperature: {temperatureC}°C", "interval": 1 }, "battery": { - "format": "Bat: {capacity}%", - "format-charging": "Bat: {capacity}% (charging)", - "format-plugged": "Bat: {capacity}% (plugged)", + "format": "Battery: {capacity}%", + "format-charging": "Battery: {capacity}% (charging)", + "format-plugged": "Battery: {capacity}% (plugged)", "interval": 10 }, "network": { diff --git a/configs/waybar/style.css b/configs/waybar/style.css index 7826a19..57a6c0c 100644 --- a/configs/waybar/style.css +++ b/configs/waybar/style.css @@ -3,23 +3,34 @@ font-family: "JetBrains Mono", "Noto Sans"; font-size: 9pt; border: none; + border-radius: 0; font-weight: 400; - padding: 1 1px; + padding: 1px 1px; } window#waybar { - background-color: @base; - color: @yellow; + /*background-color: @base;*/ + color: transparent; + background: transparent; + padding-left: 16px; + padding-right: 16px; + margin-top: 8px; + border-radius: 32px; +} + +#workspaces { + background: @base; + transition: none; + border-radius: 32px; + color: @subtext0; + margin: 8px 8px 0; } #workspaces button { - background-color: transparent; - border-radius: 2px; - color: @subtext0; - margin: 4px 1px; + border-radius: 32px; } -#workspaces button:hover { +button:hover { color: @red; background-color: @surface1; } @@ -35,34 +46,24 @@ window#waybar { #mode { background-color: @mantle; } -#language, #clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor, #mpd{ - padding: 0 4px; + +.modules-right { + transition: none; + background: @base; color: @text; - background-color: @mantle; - border-radius: 2px; - margin: 4px 1px; + margin: 8px 8px 0; + padding-left: 4px; + padding-right: 4px; + border-radius: 32px; +} + +#language, #clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor, #mpd, #custom-loadavg { + padding: 0 8px; } #window { - color: @yellow; - font-weight: 800; -} - -/* 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; -} - -@keyframes blink { - to { - background-color: #888888; - color: #000000; - } + color: transparent; + background-color: transparent; } #battery.critical:not(.charging) { @@ -81,5 +82,3 @@ label:focus { min-width: 16px; } - -