From 9b8e73c17c2d2128c275093da8f866b43154d17f Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Thu, 25 Jul 2024 15:46:42 +0200 Subject: [PATCH] Added Waybar basic configuration --- waybar/dot-config/waybar/config.jsonc | 92 +++++++++++++++++ waybar/dot-config/waybar/style.css | 143 ++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 waybar/dot-config/waybar/config.jsonc create mode 100644 waybar/dot-config/waybar/style.css diff --git a/waybar/dot-config/waybar/config.jsonc b/waybar/dot-config/waybar/config.jsonc new file mode 100644 index 0000000..90c9c72 --- /dev/null +++ b/waybar/dot-config/waybar/config.jsonc @@ -0,0 +1,92 @@ +{ + "layer": "top", + "position": "top", + "height": 32, + "spacing": 4, + "exclusive": true, + "gtk-layer-shell": true, + "passthrough": false, + "fixed-center": true, + "modules-left": [ + "hyprland/workspaces", + "hyprland/window" + ], + "modules-center": [ + "custom/spotify" + ], + "modules-right": [ + "cpu", + "memory", + "pulseaudio", + "clock", + "clock#simpleclock", + "tray", + "custom/power" + ], + "custom/spotify": { + "format": "{}", + "return-type": "json", + "on-click": "playerctl -p spotify play-pause", + "on-click-right": "spotifatius toggle-liked", + "on-click-middle": "playerctl -p spotify next", + "exec": "spotifatius monitor" + }, + "wlr/workspaces": { + "on-click": "activate", + "format": "{name}", + "all-outputs": true, + "disable-scroll": false, + "active-only": false + }, + "tray": { + "show-passive-items": true, + "spacing": 10 + }, + "clock#simpleclock": { + "tooltip": false, + "format": " {:%H:%M}" + }, + "clock": { + "format": " {:L%a %d %b}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": true, + "interval": 1 + }, + "memory": { + "format": " {used:0.2f}G" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": " muted", + "format-icons": { + "headphone": " ", + "hands-free": "󰂑", + "headset": "󰂑", + "phone": "", + "portable": "", + "car": "", + "default": [ + " ", + " ", + " " + ] + }, + "on-click": "pavucontrol" + }, + "custom/logo": { + "format": "", + "tooltip": false + }, + "custom/sep": { + "format": "|", + "tooltip": false + }, + "custom/power": { + "tooltip": false, + "on-click": "wlogout -p layer-shell &", + "format": "⏻ " + } +} diff --git a/waybar/dot-config/waybar/style.css b/waybar/dot-config/waybar/style.css new file mode 100644 index 0000000..b615b42 --- /dev/null +++ b/waybar/dot-config/waybar/style.css @@ -0,0 +1,143 @@ +* { + min-height: 0; + font-family: Lexend, "Font Awesome 6 Free Solid"; + font-size: 16px; + font-weight: 500; +} + +window#waybar { + transition-property: background-color; + transition-duration: 0.5s; + /* background-color: #1e1e2e; */ + /* background-color: #181825; */ + background-color: rgba(24, 24, 37, 0.6); +} + +window#waybar.hidden { + opacity: 0.5; +} + +#workspaces { + background-color: transparent; +} + +#workspaces button { + all: initial; + min-width: 0; + box-shadow: inset 0 -3px transparent; + padding: 2px 10px; + min-height: 0; + margin: 4px 4px; + border-radius: 8px; + background-color: #181825; + color: #cdd6f4; +} + +#workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; + color: #1e1e2e; + background-color: #cdd6f4; +} + +#workspaces button.active { + color: #1e1e2e; + background-color: #89b4fa; +} + +#workspaces button.urgent { + background-color: #f38ba8; +} + +#clock, +#pulseaudio, +#custom-logo, +#custom-power, +#custom-spotify, +#cpu, +#tray, +#memory, +#window { + min-height: 0; + padding: 2px 10px; + border-radius: 8px; + margin: 4px 4px; + background-color: #181825; +} + +#custom-sep { + padding: 0px; + color: #585b70; +} + +#custom-spotify.playing { + color: #cdd6f4; +} + +#custom-spotify.liked { + color: #f9e2af; +} +#custom-spotify.added { + color: #cba6f7; +} + +#custom-spotify.removed { + color: #f38ba8; +} + +#custom-spotify.paused { + color: #9399b2; +} + +window#waybar.empty #window { + background-color: transparent; +} + +#cpu { + color: #94e2d5; +} + +#memory { + color: #cba6f7; +} + +#clock { + color: #74c7ec; +} + +#clock.simpleclock { + color: #89b4fa; +} + +#window { + color: #a6e3a1; +} + +#pulseaudio { + color: #b4befe; +} + +#pulseaudio.muted { + color: #a6adc8; +} + +#custom-logo { + color: #89b4fa; +} + +#custom-power { + color: #f38ba8; + padding-right: 5px; + font-size: 14px; +} + +@keyframes blink { + to { + background-color: #f38ba8; + color: #181825; + } +} + +tooltip { + border-radius: 8px; +}