feat: Moves local scripts directory. Handles systemd configurations.

This commit is contained in:
2025-09-28 10:04:15 -04:00
parent e5baef9bac
commit 28903f8078
50 changed files with 323 additions and 271 deletions

27
env/.local/scripts/window-toggle-floating vendored Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
#
# Float's a window, setting it's height and width and centering.
# The percentage of the screen size for the floating window.
WIDTH_PERCENT=80
HEIGHT_PERCENT=40
floating=$(hyprctl activewindow -j | jq '.floating')
if [ "$floating" = "true" ]; then
hyprctl dispatch togglefloating
else
monitor=$(hyprctl monitors -j | jq '.[] | select(.focused == true)')
mw=$(echo "$monitor" | jq '.width')
mh=$(echo "$monitor" | jq '.height')
ms=$(echo "$monitor" | jq '.scale')
echo "scale: $ms"
neww=$(echo "scale=6; (($mw / $ms) * $WIDTH_PERCENT / 100)" | bc)
newh=$(echo "scale=6; (($mh / $ms) * $HEIGHT_PERCENT / 100)" | bc)
hyprctl dispatch togglefloating &&
hyprctl dispatch resizeactive exact $neww $newh &&
hyprctl dispatch centerwindow
fi