summaryrefslogtreecommitdiff
path: root/_linux/sxhkd
diff options
context:
space:
mode:
authorkkard2 <[email protected]>2025-10-30 14:08:15 +0100
committerkkard2 <[email protected]>2026-03-07 14:21:55 +0100
commit3ec7bf19b2be910ee28a89da9487c9725d86fe24 (patch)
treee5b6807a8ea281745a439a2128212e160520ae60 /_linux/sxhkd
parenta1b2c814e43161401889d7e0abdea2f46c7ed0ef (diff)
i use linux btw
Diffstat (limited to '_linux/sxhkd')
-rwxr-xr-x_linux/sxhkd/boateye.sh29
-rw-r--r--_linux/sxhkd/sxhkdrc18
2 files changed, 31 insertions, 16 deletions
diff --git a/_linux/sxhkd/boateye.sh b/_linux/sxhkd/boateye.sh
new file mode 100755
index 0000000..070e432
--- /dev/null
+++ b/_linux/sxhkd/boateye.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+zoom_w=300
+zoom_h=16384
+zoom_x=750
+zoom_y=$(( (900 - zoom_h) / 2 ))
+
+normal_w=1600
+normal_h=900
+normal_x=0
+normal_y=0
+
+normal_multiplier=0.25
+zoom_multiplier=0.03125
+device_id="E-Signal USB Gaming Mouse"
+
+# Get active window info
+eval "$(xdotool getactivewindow getwindowgeometry --shell)"
+title="$(xdotool getactivewindow getwindowname)"
+
+if [[ "$title" == *"Minecraft"* && "$HEIGHT" -eq "$normal_h" ]]; then
+ wmctrl -r ":ACTIVE:" -e "0,${zoom_x},${zoom_y},${zoom_w},${zoom_h}"
+ xinput set-prop "$device_id" 'Coordinate Transformation Matrix' \
+ $zoom_multiplier 0 0 0 $zoom_multiplier 0 0 0 1
+else
+ wmctrl -r ":ACTIVE:" -e "0,${normal_x},${normal_y},${normal_w},${normal_h}"
+ xinput set-prop "$device_id" 'Coordinate Transformation Matrix' \
+ $normal_multiplier 0 0 0 $normal_multiplier 0 0 0 1
+fi
diff --git a/_linux/sxhkd/sxhkdrc b/_linux/sxhkd/sxhkdrc
index 5035c74..1898bac 100644
--- a/_linux/sxhkd/sxhkdrc
+++ b/_linux/sxhkd/sxhkdrc
@@ -1,16 +1,2 @@
-super + shift + s
- flameshot gui
-super + w
- firefox
-
-super + ctrl + Up
- pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
-super + ctrl + Down
- pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
-super + shift + m
- pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
-super + ctrl + space
- playerctl play-pause
-
-super + v
- copyq toggle
+m
+ ~/.config/sxhkd/boateye.sh