From 1b41b19c6647ccfd362805b5de5f81b1062fd653 Mon Sep 17 00:00:00 2001 From: denode Date: Wed, 11 Mar 2026 07:51:46 +0100 Subject: [PATCH] added waybar config --- files/battery.sh | 6 +++ files/config | 73 ++++++++++++++++++++++++++++++ files/hyprland.conf | 29 +++++++----- files/hyprlock.conf | 26 +++++------ files/monitors.conf | 0 files/power.sh | 9 ++++ files/song.sh | 9 ++++ files/style.css | 101 ++++++++++++++++++++++++++++++++++++++++++ files/volume-osd.sh | 9 ++++ files/workspaces.conf | 0 10 files changed, 239 insertions(+), 23 deletions(-) create mode 100755 files/battery.sh create mode 100644 files/config create mode 100644 files/monitors.conf create mode 100755 files/power.sh create mode 100755 files/song.sh create mode 100644 files/style.css create mode 100755 files/volume-osd.sh create mode 100644 files/workspaces.conf diff --git a/files/battery.sh b/files/battery.sh new file mode 100755 index 0000000..8f7e278 --- /dev/null +++ b/files/battery.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# check-battery.sh + +if [[ $(cat /sys/class/power_supply/BAT0/capacity) -lt 85 ]]; then + notify-send "⚠️ Akku niedrig!" +fi \ No newline at end of file diff --git a/files/config b/files/config new file mode 100644 index 0000000..9e0b28f --- /dev/null +++ b/files/config @@ -0,0 +1,73 @@ +{ + "height": 30, + "spacing": 4, + + "modules-left": [ + "hyprland/workspaces" + ], + "modules-center":[ + "clock" + ], + + "modules-right": [ + "pulseaudio", + "network", + "battery", + ], + + "clock": { + "format": "{:%H:%M:%S}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "interval": 1 + }, + + "pulseaudio": { + "format": "{volume}% {icon}", + "format-muted": "", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + "on-scroll-up": "pamixer -i 5 && ~/.config/waybar/scripts/volume-osd.sh", + "on-scroll-down": "pamixer -d 5 && ~/.config/waybar/scripts/volume-osd.sh" + }, + + + "cpu": { + "format": "{usage}% " + }, + + "memory": { + "format": "{}% " + }, + + "temperature": { + "critical-threshold": 80, + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + + "network": { + "format-wifi": "{icon}", + "format-ethernet": "", + "format-disconnected": "⚠", + "format-icons": [""], + "tooltip": true, + "on-click": "nm-connection-editor" + }, + + "battery": { + "format": "{icon} {capacity}%", + "format-icons": ["", "", "", "", ""], + "format-time": "{H}h{M}m", + "format-charging": " {icon} {capacity}% - {time}", + "format-full": " {icon} Charged", + "interval": 3, + "states": { + "warning": 25, + "critical": 10 + }, + "tooltip": true, + "on-click": "2" + }, +} diff --git a/files/hyprland.conf b/files/hyprland.conf index 3d296a2..fc97409 100644 --- a/files/hyprland.conf +++ b/files/hyprland.conf @@ -7,7 +7,9 @@ $fileManager = nemo # AUTOSTART # - exec-once = waybar & hyprpaper & swaync + exec-once = waybar & hyprpaper & swaync + exec-once = wl-paste --type text --watch cliphist store + exec-once = wl-paste --type image --watch cliphist store # ENVIRONMENT VARIABLES # env = XCURSOR_SIZE,24 @@ -20,23 +22,23 @@ env = HYPRCURSOR_SIZE,24 # LOOK AND FEEL # general { - gaps_in = 5 - gaps_out = 10 + gaps_in = 3 + gaps_out = 6 border_size = 1 - col.active_border = rgba(171,189,245,1) rgba(171,189,245,1) 45deg + col.active_border = rgba(171,189,245,1) rgba(171,189,245,1) 90deg col.inactive_border = rgba(95,120,200,1) - resize_on_border = false + resize_on_border = true - allow_tearing = false + allow_tearing = true layout = dwindle } #deco decoration { - rounding = 10 + rounding = 5 rounding_power = 2 active_opacity = 0.95 @@ -61,7 +63,8 @@ decoration { #animations animations { - enabled = yes, please :) + enabled = true + #curves # NAME, X0, Y0, X1, Y1 @@ -204,16 +207,22 @@ bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- - # Requires playerctl bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous bindl = ,switch:on:Lid Switch, exec, hyprlock +# own things lol + +bind = ,XF86Display, exec, blueman-manager +bind = ,XF86Tools, exec, kitty +bind = ,XF86Search, exec, pkill wofi || wofi --show drun +bind = ,XF86LaunchA, exec, nwg-displays +bind = ,XF86Explorer, exec, grim -g "$(slurp)" - | swappy -f - +bind = SUPER SHIFT, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy # WINDOWS AND WORKSPACES # - windowrule { name = supress-maximize-events match:class = .* diff --git a/files/hyprlock.conf b/files/hyprlock.conf index 80928af..b9f2b72 100644 --- a/files/hyprlock.conf +++ b/files/hyprlock.conf @@ -1,7 +1,7 @@ # BACKGROUND background { monitor = eDP-1 - path = /home/denode/Pictures/forest01.jpg + path = /home/denode/Pictures/japan03.jpg blur_passes = 0.5 contrast = 1 brightness = 0.5 @@ -24,21 +24,21 @@ input-field { monitor = eDP-1 size = 300, 50 outline_thickness = 2 - inner_color = rgba(88,129,87,0.1) - dots_color = rgba(88, 129, 87, 0.85) + inner_color = rgba(0,0,0,0.1) + dots_color = rgba(0, 0, 0, 0.85) dots_size = 0.2 dots_spacing = 0.35 dots_center = true input-fg-color = rgba(88,129,87,0.1) - dots_color = rgba(88,129,87,0.85) - outer_color = rgba(88,129,87,0.85) - font_color = rgba(88,129,87, 0.85) + dots_color = rgba(255,255,255,0.85) + outer_color = rgba(255,255,255,0.85) + font_color = rgba(255,255,255, 0.85) fade_on_empty = true rounding = -1 check_color = rgb(86,65,48) - placeholder_text = input password... + placeholder_text = input password... hide_input = false - fail_color = rgb(218,215,205) + fail_color = rgb(255,255,255) fail_text = bist du blöd? ($ATTEMPTS) position = 0, -468 halign = center @@ -63,7 +63,7 @@ image { label { monitor = text = $USER - color = rgba(88,129,87,0.85) + color = rgba(255,255,255,0.85) font_size = 23 font_family = SF Pro Text position = 0, -405 @@ -74,7 +74,7 @@ label { label { monitor = text = cmd[update:1000] echo "$(LC_TIME=en_US.UTF-8 date +"%A, %B %d")" - color = rgba(52,78,65,1) + color = rgba(0,0,0,1) font_size = 22 font_family = SF Pro Text Bold position = 0, 405 @@ -86,7 +86,7 @@ label { label { monitor = text = cmd[update:1000] echo "$(date +"%-H:%M:%S")" - color = rgba(52,78,65, 1) + color = rgba(0,0,0, 1) font_size = 95 font_family = SF Pro Text Bold position = 0, 310 @@ -100,7 +100,7 @@ label { monitor = text = cmd[update:1000] echo "$(~/.config/waybar/scripts/song.sh)" color = $foreground - color = rgba(88,129,87,0.65) + color = rgba(255,255,255,0.65) font_size = 18 font_family = SF Pro Text position = 0, 50 @@ -110,7 +110,7 @@ label { label { monitor = eDP-1 text = cmd[update:30] bash -c 'ac_online=$(cat /sys/class/power_supply/AC/online); bat0=$(cat /sys/class/power_supply/BAT0/capacity); bat1=$(cat /sys/class/power_supply/BAT1/capacity); avg=$(( (bat0 + bat1) / 2 )); if [ "$ac_online" = "1" ]; then echo " $avg %"; else echo "$avg %"; fi' - color = rgba(88,129,87,0.65) + color = rgba(0,0,0,0.65) font_family = SF Pro Text Bold font_size = 18 position = -10, 1030 diff --git a/files/monitors.conf b/files/monitors.conf new file mode 100644 index 0000000..e69de29 diff --git a/files/power.sh b/files/power.sh new file mode 100755 index 0000000..8968a4b --- /dev/null +++ b/files/power.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +CHOICE=$(echo -e "Shutdown\nReboot\nHyprlock\nSuspend" | wofi --dmenu) +case $CHOICE in + Shutdown) systemctl poweroff ;; + Reboot) systemctl reboot ;; + Hyprlock) hyprctl dispatch dpms off ;; + Suspend) systemctl suspend ;; +esac \ No newline at end of file diff --git a/files/song.sh b/files/song.sh new file mode 100755 index 0000000..08905e0 --- /dev/null +++ b/files/song.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +song=$(playerctl -p spotify metadata --format "{{ artist }} - {{ title }}" 2>/dev/null) + +if [ -n "$song" ]; then + echo "$song" +else + echo "" +fi diff --git a/files/style.css b/files/style.css new file mode 100644 index 0000000..9660a32 --- /dev/null +++ b/files/style.css @@ -0,0 +1,101 @@ +* { + font-family: "Cantarell", "DejaVu Sans", "Symbols Nerd Font", sans-serif; + font-size: 13px; + font-weight: bold; +} + +window#waybar { + background-color: rgba(0, 0, 0, 0.80); + color: #e5e5e5; + border: none; + transition-property: background-color; + transition-duration: 0.3s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +window#waybar.solo { + background-color: rgba(0, 0, 0, 0.80); +} + +button { + border: none; + border-radius: 0; + box-shadow: none; + background: transparent; +} + +button:hover { + background: rgba(0, 0, 0, 0.80); + box-shadow: none; +} + +#workspaces { + margin: 0 6px; +} + +#workspaces button { + padding: 0 8px; + background-color: transparent; + color: #888888; +} + +#workspaces button.active { + background-color: rgba(0, 0, 0, 0.80); + color: #e5e5e5; +} + +#workspaces button:hover { + background-color: rgba(0, 0, 0, 0.80); +} + +#workspaces button.urgent { + background-color: rgba(0, 0, 0, 0.80); + color: #eb4d4b; +} + +#clock, +#battery, +#network, +#pulseaudio { + padding: 4px 10px; +} + +#clock { + font-size: 14px; + color: #ffffff; +} + +#battery { + color: #e5e5e5; +} + +#battery.warning:not(.charging) { + color: #ffa07a; +} + +#battery.critical:not(.charging) { + color: #ff6347; +} + +#network { + color: #e5e5e5; +} + +#network.disconnected { + color: #ff6347; +} + +#pulseaudio { + color: #e5e5e5; +} + +#pulseaudio.muted { + color: #888888; +} + +#tray { + background-color: transparent; +} diff --git a/files/volume-osd.sh b/files/volume-osd.sh new file mode 100755 index 0000000..1d2ef01 --- /dev/null +++ b/files/volume-osd.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +song=$(playerctl -p spotify metadata --format "{{ artist }} - {{ title }}" 2>/dev/null) + +if [ -n "$song" ]; then + echo "$song" +else + echo "no music :)" +fi \ No newline at end of file diff --git a/files/workspaces.conf b/files/workspaces.conf new file mode 100644 index 0000000..e69de29