From 153184405361544e095f34ccd29ed7cd3b09685b Mon Sep 17 00:00:00 2001 From: Alexander Bell Date: Tue, 13 May 2025 05:24:09 +0200 Subject: [PATCH] wofi style and wofi power menu on keybind press --- hypr/conf.d/keybinds.conf | 1 + hypr/conf.d/theme.conf | 19 +++++++++---------- hypr/hyprland.conf | 1 + wofi/config | 6 ++++++ wofi/style.css | 39 +++++++++++++++++++++++++++++++++++++++ wofi/wofi-powermenu.sh | 17 +++++++++++++++++ 6 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 wofi/config create mode 100644 wofi/style.css create mode 100755 wofi/wofi-powermenu.sh diff --git a/hypr/conf.d/keybinds.conf b/hypr/conf.d/keybinds.conf index 7f45213..5338e62 100644 --- a/hypr/conf.d/keybinds.conf +++ b/hypr/conf.d/keybinds.conf @@ -10,6 +10,7 @@ bind = $mainMod, RETURN, exec, $terminal bind = $mainMod, B, exec, $browser bind = $mainMod, Y, exec, $filemanager bind = $mainMod, M, exec, $email +bind = $mainMod, XF86AudioMedia, exec, $powerMenu # General binds bind = $mainMod, Q, killactive, diff --git a/hypr/conf.d/theme.conf b/hypr/conf.d/theme.conf index e8fcb31..3f97821 100644 --- a/hypr/conf.d/theme.conf +++ b/hypr/conf.d/theme.conf @@ -7,7 +7,7 @@ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 - gaps_out = 20 + gaps_out = 13 border_size = 2 @@ -26,12 +26,12 @@ general { # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { - rounding = 7 - rounding_power = 7 + rounding = 10 + rounding_power = 10 # Change transparency of focused and unfocused windows - active_opacity = 0.85 - inactive_opacity = 0.85 + active_opacity = 0.87 + inactive_opacity = 0.87 shadow { enabled = true @@ -44,9 +44,8 @@ decoration { blur { enabled = true size = 15 - passes = 2 - - vibrancy = 0.1696 + passes = 3 + vibrancy = 0 } } @@ -90,8 +89,8 @@ windowrules { #windowrule = opaque, instance=gtk-tooltip # Smart gaps - workspace = w[tv1], gapsout:6, gapsin:0 - workspace = f[1], gapsout:6, gapsin:0 + workspace = w[tv1], gapsout:7, gapsin:0 + workspace = f[1], gapsout:7, gapsin:0 windowrule = bordersize 0, floating:0, onworkspace:w[tv1] windowrule = bordersize 0, floating:0, onworkspace:f[1] } diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index c1f57e6..7cf8e6a 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -18,6 +18,7 @@ monitor=,preferred,auto,1.566667 $terminal = kitty $filemanager = kitty -e yazi $menu = wofi --show drun +$powerMenu = bash ~/.config/wofi/wofi-powermenu.sh $browser = firefox $email = thunderbird diff --git a/wofi/config b/wofi/config new file mode 100644 index 0000000..2346006 --- /dev/null +++ b/wofi/config @@ -0,0 +1,6 @@ +allow_images=true +gtk-dark=true +image_size=20 +width=25% +hide-scroll=true +lines=7 diff --git a/wofi/style.css b/wofi/style.css new file mode 100644 index 0000000..9f0a82b --- /dev/null +++ b/wofi/style.css @@ -0,0 +1,39 @@ +window { +margin: 25px; +#border: 1px solid #bd93f9; +background-color: #282a36; +} + +#input { +margin: 15px; +border: none; +color: #f8f8f2; +background-color: #44475a; +} + +#inner-box { +margin: 15px; +border: none; +background-color: #282a36; +} + +#outer-box { +margin: 5px; +border: none; +background-color: #282a36; +} + +#scroll { +margin: 5px; +border: none; +} + +#text { +margin: 5px; +border: none; +color: #f8f8f2; +} + +#entry:selected { +background-color: #44475a; +} diff --git a/wofi/wofi-powermenu.sh b/wofi/wofi-powermenu.sh new file mode 100755 index 0000000..789a070 --- /dev/null +++ b/wofi/wofi-powermenu.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown" + +selected=$(echo -e $entries|wofi --width 250 --height 240 --dmenu --cache-file /dev/null | awk '{print tolower($2)}') + +case $selected in + logout) + pkill -u kia;; + suspend) + exec systemctl suspend;; + reboot) + exec systemctl reboot;; + shutdown) + exec systemctl poweroff;; + # it used to be poweroff -i +esac