From 5c1de7d0770c7bccfb2394becb52cf681754f9d8 Mon Sep 17 00:00:00 2001 From: lorenzhohermuth Date: Wed, 29 Jan 2025 15:58:02 +0100 Subject: [PATCH] update --- .config/hypr/hyprland.conf | 2 ++ .config/waybar/config | 26 +++++++++++++++++++++++- .config/waybar/ha_menu.xml | 31 +++++++++++++++++++++++++++++ .config/waybar/power_menu.xml | 37 ++++++++++++++++++++--------------- .config/waybar/style.css | 9 ++++++++- 5 files changed, 87 insertions(+), 18 deletions(-) create mode 100644 .config/waybar/ha_menu.xml diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index e6f6119..a083ba6 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -24,6 +24,7 @@ $terminal = kitty -e tmux $fileManager = pcmanfm $menu = rofi -modi drun,run -show drun +$sudomenu = rofi -modi drun,run -show drun -run-command 'lxsu {cmd}' ################# @@ -187,6 +188,7 @@ bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = SUPER_SHIFT, SPACE, togglefloating, bind = $mainMod, D, exec, $menu +bind = SUPER_SHIFT, D, exec, $sudomenu bind = $mainMod, P, exec, kanshi bind = $mainMod, S, togglesplit, # dwindle diff --git a/.config/waybar/config b/.config/waybar/config index 4687b49..f67a05f 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -8,13 +8,14 @@ "hyprland/submap", ], "modules-center": [ - "hyprland/window" ], "modules-right": [ + "custom/homeassistant", "pulseaudio", "cpu", "memory", "battery", + "network", "clock", "tray", "custom/power", @@ -71,6 +72,18 @@ "format-plugged": "{capacity}% ", "format-icons": ["", "", "", "", ""] }, + "network": { + "interface": "wlp0s20f3", + "format": "{essid} ({signalStrength}%)  ", + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} 󰊗", + "format-disconnected": "", //An empty format will hide the module. + "tooltip-format": "{ifname} via {gwaddr} 󰊗", + "tooltip-format-wifi": "{essid} ({signalStrength}%) ", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + "max-length": 50 + }, "pulseaudio": { "format": "{volume}% {icon} {format_source}", "format-muted": "󰝟 {format_source}", @@ -95,5 +108,16 @@ "suspend": "hyprlock & systemctl suspend", "hibernate": "hyprlock & systemctl hibernate" } + }, + + "custom/homeassistant": { + "format" : "󰟐 ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/ha_menu.xml", + "menu-actions": { + "mood-relax": "/home/lorenz/go/bin/home-assistant -m relax", + "mood-off": "/home/lorenz/go/bin/home-assistant -m off", + } } } diff --git a/.config/waybar/ha_menu.xml b/.config/waybar/ha_menu.xml new file mode 100644 index 0000000..9fddfd0 --- /dev/null +++ b/.config/waybar/ha_menu.xml @@ -0,0 +1,31 @@ + + + + + + + + Mood + + + + + + Relax + + + + + + Off + + + + + + + + + + + diff --git a/.config/waybar/power_menu.xml b/.config/waybar/power_menu.xml index aa2a42c..9ddb0a6 100644 --- a/.config/waybar/power_menu.xml +++ b/.config/waybar/power_menu.xml @@ -2,27 +2,32 @@ - - Suspend - - - - - Hibernate - - - - - Shutdown - + + Suspend + + + + + Hibernate + + + + + + Shutdown + + + + - - Reboot - + + Reboot + + diff --git a/.config/waybar/style.css b/.config/waybar/style.css index cdc7b67..367fb83 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -102,6 +102,8 @@ button:hover { #wireplumber, #custom-media, #custom-power, +#custom-homeassistant, +#network, #tray, #mode, #idle_inhibitor, @@ -146,7 +148,12 @@ button:hover { } } -#custom-power { +#custom-homeassistant { + font-size: 17px; +} + +#custom-power, +#custom-homeassistant { padding: 0px 8px 0px 12px; }