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 +++++++++++++++++++++++++++++++++++++ waybar/config.jsonc | 73 ----------------- waybar/style.css | 49 ----------- 4 files changed, 261 insertions(+), 122 deletions(-) create mode 100644 waybar/.config/waybar/config.jsonc create mode 100644 waybar/.config/waybar/style.css delete mode 100644 waybar/config.jsonc delete mode 100644 waybar/style.css (limited to 'waybar') 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; +} diff --git a/waybar/config.jsonc b/waybar/config.jsonc deleted file mode 100644 index 4c55e55..0000000 --- a/waybar/config.jsonc +++ /dev/null @@ -1,73 +0,0 @@ -{ - "layer": "top", - "position": "top", - "height": 30, - "spacing": 4, - "modules-left": [ - "niri/workspaces" - ], - "modules-center": [ - "clock", - "custom/media", - "custom/layout" - ], - "modules-right": [ - "pulseaudio", - "memory", - "custom/power", - "tray" - ], - - "niri/workspaces": { - "format": "{idx}/10", - "disable-scroll": true - }, - - "clock": { - "format": "[{:%H:%M}]" - }, - - "custom/media": { - "format": "▶ {}", - "max-length": 40, - "interval": 2, - "exec": "playerctl metadata --format '{{ artist }} - {{ title }}' 2>/dev/null", - "on-click": "playerctl play-pause" - }, - - "custom/layout": { - "format": "[{}]", - "interval": 0, - "exec": "niri msg -j keyboard-layouts | jq -r 'if .current_idx == 0 then \"En\" elif .current_idx == 1 then \"Ru\" else .names[.current_idx] end'; niri msg event-stream | while read -r line; do if echo \"$line\" | grep -q 'Keyboard layouts changed'; then niri msg -j keyboard-layouts | jq -r 'if .current_idx == 0 then \"En\" elif .current_idx == 1 then \"Ru\" else .names[.current_idx] end'; fi; done" - }, - - "tray": { - "spacing": 10 - }, - - "pulseaudio": { - "format": "VOL {icon} {volume}%", - "format-muted": "VOL [x_x ] 00%", - "format-icons": [ - "[> ]", - "[=> ]", - "[==> ]", - "[===> ]", - "[====> ]", - "[=====> ]", - "[======> ]", - "[=======>]" - ], - "on-click": "pavucontrol" - }, - - "memory": { - "interval": 5, - "format": "RAM [{percentage:02}%]" - }, - - "custom/power": { - "format": "[ SYS ]", - "on-click": "wlogout -b 2" - } -} diff --git a/waybar/style.css b/waybar/style.css deleted file mode 100644 index 4d7326f..0000000 --- a/waybar/style.css +++ /dev/null @@ -1,49 +0,0 @@ -/* Импортируем цвета, сгенерированные pywal */ -@import "../../.cache/wal/colors-waybar.css"; - -/* Modern Aesthetic Waybar Theme */ -* { - font-family: "JetBrainsMono Nerd Font", "Fira Code", monospace; - font-size: 14px; - border: none; - border-radius: 0; -} - -window#waybar { - /* @background и @foreground берутся из обоев */ - background-color: @background; - color: @foreground; -} - -#workspaces button { - padding: 0 8px; - background: transparent; - color: @color7; -} - -#workspaces button.active { - color: @color2; /* Цвет активного окна из обоев */ - font-weight: bold; -} - -#custom-media, -#custom-workspace, -#clock, -#custom-layout, -#tray, -#pulseaudio, -#memory, -#custom-power { - padding: 0 12px; - color: @foreground; -} - -/* Акценты для отдельных модулей */ -#custom-layout { - color: @color3; -} - -#custom-power { - color: @color1; /* Обычно это красный или яркий цвет из обоев */ - font-weight: bold; -} -- cgit v1.2.3