#!/usr/bin/env bash # https://github.com/zDyanTB/HyprNova/blob/master/.config/hypr/scripts/wlogout.sh A_1080=1000 B_1080=1000 # 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') wlogout --protocol layer-shell -b 4 -T $(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") &