diff options
Diffstat (limited to 'config')
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 1 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wlogout.sh | 57 | ||||
| -rw-r--r-- | config/wlogout/style.css | 16 |
3 files changed, 61 insertions, 13 deletions
diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 973ca6b6..2bab4b38 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -67,7 +67,6 @@ GDK_BACKEND=$BACKEND yad \ " CTRL Shift R" "Rofi Themes Menu v2" "Choose Rofi Themes via Theme Selector (modified)" \ " SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \ " ALT E" "Rofi Emoticons" "Emoticon" \ -" ALT V" "Clipboard Manager" "cliphist" \ " H" "Launch this Quick Cheat Sheet" "" \ "" "" "" \ "More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""\
\ No newline at end of file diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh index 3f83e51f..f552b83d 100755 --- a/config/hypr/scripts/Wlogout.sh +++ b/config/hypr/scripts/Wlogout.sh @@ -1,4 +1,57 @@ #!/bin/bash -# /* ----------- 💫 https://github.com/JaKooLit 💫 -------- */ # +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# wlogout (Power, Screen Lock, Suspend, etc) -wlogout -p layer-shell -b 3 -c 2
\ No newline at end of file +# Set variables for parameters. First numbers corresponts to Monitor Resolution +# i.e 2160 means 2160p +A_2160=600 +B_2160=600 +A_1600=400 +B_1600=400 +A_1440=400 +B_1440=400 +A_1080=200 +B_1080=200 +A_720=50 +B_720=50 + +# Check if wlogout is already running +if pgrep -x "wlogout" > /dev/null; then + pkill -x "wlogout" + exit 0 +fi + +# Detect monitor resolution and scaling factor +resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}') +hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale') + +# Set parameters based on screen resolution and scaling factor +if ((resolution >= 2160)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 4k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1600 && resolution < 2160)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 2.5k and < 4k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1440 && resolution < 1600)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 2k and < 2.5k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1080 && resolution < 1440)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 1080p and < 2k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 720 && resolution < 1080)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 720p and < 1080p" + wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val & +else + echo "Setting default parameters" + wlogout & +fi diff --git a/config/wlogout/style.css b/config/wlogout/style.css index b8341e9a..ce227160 100644 --- a/config/wlogout/style.css +++ b/config/wlogout/style.css @@ -5,17 +5,15 @@ @import '../../.config/waybar/wallust/colors-waybar.css'; window { - font-family: "FantasqueSansM Nerd Font Mono Bold"; font-size: 24pt; color: @foreground; /* text */ - background-color: rgba(30, 30, 46, 0.6); + background-color: rgba(30, 30, 46, 0.8); } button { - margin: 20px; background-repeat: no-repeat; background-position: center; - background-size: 30%; + background-size: 20%; background-color: rgba(200, 220, 255, 0); animation: gradient_f 10s ease-in infinite; transition: all 0.3s cubic-bezier(.55, 0.0, .28, 1.682), box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; @@ -24,19 +22,17 @@ button { } button:focus { - background-size: 40%; + background-size: 50%; border: 0px; - border-radius: 80px; } button:hover { background-color: transparent; - color: @color11; - background-size: 40%; - margin: -20px; + color: @color13; + background-size: 50%; + margin: 30px; border-radius: 80px; - /*box-shadow: 0 0 30px @color7;*/ } |
