From 3b1f02e4f5248145ce16e5d95b9a57d847dab38b Mon Sep 17 00:00:00 2001 From: srv Date: Mon, 5 May 2025 15:49:36 -0500 Subject: First commit --- A.sh | 7 +++++ C.sh | 7 +++++ D.sh | 7 +++++ E.sh | 7 +++++ Q.sh | 7 +++++ S.sh | 7 +++++ W.sh | 7 +++++ X.sh | 7 +++++ Z.sh | 7 +++++ activate-type-to-move-cursor.sh | 7 +++++ deactivate-type-to-move-cursor.sh | 7 +++++ xbindkeysrc.keyboard.is.mouse | 61 +++++++++++++++++++++++++++++++++++++++ xbindkeysrc.keyboard.only | 10 +++++++ 13 files changed, 148 insertions(+) create mode 100755 A.sh create mode 100755 C.sh create mode 100755 D.sh create mode 100755 E.sh create mode 100755 Q.sh create mode 100644 S.sh create mode 100755 W.sh create mode 100755 X.sh create mode 100755 Z.sh create mode 100755 activate-type-to-move-cursor.sh create mode 100644 deactivate-type-to-move-cursor.sh create mode 100644 xbindkeysrc.keyboard.is.mouse create mode 100644 xbindkeysrc.keyboard.only diff --git a/A.sh b/A.sh new file mode 100755 index 0000000..cd9fda2 --- /dev/null +++ b/A.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- -45 0 +else + xdotool mousemove_relative -- -11 0 +fi diff --git a/C.sh b/C.sh new file mode 100755 index 0000000..c15b817 --- /dev/null +++ b/C.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- 45 45 +else + xdotool mousemove_relative -- 11 11 +fi \ No newline at end of file diff --git a/D.sh b/D.sh new file mode 100755 index 0000000..a68bb32 --- /dev/null +++ b/D.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- 45 0 +else + xdotool mousemove_relative -- 11 0 +fi \ No newline at end of file diff --git a/E.sh b/E.sh new file mode 100755 index 0000000..d747d2c --- /dev/null +++ b/E.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- 45 -45 +else + xdotool mousemove_relative -- 11 -11 +fi \ No newline at end of file diff --git a/Q.sh b/Q.sh new file mode 100755 index 0000000..c794ae5 --- /dev/null +++ b/Q.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- -45 -45 +else + xdotool mousemove_relative -- -11 -11 +fi diff --git a/S.sh b/S.sh new file mode 100644 index 0000000..cb814ae --- /dev/null +++ b/S.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousedown 2 +else + xdotool mouseup 2 +fi \ No newline at end of file diff --git a/W.sh b/W.sh new file mode 100755 index 0000000..5265846 --- /dev/null +++ b/W.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- 0 -45 +else + xdotool mousemove_relative -- 0 -11 +fi \ No newline at end of file diff --git a/X.sh b/X.sh new file mode 100755 index 0000000..5f521a8 --- /dev/null +++ b/X.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- 0 45 +else + xdotool mousemove_relative -- 0 11 +fi \ No newline at end of file diff --git a/Z.sh b/Z.sh new file mode 100755 index 0000000..18231ec --- /dev/null +++ b/Z.sh @@ -0,0 +1,7 @@ +#!/bin/dash +capslock_status=$(xset q | grep "Caps Lock:" | awk '{print $4}') +if [ "$capslock_status" = "on" ]; then + xdotool mousemove_relative -- -32 32 +else + xdotool mousemove_relative -- -8 8 +fi diff --git a/activate-type-to-move-cursor.sh b/activate-type-to-move-cursor.sh new file mode 100755 index 0000000..26e36e4 --- /dev/null +++ b/activate-type-to-move-cursor.sh @@ -0,0 +1,7 @@ +#!/bin/dash + +pkill herbe +killall xbindkeys +cp /home/user/.type-to-move-cursor/xbindkeysrc.keyboard.is.mouse ~/.xbindkeysrc +xbindkeys +herbe 'Keyboard is mouse' \ No newline at end of file diff --git a/deactivate-type-to-move-cursor.sh b/deactivate-type-to-move-cursor.sh new file mode 100644 index 0000000..5a00ae0 --- /dev/null +++ b/deactivate-type-to-move-cursor.sh @@ -0,0 +1,7 @@ +#!/bin/dash + +pkill herbe +killall xbindkeys +cp /home/user/.type-to-move-cursor/xbindkeysrc.keyboard.only ~/.xbindkeysrc +xbindkeys +herbe 'Keyboard is keyboard' \ No newline at end of file diff --git a/xbindkeysrc.keyboard.is.mouse b/xbindkeysrc.keyboard.is.mouse new file mode 100644 index 0000000..37fbcfe --- /dev/null +++ b/xbindkeysrc.keyboard.is.mouse @@ -0,0 +1,61 @@ +# IS MOUSE + +"xbindkeys_show" +control+shift + g + +"dash /home/user/.type-to-move-cursor/deactivate-type-to-move-cursor.sh" +Mod4 + 1 + +"echo -n ''" +Mod4 + 2 + +"dash /home/user/.type-to-move-cursor/Q.sh" +q + +"dash /home/user/.type-to-move-cursor/A.sh" +a + +"dash /home/user/.type-to-move-cursor/Z.sh" +z + +"dash /home/user/.type-to-move-cursor/X.sh" +x + +"dash /home/user/.type-to-move-cursor/C.sh" +c + +"dash /home/user/.type-to-move-cursor/D.sh" +d + +"dash /home/user/.type-to-move-cursor/E.sh" +e + +"dash /home/user/.type-to-move-cursor/W.sh" +w + +# Asigna clic izquierdo a la tecla F +"xdotool click 1" +f + +# Asigna clic derecho a la tecla J +"xdotool click 3" +j + +# Asigna rueda hacia arriba a la tecla U +"xdotool click --repeat 3 4" +u + +# Asigna rueda hacia abajo a la tecla M +"xdotool click --repeat 3 5" +m + +"dash /home/user/.type-to-move-cursor/S.sh" +s + +# Asigna Control + Rueda Arriba a Ctrl + U +"( xdotool keydown Control && sleep 0.1s && xdotool keyup Control) & (xdotool click --repeat 3 4)" +control+u + +# Asigna Control + Rueda Abajo a Ctrl + M +"( xdotool keydown Control && sleep 0.1s && xdotool keyup Control) & (xdotool click --repeat 3 5)" +control+m diff --git a/xbindkeysrc.keyboard.only b/xbindkeysrc.keyboard.only new file mode 100644 index 0000000..0ff79da --- /dev/null +++ b/xbindkeysrc.keyboard.only @@ -0,0 +1,10 @@ +# IS NOT MOUSE + +"xbindkeys_show" + control+shift + q + +"echo -n ''" +Mod4 + 1 + +"dash ~/.type-to-move-cursor/activate-type-to-move-cursor.sh" + Mod4 + 2 -- cgit v1.2.3