From 94313952fe5f0cef886c55a9995f3c94903efe0a Mon Sep 17 00:00:00 2001 From: Derisis13 Date: Sat, 2 Nov 2024 12:23:38 +0100 Subject: [PATCH] feat: waybar cofig based on catpuccin & Kosmx's config --- waybar/config | 19 ++++++ waybar/macchiato.css | 26 ++++++++ waybar/modules.jsonc | 129 +++++++++++++++++++++++++++++++++++++++ waybar/style.css | 140 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 314 insertions(+) create mode 100644 waybar/config create mode 100644 waybar/macchiato.css create mode 100755 waybar/modules.jsonc create mode 100644 waybar/style.css diff --git a/waybar/config b/waybar/config new file mode 100644 index 0000000..019a97a --- /dev/null +++ b/waybar/config @@ -0,0 +1,19 @@ +{ + "layer": "top", + "position": "top", + "include": [ + "~/.config/waybar/modules.jsonc" + ], + "height": 20, + "margin-left": 3, + "margin-right": 3, + "margin-top": 3, + "margin-bottom": 3, + "modules-left": ["custom/junkyard", "hyprland/workspaces"], + "modules-center": ["clock"], + "modules-right": ["tray", "custom/notification", "pulseaudio", "bluetooth", "network", "backlight", "battery"], + "tray": { + "icon-size": 16, + "spacing": 10 + }, +} diff --git a/waybar/macchiato.css b/waybar/macchiato.css new file mode 100644 index 0000000..0b9c43c --- /dev/null +++ b/waybar/macchiato.css @@ -0,0 +1,26 @@ +@define-color rosewater #f4dbd6; +@define-color flamingo #f0c6c6; +@define-color pink #f5bde6; +@define-color mauve #c6a0f6; +@define-color red #ed8796; +@define-color maroon #ee99a0; +@define-color peach #f5a97f; +@define-color yellow #eed49f; +@define-color green #a6da95; +@define-color teal #8bd5ca; +@define-color sky #91d7e3; +@define-color sapphire #7dc4e4; +@define-color blue #8aadf4; +@define-color lavender #b7bdf8; +@define-color text #cad3f5; +@define-color subtext1 #b8c0e0; +@define-color subtext0 #a5adcb; +@define-color overlay2 #939ab7; +@define-color overlay1 #8087a2; +@define-color overlay0 #6e738d; +@define-color surface2 #5b6078; +@define-color surface1 #494d64; +@define-color surface0 #363a4f; +@define-color base #24273a; +@define-color mantle #1e2030; +@define-color crust #181926; diff --git a/waybar/modules.jsonc b/waybar/modules.jsonc new file mode 100755 index 0000000..118cb6b --- /dev/null +++ b/waybar/modules.jsonc @@ -0,0 +1,129 @@ +{ + + //*************************** + //* Modules configuration * + //*************************** + + "custom/junkyard": { + "format": " 󰕮 ", + "on-click": "hyprctl dispatch togglespecialworkspace" + }, + + "hyprland/workspaces": { + "format": "{name}", + "tooltip-format": "{title}", + "on-scroll-up": "hyprctl dispatch workspace r+1", + "on-scroll-down": "hyprctl dispatch workspace r-1", + "on-click": "activate" + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%a, %d %b, %R}", + "on-click": "" + }, + + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + //"reverse-scrolling": 1, + "format": "{icon} {volume}% {format_source}", + "format-bluetooth": "{icon}  {volume}% {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": "婢 {format_source}", + "format-source": " {volume}%", + "format-source-muted": "", + "format-icons": { + "headphone": "󰋋", + "hands-free": "", + "headset": "󰋎", + "phone": "", + "portable": "", + "car": "", + "default": ["󰸈", "󰕿", "󰖀", "󰕾"] + }, + "on-click": "~/.config/rofi/applets/bin/volume.sh", + "on-click-right": "pavucontrol" + }, + + "bluetooth": { + "format": "", + "format-disabled": "", + "format-connected": " {num_connections}", + "tooltip-format-enumerate-connected": "{device_alias}", + "tooltip-format-connected": "{device_enumerate}", + "on-click": "blueman-manager" + }, + + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", "", "", ""], + "tooltip": false + }, + + "tray": { + "icon-size": 13, + "spacing": 00 + }, + + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + //"on-click": "sh -c 'sleep 0.1s; swaync-client -t -sw; sleep 0.1s'", + "on-click-release": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + + "backlight": { + "device": "acpi_video0", + "format": "{icon}", + "format-icons": ["󰃞", "󰃟", "󰃠"], + "on-click": "~/.config/rofi/applets/bin/brightness.sh" + }, + + "battery": { + "states": { + "warning": 20, + "critical": 5 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% 󰂄", + "format-plugged": "{capacity}% 󰚥", + "format-alt": "{time} {icon}", + "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂁", "󰁹"], + "on-click": "~/.config/rofi/applets/bin/powermenu.sh" + }, + "battery#bat0": { + "bat": "BAT0" + }, + "network": { + "format-wifi": "{icon}", + "format-ethernet": "󰈀", + "format-linked": "󰤩", + "format-disconnected": "󰤮", + "tooltip-format": "{ifname}", + "tooltip-format-wifi": "{essid} {signaldBm}dBm | Downlink: {bandwidthDownBits}, Uplink: {bandwidthUpBits}", + "tooltip-format-ethernet": "{essid} | Downlink: {bandwidthDownBits}, Uplink: {bandwidthUpBits} | IP: {ipaddr} GW:{gwaddr}", + "tooltip-format-disconnected": "Disconnected", + "format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], + "on-click": "~/.config/rofi/applets/bin/rofi-wifi-menu.sh", + "on-click-right": "nm-connection-editor" + } +} diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..713569b --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,140 @@ +@import 'macchiato.css'; +* { + font-family: "Fira Sans Book"; + font-size: 16px; + min-width: 15px; +} + +window#waybar { + background-color: transparent; +} + +window#waybar.hidden { + opacity: 0.5; +} + +button { + box-shadow: inset 0 -3px transparent; + border: none; + border-radius: 10px; +} + + +#workspaces button.active { + background-color: @blue; + border: 1px solid @blue; + border-radius: 10px; + color: @base; +} + +#workspaces button.urgent { + background-color: @red; + border: 1px solid @red; + border-radius: 10px; + color: @base; +} + +#clock, +#battery{ + background-color: @base; /* Change this to any gray color you want */ + border-radius: 10px; /* Adjust as needed */ + padding: 3px 10px; + color: @text; +} + +#mpd { + padding: 0 10px; + color: @subtext1; +} + +#tray { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 10px 0px 0px 10px; /* Adjust as needed */ + padding: 3px 10px; + color: @text; +} + +#custom-notification, +#pulseaudio, +#network, +#bluetooth { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 0px; /* Adjust as needed */ + padding: 3px 7px; + color: @text; + margin: 0px; +} + +#backlight { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 0px 10px 10px 0px; /* Adjust as needed */ + padding: 3px 10px; + color: @text; +} + +#custom-junkyard { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 10px 0px 0px 10px; /* Adjust as needed */ + padding: 3px 10px; + color: @text; +} + +#workspaces { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 0px 10px 10px 0px; /* Adjust as needed */ + padding: 3px 10px; + color: @text; +} + + +#clock { + background-color: @base; /* Change this to any gray color you want */ + border-radius: 10px; + padding: 3px 10px; + color: @text; +} + +#battery { + background-color: @base; /* Change this to any gray color you want */ + color: @text; + margin-left: 7px; +} + +#battery.charging, #battery.plugged { + color: @base; + background-color: @teal; + border-radius: 10px; + padding: 3px 10px; +} + +@keyframes blink { + to { + background-color: @subtext1; + color: @crust; + } +} + +#battery.critical:not(.charging) { + background-color: @red; + color: @subtext1; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + border-radius: 10px; + padding: 3px 10px; +} + +label:focus { + background-color: @crust; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @red; +}