From 090a0186f90fc7768d657197f234bb9bcfb3d081 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Wed, 23 Jul 2025 10:03:41 +0200 Subject: [PATCH] updated waybar and uswm for hyprland --- hypr/hyprland.conf | 11 +++-- hypr/hyprpaper.conf | 4 +- mimeapps.list | 2 + waybar/config.jsonc | 24 ++++++++-- waybar/style.css | 111 ++++++++++++++++++++++++++++++++++++------- waybar/style.css.bak | 81 +++++++++++++++++++++++++++++++ 6 files changed, 204 insertions(+), 29 deletions(-) create mode 100644 waybar/style.css.bak diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 2f06f4d..717738b 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -50,10 +50,10 @@ $menu = fuzzel # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: -exec-once = systemctl --user start hyprpolkitagent -exec-once = waybar & hyprpaper & -exec-once = nm-applet & -exec-once = nextcloud --background & +exec-once = uwsm app -- waybar +exec-once = uwsm app -- nm-applet +exec-once = uwsm app -- nextcloud --background +exec-once = uwsm app -- rclone mount google_drive: ~/gdrive ############################# @@ -68,6 +68,7 @@ env = XCURSOR_SIZE,24 env = XCURSOR_THEME,Bibata-Modern-Classic env = XDG_CURRENT_DESKTOP,Hyprland env = debug:full_cm_proto=true +env = QT_QPA_PLATFORMTHEME=qt6ct @@ -236,6 +237,7 @@ gestures { # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier +bind = , PRINT, exec, gscreenshot -c -s # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, $terminal bind = $mainMod SHIFT, Q, killactive, @@ -247,7 +249,6 @@ bind = $mainMod, F, fullscreen, bindr = $mainMod, SPACE, exec, $menu bind = $mainMod, P, exec, ~/.config/hypr/scripts/powermenu.sh & # bind = $mainMod, J, togglesplit, # dwindle -bind = , PRINT, exec, gscreenshot -c -s # Move focus with mainMod + arrow keys bind = $mainMod, h, movefocus, l diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 189a0f5..ca20c7c 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,2 +1,2 @@ -preload = ~/Pictures/wallpaper.png -wallpaper = ,~/Pictures/wallpaper.png +preload = ~/Pictures/red_moon-mocha.jpg +wallpaper = ,~/Pictures/red_moon-mocha.jpg diff --git a/mimeapps.list b/mimeapps.list index c5a6bba..eb55f3b 100644 --- a/mimeapps.list +++ b/mimeapps.list @@ -1,5 +1,7 @@ [Default Applications] application/pdf=org.pwmt.zathura-pdf-poppler.desktop +image/jpeg=feh.desktop [Added Associations] application/pdf=org.pwmt.zathura-pdf-poppler.desktop; +image/jpeg=feh.desktop; diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 34b8002..cbbe8f5 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -4,8 +4,8 @@ "position": "top", "height": 35, "modules-left": ["hyprland/workspaces", "hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["tray", "pulseaudio", "network", "cpu", "memory", "custom/tlp", "battery", "custom/power"], + "modules-center": [], + "modules-right": ["tray", "wireplumber", "network", "cpu", "memory", "custom/tlp", "battery", "clock", "custom/power"], "hyprland/workspaces": { "format": "{icon}", @@ -21,18 +21,32 @@ "tooltip-format": "{:%Y %B}\n{calendar}" }, "cpu": { - "format": "CPU:{usage}%", + "format": "CPU: {usage}%", "tooltip": true }, "memory": { - "format": "MEM:{}%" + "format": "MEM: {}%" }, "network": { - "format-wifi": "{essid} ({signalStrength}): {ipaddr}", + "format-wifi": "{essid} ({signalStrength}%): {ipaddr}", "format-ethernet": "{ifname}: {ipaddr}", "format-disconnected": "Disconnected", "tooltip-format": "{ifname} via {gwaddr}", }, + "wireplumber": { + "format": "{icon} {volume}%", + "format-bluetooth": "󰂰", + "nospacing": 1, + "tooltip-format": "Volume : {volume}%", + "format-muted": "󰝟", + "format-icons": { + "headphone": "", + "default": ["󰖀","󰕾",""] + }, + "on-click": "pamixer -t", + "scroll-step": 1 + }, + "pulseaudio": { "format": "{icon} {volume}%", "format-muted": " Muted", diff --git a/waybar/style.css b/waybar/style.css index f5a09ce..05f9c00 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,46 +1,87 @@ + /* ~/.config/waybar/style.css */ @import "./catppuccin-waybar/themes/mocha.css"; * { - font-family: "0xProto Nerd Font", FontAwesome, sans-serif; - font-size: 14px; - padding: 0 5px; + border: none; + border-radius: 0; + min-height: 0; + font-family: JetBrainsMono Nerd Font; + font-size: 13px; } window#waybar { - background-color: alpha(@base, 0.9); - border-bottom: 3px solid @mauve; - color: @text; + background-color: alpha(@base, 0.6); + margin-right: 10px; + transition-property: background-color; + transition-duration: 0.5s; + color: @text; +} + +window#waybar.hidden { + opacity: 0.5; } #workspaces { - margin-bottom: 5px; } #workspaces button { - padding: 0 5px; - background-color: transparent; - color: @surface2; + all: initial; + /* Remove GTK theme values (waybar #1351) */ + min-width: 0; + /* Fix weird spacing in materia (waybar #450) */ + box-shadow: inset 0 -3px transparent; + /* Use box-shadow instead of border so the text isn't offset */ + padding: 6px 18px; + margin: 6px 3px; + border-radius: 3px; + background-color: alpha(@base, 0.9); + color: @text; } #workspaces button.active { - color: @mauve; - border-bottom: 3px solid @pink; + color: @base; + background-color: @green; } #workspaces button:hover { - background: @surface0; - box-shadow: inherit; - text-shadow: inherit; + box-shadow: inherit; + text-shadow: inherit; + background-color: @teal; + color: @base; +} + +#workspaces button.urgent { + background-color: @red; + color: @base; +} + +#memory, +#cpu, +#custom-power, +#custom-tlp, +#battery, +#backlight, +#wireplumber, +#network, +#clock, +#tray { + border-radius: 4px; + margin: 6px 3px; + padding: 6px 12px; + background-color: @base; + color: @text; } #custom-power { - color: @red; - padding: 0 10px; + margin-right: 6px; + color: @red; } #custom-tlp { padding: 0 10px; + padding-right: 5px; + margin-right: 0; } #custom-tlp.ac { @@ -55,6 +96,7 @@ window#waybar { color: @text; padding: 0 10px; padding-left: 0; + margin-left: 0; } #battery.charging, #battery.plugged { @@ -79,3 +121,38 @@ window#waybar { color: @text; } } + +#memory, +#cpu { + color: @maroon; +} + + +#backlight { + color: @mauve; +} + +#wireplumber { + color: @mauve; +} + +#network { + color: @mauve; + padding-right: 15px; +} + +#clock { + font-family: JetBrainsMono Nerd Font; + color: @mauve; +} + +tooltip { + border-radius: 8px; + padding: 15px; + background-color: @base; +} + +tooltip label { + padding: 5px; + background-color: @base; +} diff --git a/waybar/style.css.bak b/waybar/style.css.bak new file mode 100644 index 0000000..f5a09ce --- /dev/null +++ b/waybar/style.css.bak @@ -0,0 +1,81 @@ +/* ~/.config/waybar/style.css */ +@import "./catppuccin-waybar/themes/mocha.css"; + +* { + font-family: "0xProto Nerd Font", FontAwesome, sans-serif; + font-size: 14px; + padding: 0 5px; +} + +window#waybar { + background-color: alpha(@base, 0.9); + border-bottom: 3px solid @mauve; + color: @text; +} + +#workspaces { + margin-bottom: 5px; +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: @surface2; +} + +#workspaces button.active { + color: @mauve; + border-bottom: 3px solid @pink; +} + +#workspaces button:hover { + background: @surface0; + box-shadow: inherit; + text-shadow: inherit; +} + +#custom-power { + color: @red; + padding: 0 10px; +} + +#custom-tlp { + padding: 0 10px; +} + +#custom-tlp.ac { + color: @green; /* Catppuccin Green for AC power */ +} + +#custom-tlp.bat { + color: @yellow; /* Catppuccin Yellow for Battery power */ +} + +#battery { + color: @text; + padding: 0 10px; + padding-left: 0; +} + +#battery.charging, #battery.plugged { + color: @green; +} + +#battery.warning { + color: @yellow; +} + +#battery.critical { + color: @red; + animation-name: blink; + animation-duration: 0.8s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +@keyframes blink { + to { + color: @text; + } +}