💄 style(hypr): 2 spaces of formatting

This commit is contained in:
Sergio Laín 2024-10-17 17:35:47 +02:00
parent 98d9c9167d
commit 3371ac471d
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438

View file

@ -4,28 +4,28 @@ floating=$(hyprctl activewindow -j | jq '.floating')
window=$(hyprctl activewindow -j | jq '.initialClass' | tr -d "\"")
function toggle() {
width=$1
height=$2
width=$1
height=$2
hyprctl --batch "dispatch togglefloating; dispatch resizeactive exact ${width} ${height}; dispatch centerwindow"
hyprctl --batch "dispatch togglefloating; dispatch resizeactive exact ${width} ${height}; dispatch centerwindow"
}
function untoggle() {
hyprctl dispatch togglefloating
hyprctl dispatch togglefloating
}
function handle() {
width=$1
height=$2
width=$1
height=$2
if [ "$floating" == "false" ]; then
toggle "$width" "$height"
else
untoggle
fi
if [ "$floating" == "false" ]; then
toggle "$width" "$height"
else
untoggle
fi
}
case $window in
kitty) handle "50%" "55%" ;;
*) handle "65%" "70%" ;;
*) handle "70%" "70%" ;;
esac