This commit is contained in:
2025-08-13 21:46:48 +02:00
commit c3e2e6509b
818 changed files with 54187 additions and 0 deletions

31
hypr/scripts/toggle_floating Executable file
View File

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