From a9d6537bc817f59f1b2eae83605128cc9cbf1219 Mon Sep 17 00:00:00 2001 From: seraphim <18ycm9tx@anonaddy.me> Date: Mon, 17 Aug 2026 12:28:43 +0700 Subject: waybar+niri changes --- waybar/.config/waybar/config.jsonc | 98 ++++++++++++++++++++++ waybar/.config/waybar/style.css | 163 +++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+) create mode 100644 waybar/.config/waybar/config.jsonc create mode 100644 waybar/.config/waybar/style.css (limited to 'waybar/.config') diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc new file mode 100644 index 0000000..8fe5464 --- /dev/null +++ b/waybar/.config/waybar/config.jsonc @@ -0,0 +1,98 @@ +{ + "exclusive": true, + "reload_style_on_change": true, + "position": "top", + "margin-top": 0, + "spacing": 0, + "height": 0, + "margin-bottom": 0, + "modules-left": [ + "niri/workspaces", + "custom/separator", + "tray", + "custom/separator2", + "custom/separator5", + "custom/media", + "custom/separator6" + ], + "modules-center": ["custom/separator", "custom/clock", "custom/separator2"], + "modules-right": [ + "custom/separator", + "custom/separator3", + "pulseaudio", + "custom/separator3", + "memory", + "custom/separator2" + ], + "niri/workspaces": { + "disable-scroll": true, + "format": "{index}" + }, + "custom/separator": { + "format": "[", + "tooltip": false + }, + "custom/separator2": { + "format": "]", + "tooltip": false + }, + "custom/separator3": { + "format": "󰿟", + "tooltip": false + }, + "custom/separator5": { + "exec": "sh -c 'if pgrep -x cliamp >/dev/null || playerctl status 2>/dev/null | grep -qE \"Playing|Paused\"; then echo \"{\\\"text\\\":\\\"[\\\",\\\"class\\\":\\\"show\\\"}\"; else echo \"{\\\"text\\\":\\\"\\\",\\\"class\\\":\\\"hide\\\"}\"; fi'", + "return-type": "json", + "interval": 2, + "format": "{}" + }, + "custom/separator6": { + "exec": "sh -c 'if pgrep -x cliamp >/dev/null || playerctl status 2>/dev/null | grep -qE \"Playing|Paused\"; then echo \"{\\\"text\\\":\\\"]\\\",\\\"class\\\":\\\"show\\\"}\"; else echo \"{\\\"text\\\":\\\"\\\",\\\"class\\\":\\\"hide\\\"}\"; fi'", + "return-type": "json", + "interval": 2, + "format": "{}" + }, + + "memory": { + "interval": 2, + "format": "RAM {percentage:02}%", + "on-click": "foot btop", + "states": { + "warning": 50, + "critical": 80 + } + }, + "custom/clock": { + "exec": "date +'%H:%M %p - %A, %b %d' | tr '[:upper:]' '[:lower:]'", + "interval": 60, + "tooltip": false + }, + "pulseaudio": { + "justify": "center", + "format": "vol {volume}%", + "on-click": "pavucontrol", + "on-click-right": "pamixer -t", + "tooltip-format": "Playing at {volume}%", + "scroll-step": 5, + "format-muted": "vol muted", + "format-icons": { + "headphone": "", + "default": ["", "", ""] + }, + "states": { + "warning": 50, + "critical": 10 + } + }, + "custom/media": { + "format": "{}", + "max-length": 30, + "interval": 2, + "exec": "playerctl metadata --format '{{ artist }} - {{ title }}' 2>/dev/null || echo \"\"", + "on-click": "playerctl play-pause" + }, + "tray": { + "icon-size": 14, + "spacing": 3 + } +} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..17fc256 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,163 @@ +@import "../../.cache/wal/colors-waybar.css"; +@define-color bg @background; +@define-color fg @foreground; + +* { + border: none; + padding: 0px; + font-family: "JetBrains Mono Nerd Font"; + transition: background-color .3s ease-out; + font-weight: bold; + font-size: 12px; +} + +window#waybar { + background-color: transparent; +} + +#waybar > box { + border-radius: 0px; + border-bottom: 1.5px solid rgba(255, 255, 255, 0.1); + margin: 0px 0px 2px 0px; + background-color: @background; + box-shadow: 0 1px 2px rgba(0, 0, 0, 1); + min-height: 25px; + transition-property: background-color; + transition-duration: .5s; +} + +.modules-left { + margin-left: 4px; +} + +.modules-right { + margin-right: 4px; +} + +#workspaces { + margin: 0px 0px; + transition: 0.1s ease-in-out; + padding: 0px 0px; +} + +#workspaces button { + all: initial; + padding: 0px 4px; + margin: 4px 2px; + min-width: 10px; + color: @foreground; + opacity: 1; + font-weight: 900; +} + +#workspaces button.active { + color: @background; + background-color: #df6124; + padding: 0px 4px; + margin: 4px 2px; + opacity: 1.0; +} + +#workspaces button.empty:hover, +#workspaces button:hover { + background: transparent; + color: alpha(@foreground, 1); + transition: all 150ms ease; + opacity: 0.75; +} + +#workspaces button.empty { + opacity: 0.4; + padding: 0px 4px; + margin: 4px 2px; + color: alpha(@foreground, 0.45); +} + +#workspaces button.empty.active { + opacity: 1; + background-color: @foreground; + color: @background; +} + +#memory, +#custom-media, +#tray, +#cpu, +#custom-clock, +#bluetooth, +#pulseaudio { + min-width: 12px; + padding: 0 4px; + margin: 1px 3px 1px 3px; + opacity: 1; +} + +#tray { + opacity: 1; + padding-top: 2px; +} + +#custom-separator6, +#custom-separator5, +#custom-separator4, +#custom-separator3, +#custom-separator2, +#custom-separator { + opacity: 0.2; + padding-top: 2px; + padding-left: 2px; + padding-right: 2px; + font-size: 14px; +} + +tooltip { + padding: 2px; +} + +.hidden { + opacity: 0; +} + +tooltip { + padding: 4px; + background: @background; + font-size: 10px; + border: 1.5px solid alpha(@foreground, 0.6); + border-radius: 8px; +} + +tooltip label { + color: alpha(@foreground, 0.65); + font-weight: normal; +} + +#custom-media { + opacity: 1; + color: @foreground; + animation: repeat; + animation-name: blink; + animation-duration: 3s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +@keyframes blink { + to { + color: #4a4a4a; + } +} + +#pulseaudio.warning, +#memory.warning, +#cpu.warning { + color: #e3c1b1; + background-color: @background; +} + +#pulseaudio.critical, +#memory.critical, +#cpu.critical { + color: #df6124; + background-color: @background; +} -- cgit v1.2.3