From 6f3c9265ca696e95a8fac28bbd9805af3e2a12a5 Mon Sep 17 00:00:00 2001 From: Tobias Maier Date: Sun, 7 Aug 2022 20:34:35 +0200 Subject: [PATCH] New waybar --- waybar/style.css | 306 ++++++++++++++++++++++++++----------------- waybar/waybar.config | 271 ++++++++++++++++++++++++++------------ 2 files changed, 374 insertions(+), 203 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index ca21b82..2994af9 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,158 +1,220 @@ * { - border: none; - border-radius: 0; - font-family: "JetbrainsMono Nerd Font"; - font-size: 14px; + font-family: JetBrainsMonoNL, "Font Awesome 6 Brands", "Font Awesome 6 Free", Helvetica, Arial, sans-serif; + font-size: 14px; + padding: 3px 0px; } window#waybar { - background: none; -} - -window#waybar.hidden { - opacity: 0.2; -} - -#window { - margin-top: 6px; - padding-left: 10px; - padding-right: 10px; - border-radius: 5px; - transition: none; - background: #2e3440; - color: #d8dee9; -} - -#custom-powermenu { - margin-top: 6px; - margin-left: 12px; - margin-right: 12px; - padding-left: 15px; - padding-right: 20px; - border-radius: 5px; - transition: none; - background: #2e3440; + background-color: rgba(64, 70, 71, 0.95); + margin: 0; + border-radius: 0px 0px 15px 15px; + color: #d8dee9; + transition-property: background-color; + transition-duration: .5s; } #tags { - margin-top: 6px; - margin-right: 12px; - font-size: 4px; - border-radius: 5px; - transition: none; - background: #2e3440; + background-color: #d8dee9; + border-radius: 0px 0px 15px 15px; + padding: 0px 15px 0px 15px; + box-shadow: 0px -4px 0px 0px #d8dee9; + color: #1b1b1b; } #tags button { - transition: none; - color: #4c566a; - background: transparent; - border-radius: 0px; -} - -#tags button.occupied { - transition: none; - color: #a3be8c; - background: transparent; - font-size: 4px; -} - -#tags button.focused { - color: #81a1c1; - border-bottom: 2px solid #81a1c1; + color: #1b1b1b; + margin: 0.5px 2px; + padding: 0px 7px 0px 7px; } #tags button:hover { - transition: none; - box-shadow: inherit; - text-shadow: inherit; - color: #81a1c1; + background: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -2px #2b2b2b; + color: #2b2b2b; } -#temperature { - margin-top: 6px; - margin-right: 12px; - border-radius: 5px; - transition: none; - padding: 0 10px; - color: #a3be8c; - background: #2e3440; +#tags button.occupied { + color: #2b2b2b; + box-shadow: inset 0 -3px #2b2b2b; } -#pulseaudio { - margin-top: 6px; - margin-left: 12px; - border-radius: 5px; - transition: none; - padding: 0 10px; - color: #a3be8c; - background: #2e3440; +#tags button.focused { + background-color: #64727d; + color: #d8dee9; + box-shadow: inset 0 -4px #2b2b2b; +} + +#mode { + background-color: #64727D; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#cpu, +#custom-start, +#custom-power, +#custom-warp, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#mpd { + padding: 0px 15px 0px 15px; + color: #ffffff; +} + +#window, +#workspaces { + margin: 0px 0px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #custom-start { + margin-left: 10px; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #custom-power { + margin-right: 10px; +} + +#clock { + padding: 0px 15px 0px 15px; + border-radius: 15px; + background-color: #1b1b1b; } #battery { - margin-top: 6px; - margin-left: 12px; - border-radius: 5px; - transition: none; - padding: 10px 10px; - color: #a3be8c; - background: #2e3440; + border-radius: 15px; + padding: 0px 15px 0px 15px; + background-color: #301b1c; + color: #0cf7e8; } -#battery.critical:not(.charging) { - background-color: #d8dee9; - color: #2e3440; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; +#battery.charging, #battery.plugged { + color: #ffffff; + background-color: #1b2a30; } @keyframes blink { - to { - background-color: #bf616a; - color: #d8dee9; - } + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f52f2f; + color: #f4f714; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#cpu { + border-radius: 15px; + padding: 0px 15px 0px 15px; + background-color: #1b1b1b; + color: #d8dee9; +} + +#memory { + border-radius: 15px; + padding: 0px 15px 0px 15px; + background-color: #1b1b1b; } #backlight { - margin-top: 6px; - margin-left: 12px; - border-radius: 5px; - transition: none; - padding: 10px 10px; - color: #88c0d0; - background: #2e3440; + border-radius: 15px; + background-color: #1b1b1b; } -#custom-cpu { - margin-top: 6px; - margin-left: 12px; - border-radius: 5px; - transition: none; - padding: 10px 10px; - color: #88c0d0; - background: #2e3440; +#network { + border-radius: 15px; + padding: 0px 15px 0px 15px; + background-color: #1b1b1b; + color: #0cf7e8; } -#custom-clock { - margin-top: 6px; - margin-left: 12px; - margin-right: 12px; - border-radius: 5px; - transition: none; - padding: 10px 10px; - color: #a3be8c; - background: #2e3440; +#network.disconnected { + border-radius: 15px; + background-color: #1b1b1b; + color: #4c666a; +} + +#pulseaudio { + background-color: #1b1b1b; + border-radius: 15px; + padding: 0px 15px 0px 15px; + color: #d8dee9; +} + +#pulseaudio.muted { + background-color: #1b1b1b; + color: #4c666a; } #tray { - margin-top: 6px; - margin-right: 12px; - border-radius: 5px; - padding-left: 10px; - padding-right: 10px; - color: #d8dee9; - background: #2e3440; + border-radius: 15px; + padding: 5px 15px 5px 15px; + background-color: #1b1b1b; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #f52f2f; +} + +#mpd { + border-radius: 15px; + padding: 5px 15px 5px 15px; + background-color: #1b1b1b; + color: #d8dee9; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #4c666a; +} + +#custom-start { + border-radius: 15px; + padding: 0px 15px 0px 15px; + background-color: #2b2b2b; + color: #14b3f7; +} + +#custom-power { + padding: 0px 15px 0px 15px; + border-radius: 15px; + font-size: 25px; + background-color: #301b1c; + color: #24c796; +} + +#custom-warp { + padding: 0px 15px 0px 15px; + border-radius: 15px; + background-color: #071a24; + color: #d8dee9; } \ No newline at end of file diff --git a/waybar/waybar.config b/waybar/waybar.config index 1758a22..3efa940 100644 --- a/waybar/waybar.config +++ b/waybar/waybar.config @@ -1,83 +1,192 @@ { - "layer": "top", - "modules-left": ["custom/powermenu", "river/tags", "temperature"], - "modules-center": ["river/window"], - "modules-right": ["battery","backlight", "pulseaudio", "custom/mic","custom/cpu","custom/clock", "tray"], - "pulseaudio": { - "tooltip": false, - "scroll-step": 5, - "format": "{icon} {volume}%", - "format-muted": "婢 0%", - "on-click":"amixer -D pulse Master 1+ toggle", - "scroll-step": 5, - "format-icons": { - "default": ["", "", ""] - } - }, - "custom/powermenu": { - "format": "", - "interval": "once", - /*"exec": "checkupdates | wc -l",*/ - "on-click": "~/.config/waybar/modules/powermenu.sh", - "tooltip": false, - "signal": 8 - }, - - "river/tags": { - "tag-labels":[ - "", - "", - "ﭮ", - "", - "", - "", - "" - ], - "disable-click": false, - "num-tags": 7 - }, - "temperature": { - "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "format": "{temperatureC}°C " - }, - "river/window": { - "format": "{}", - "max-length": 90 - }, - "backlight": { - "device": "amdgpu_b10", - "format": "{icon} {}%", - "format-icons": ["", ""], - "interval": 1 - }, - "battery": { - "states": { - "good": 100, - "warning": 30, - "critical": 20 - }, - "format": "{icon} {capacity}%", - "format-charging": "{icon} {capacity}%", - "format-plugged": "{icon} {capacity}%", - "format-alt": "{time} {icon}", - "format-icons": ["", "", "", "", ""] - }, - "tray":{ - "icon-size":18, - "show-passive-items":true, - "spacing": 10, - "reverse-direction": true - }, - "custom/clock": { - "interval": 1, - "return-type": "string", - "exec": "~/.config/waybar/modules/datetime.sh", - "tooltip": false - }, - "custom/cpu": { - "interval": 1, - "return-type": "string", - "exec": "~/.config/waybar/modules/cpu.sh", - "tooltip": false - }, + // asd + "width": 1900, + "spacing": 7, + "mode": "dock", + "modules-center": [ + "river/tags", + "wlr/workspaces" + ], + "modules-left": [ + "custom/start", + "mpd", + "clock", + "memory", + "cpu", + "tray" + ], + "modules-right": [ + "custom/warp", + "network", + "pulseaudio", + "backlight", + "battery", + "custom/power" + ], + "river/tags": { + "tag-labels": [ + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "keyboard-state": { + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "wlr/workspaces": { + "sort-by-coordinates": true, + "sort-by-name": true, + "on-click": "activate", + "format": "{icon}", + "format-icons": { + "default": "", + "active": "", + "urgent": "" + }, + "active-only": false + }, + "wlr/taskbar": { + "format": "{icon}", + "on-click": "activate", + "icon-theme": "Vimix-Beryl-dark" + }, + "tray": { + "spacing": 10 + }, + "clock": { + "timezone": "Asia/Kolkata", + "format": " {:%a, %b %d, %H:%M}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": " {:%A, %B %d, %Y, %H:%M}" + }, + "cpu": { + "interval": 5, + "format": " {usage}% ({avg_frequency} GHz)", + "tooltip": false + }, + "memory": { + "interval": 5, + "format": " {}%" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + // "format-critical": "{temperatureC}°C {icon}", + "critical-threshold": 80, + "format": "{temperatureC}°C {icon}", + "format-icons": [ + "", + "", + "" + ] + }, + "backlight": { + "format": " {percent}%" + //"format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "interval": 15 + }, + "network": { + "format-wifi": " {bandwidthDownBytes} ({signalStrength}%)", + "format-ethernet": " {ipaddr}/{cidr}", + "tooltip-format": " {ifname} via {gwaddr}", + "tooltip-format-wifi": "{ifname} {essid} via {gwaddr} ip: {ipaddr}", + "format-linked": " {ifname} (No IP)", + "format-disconnected": "", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": " {icon} {volume}% | {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " | {format_source}", + "format-source": " {volume}%", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "default": [ + "", + "", + "" + ] + }, + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle" + }, + "custom/start": { + "format": "", + "on-click": "wofi --show drun", + "tooltip": false + }, + "custom/power": { + "format": "⏻", + "on-click": "~/.config/river/scripts/rofi-logout-menu", + "tooltip": false + }, + "custom/warp": { + "exec": "~/.local/bin/mywarp --show-icon", + "interval": 2, + "format": {}, + "exec-on-event": true, + "on-click": "~/.local/bin/mywarp --toggle", + "tooltip": false + }, + "mpd": { + "format": "{stateIcon} {consumeIcon} {randomIcon} {repeatIcon} {singleIcon} ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "interval": 2, + "consume-icons": { + "on": " " // Icon shows only when "consume" is on + }, + "random-icons": { + "off": " ", // Icon grayed out when "random" is off + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)", + "on-click": "mpc toggle", + "on-click-right": "mpc stop", + "on-scroll-up": "mpc next", + "on-scroll-down": "mpc prev", + "smooth-scrolling-threshold": 3 + } } \ No newline at end of file