aboutsummaryrefslogtreecommitdiff
path: root/common/home/mosder/.config/hypr/scripts/zoom.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common/home/mosder/.config/hypr/scripts/zoom.sh')
-rwxr-xr-xcommon/home/mosder/.config/hypr/scripts/zoom.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/home/mosder/.config/hypr/scripts/zoom.sh b/common/home/mosder/.config/hypr/scripts/zoom.sh
new file mode 100755
index 0000000..433f899
--- /dev/null
+++ b/common/home/mosder/.config/hypr/scripts/zoom.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+ZOOM=$(hyprctl getoption cursor:zoom_factor | grep float | awk -F" " '{print $2}')
+ZOOM=$(echo "scale=0; ($ZOOM+1)/1" | bc)
+if [[ $ZOOM -gt $MAX_ZOOM ]]; then
+ ZOOM=1
+fi
+
+hyprctl -q keyword cursor:zoom_factor $ZOOM