From 86ba0841bce330a0aee6c8fef47f570e721c7034 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Sun, 22 Feb 2026 00:36:35 +0100 Subject: [PATCH] xdd --- dotfiles/waybar/colors.css | 26 --- dotfiles/waybar/colors_latte.css | 26 --- dotfiles/waybar/config.jsonc | 134 --------------- dotfiles/waybar/scripts/mediaplayer.sh | 34 ---- dotfiles/waybar/style.css | 119 ------------- modules/waybar.nix | 226 +++++++++++-------------- 6 files changed, 100 insertions(+), 465 deletions(-) delete mode 100644 dotfiles/waybar/colors.css delete mode 100644 dotfiles/waybar/colors_latte.css delete mode 100644 dotfiles/waybar/config.jsonc delete mode 100755 dotfiles/waybar/scripts/mediaplayer.sh delete mode 100644 dotfiles/waybar/style.css diff --git a/dotfiles/waybar/colors.css b/dotfiles/waybar/colors.css deleted file mode 100644 index 0eb6a82..0000000 --- a/dotfiles/waybar/colors.css +++ /dev/null @@ -1,26 +0,0 @@ -@define-color rosewater #f5e0dc; -@define-color flamingo #f2cdcd; -@define-color pink #f5c2e7; -@define-color mauve #cba6f7; -@define-color red #f38ba8; -@define-color maroon #eba0ac; -@define-color peach #fab387; -@define-color yellow #f9e2af; -@define-color green #a6e3a1; -@define-color teal #94e2d5; -@define-color sky #89dceb; -@define-color sapphire #74c7ec; -@define-color blue #89b4fa; -@define-color lavender #b4befe; -@define-color text #cdd6f4; -@define-color subtext1 #bac2de; -@define-color subtext0 #a6adc8; -@define-color overlay2 #9399b2; -@define-color overlay1 #7f849c; -@define-color overlay0 #6c7086; -@define-color surface2 #585b70; -@define-color surface1 #45475a; -@define-color surface0 #313244; -@define-color base #1e1e2e; -@define-color mantle #181825; -@define-color crust #11111b; diff --git a/dotfiles/waybar/colors_latte.css b/dotfiles/waybar/colors_latte.css deleted file mode 100644 index bb101b1..0000000 --- a/dotfiles/waybar/colors_latte.css +++ /dev/null @@ -1,26 +0,0 @@ -@define-color rosewater #dc8a78; -@define-color flamingo #dd7878; -@define-color pink #ea76cb; -@define-color mauve #8839ef; -@define-color red #d20f39; -@define-color maroon #e64553; -@define-color peach #fe640b; -@define-color yellow #df8e1d; -@define-color green #40a02b; -@define-color teal #179299; -@define-color sky #04a5e5; -@define-color sapphire #209fb5; -@define-color blue #1e66f5; -@define-color lavender #7287fd; -@define-color text #4c4f69; -@define-color subtext1 #5c5f77; -@define-color subtext0 #6c6f85; -@define-color overlay2 #7c7f93; -@define-color overlay1 #8c8fa1; -@define-color overlay0 #9ca0b0; -@define-color surface2 #acb0be; -@define-color surface1 #bcc0cc; -@define-color surface0 #ccd0da; -@define-color base #eff1f5; -@define-color mantle #e6e9ef; -@define-color crust #dce0e8; diff --git a/dotfiles/waybar/config.jsonc b/dotfiles/waybar/config.jsonc deleted file mode 100644 index 6d145d9..0000000 --- a/dotfiles/waybar/config.jsonc +++ /dev/null @@ -1,134 +0,0 @@ -// -*- mode: jsonc -*- -{ - "layer": "top", // Waybar at top layer - "position": "right", // Waybar position (top|bottom|left|right) - "spacing": 4, // Gaps between modules (4px) - "margin-top": 10, - "margin-bottom": 10, - "margin-left": 8, - "margin-right": 8, - "mode": "dock", - "reload_style_on_change": true, - "width": 70, - "output": [ - "DP-1", - "eDP-1", - "LVDS-1" - ], - // Choose the order of the modules - "modules-left": [ - "clock", - "custom/notifications", - "privacy", - "custom/spotify", - "pulseaudio" - ], - "modules-center": [ - "hyprland/workspaces" - ], - "modules-right": [ - "battery", - "tray" - ], - "hyprland/workspaces": { - "format": "{} - {icon}", - "on-click": "activate", - "on-click-right": "close", - "all-outputs": true, - "active-only": false, - "sort-by-number": true, - "format-icons": { - "1": "", - "2": "", - "3": "", - "4": "", - "5": "", - "6": "", - "7": "", - "8": "", - "9": "", - "10": "", - "default": "" - } - }, - "tray": { - "spacing": 10 - }, - "clock": { - "format": "{:%R}", - "format-alt": "{:%d.%m.%Y}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "weeks-pos": "right", - "on-scroll": 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - }, - "actions": { - "on-click-right": "mode", - "on-scroll-up": "tz_up", - "on-scroll-down": "tz_down" - } - } - }, - "network": { - "format-wifi": " ({signalStrength}%)  ", - "format-ethernet": "", - "tooltip-format": "{ifname} via {gwaddr} with {ipaddr}/{cidr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ⚠", - "on-click": "kitty nmtui" - }, - "pulseaudio": { - // "scroll-step": 1, // %, can be a float - "format": "{volume}% {icon}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": "  ", - "format-source": " {volume}% ", - "format-source-muted": "  ", - "format-icons": { - "headphone": "", - "hands-free": " ", - "headset": " ", - "phone": " ", - "portable": " ", - "car": " ", - "default": [ - "", - "", - "" - ] - }, - "on-click": "pavucontrol -t 3", - "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle" - }, - "custom/spotify": { - "format": "{}", - "return-type": "json", - "on-click": "playerctl play-pause --player spotify", - "on-click-right": "killall spotify", - "on-scroll-up": "playerctl next --player spotify", - "on-scroll-down": "playerctl previous --player spotify", - "restart-interval": "0", - "hide-empty-text": true, - "justify": "center", - "max-length": 40, - "exec": "$HOME/.config/waybar/scripts/mediaplayer.sh spotify" - }, - "custom/notifications": { - "format": "{text}", - "on-click-right": "~/.local/bin/check-do-not-disturb.sh change", - "exec": "~/.local/bin/check-do-not-disturb.sh show", - "exec-on-event": "~/.local/bin/check-do-not-disturb.sh show", - "tooltip": false, - "return-type": "text", - "signal": 2 - } -} diff --git a/dotfiles/waybar/scripts/mediaplayer.sh b/dotfiles/waybar/scripts/mediaplayer.sh deleted file mode 100755 index 59703e9..0000000 --- a/dotfiles/waybar/scripts/mediaplayer.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -x - -if [ -z "$1" ]; then - echo "Użycie: $0 " - exit 1 -fi - -player="$1" -playerctl -p "$player" metadata --format "{{status}} {{artist}} - {{title}}" --follow | while read -r line; do - current_status=$(playerctl --player="$player" status 2>/dev/null) - case "$current_status" in - "Playing") - text="" - ;; - "Paused") - text="" - ;; - *) - text="" - ;; - esac - tooltip=$(playerctl --player="$player" metadata --format "{{artist}} - {{title}}" 2>/dev/null) - - tooltip=$(echo "$tooltip" | jq -R .) - - json_text="{\"text\": \"$text\", \"tooltip\": $tooltip }" - echo "$json_text" - - if [[ -n "$text" ]]; then - pkill -SIGRTMIN+1 waybar - fi -done diff --git a/dotfiles/waybar/style.css b/dotfiles/waybar/style.css deleted file mode 100644 index 190c32a..0000000 --- a/dotfiles/waybar/style.css +++ /dev/null @@ -1,119 +0,0 @@ -@import "./colors.css"; - -/* Global styles */ -* { - transition: 0.2s all ease-in-out; - font-size: 14px; - font-family: inherit; - padding: 3px; - margin: 1px 2px; - color: @text; - border-radius: 12px; -} - -*:hover { - text-shadow: none; -} - -/* Window */ -window#waybar { - background-color: @base; - border-radius: 15px; -} - -/* Workspaces */ -#workspaces button { - padding: 2px; - margin: 1px; - background: transparent; - color: @lavender; - box-shadow: inset 0 1.5px; -} - -#workspaces button:hover { - background-color: @surface1; - box-shadow: inset 2px 5px; -} - -#workspaces button.active { - background-color: @surface0; - box-shadow: inset 1px 4px 0 1px; -} - -#workspaces button.urgent { - background-color: @red; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; -} - -/* Clock */ -#clock { - font-style: oblique; - opacity: 1; -} - -/* Modules */ -.modules-left, -.modules-right, -.modules-center { - background-color: @crust; -} - -/* Tray */ -#tray>.needs-attention { - background-color: @red; -} - -/* Custom */ -#custom-spotify:hover { - background-color: @green; -} - -#network:hover { - background-color: @sky; -} - -#custom-notifications:hover { - background-color: @sapphire; -} - -/* Battery */ -#battery { - background-color: @base; -} - -#battery.warning:not(.charging) { - background: @yellow; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; -} - -#battery.charging, -#battery.plugged { - color: @foreground; - background-color: @green; -} - -#battery.critical:not(.charging) { - background-color: @red; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; -} - -@keyframes blink { - to { - background-color: #ff0000; - color: #000000; - } -} diff --git a/modules/waybar.nix b/modules/waybar.nix index c2997fd..5dc8e96 100644 --- a/modules/waybar.nix +++ b/modules/waybar.nix @@ -193,150 +193,124 @@ }; style = '' - @define-color rosewater #f5e0dc; - @define-color flamingo #f2cdcd; - @define-color pink #f5c2e7; - @define-color mauve #cba6f7; - @define-color red #f38ba8; - @define-color maroon #eba0ac; - @define-color peach #fab387; - @define-color yellow #f9e2af; - @define-color green #a6e3a1; - @define-color teal #94e2d5; - @define-color sky #89dceb; - @define-color sapphire #74c7ec; - @define-color blue #89b4fa; - @define-color lavender #b4befe; - @define-color text #cdd6f4; - @define-color subtext1 #bac2de; - @define-color subtext0 #a6adc8; - @define-color overlay2 #9399b2; - @define-color overlay1 #7f849c; - @define-color overlay0 #6c7086; - @define-color surface2 #585b70; - @define-color surface1 #45475a; - @define-color surface0 #313244; - @define-color base #1e1e2e; - @define-color mantle #181825; - @define-color crust #11111b; - /* Global styles */ - * { - transition: 0.2s all ease-in-out; - font-size: 14px; - font-family: inherit; - padding: 3px; - margin: 1px 2px; - color: @text; - border-radius: 12px; - } + /* Global styles */ + * { + transition: 0.2s all ease-in-out; + font-size: 14px; + font-family: inherit; + padding: 3px; + margin: 1px 2px; + color: @text; + border-radius: 12px; + } - *:hover { - text-shadow: none; - } + *:hover { + text-shadow: none; + } - /* Window */ - window#waybar { - background-color: @base; - border-radius: 15px; - } + /* Window */ + window#waybar { + background-color: @base; + border-radius: 15px; + } - /* Workspaces */ - #workspaces button { - padding: 2px; - margin: 1px; - background: transparent; - color: @lavender; - box-shadow: inset 0 1.5px; - } + /* Workspaces */ + #workspaces button { + padding: 2px; + margin: 1px; + background: transparent; + color: @lavender; + box-shadow: inset 0 1.5px; + } - #workspaces button:hover { - background-color: @surface1; - box-shadow: inset 2px 5px; - } + #workspaces button:hover { + background-color: @surface1; + box-shadow: inset 2px 5px; + } - #workspaces button.active { - background-color: @surface0; - box-shadow: inset 1px 4px 0 1px; - } + #workspaces button.active { + background-color: @surface0; + box-shadow: inset 1px 4px 0 1px; + } - #workspaces button.urgent { - background-color: @red; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #workspaces button.urgent { + background-color: @red; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - /* Clock */ - #clock { - font-style: oblique; - opacity: 1; - } + /* Clock */ + #clock { + font-style: oblique; + opacity: 1; + } - /* Modules */ - .modules-left, - .modules-right, - .modules-center { - background-color: @crust; - } + /* Modules */ + .modules-left, + .modules-right, + .modules-center { + background-color: @crust; + } - /* Tray */ - #tray>.needs-attention { - background-color: @red; - } + /* Tray */ + #tray>.needs-attention { + background-color: @red; + } - /* Custom */ - #custom-spotify:hover { - background-color: @green; - } + /* Custom */ + #custom-spotify:hover { + background-color: @green; + } - #network:hover { - background-color: @sky; - } + #network:hover { + background-color: @sky; + } - #custom-notifications:hover { - background-color: @sapphire; - } + #custom-notifications:hover { + background-color: @sapphire; + } - /* Battery */ - #battery { - background-color: @base; - } + /* Battery */ + #battery { + background-color: @base; + } - #battery.warning:not(.charging) { - background: @yellow; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #battery.warning:not(.charging) { + background: @yellow; + color: @foreground; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - #battery.charging, - #battery.plugged { - color: @foreground; - background-color: @green; - } + #battery.charging, + #battery.plugged { + color: @foreground; + background-color: @green; + } - #battery.critical:not(.charging) { - background-color: @red; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #battery.critical:not(.charging) { + background-color: @red; + color: @foreground; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - @keyframes blink { - to { - background-color: #ff0000; - color: #000000; - } - } + @keyframes blink { + to { + background-color: #ff0000; + color: #000000; + } + } ''; };