Last active
June 7, 2024 12:15
-
-
Save Kambaa/4a1fc8fb79f5335306056215bf77632f to your computer and use it in GitHub Desktop.
Custom keyboard shortcuts for My Linux Mint. Go to Settings - Keyboard - Shortcuts - Custom and add a shortcut to call these files and set your keyboard combinations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This command sends this text on active window: { | |
# Go to settings - keyboard - shortcuts and add a shortcut to call this file and set your keyboard combinations. | |
windowid=$(xdotool getwindowfocus) | |
sleep 0.2 && xdotool windowactivate --sync $windowid type '{' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This command sends this text on active window: } | |
# Go to settings - keyboard - shortcuts and add a shortcut to call this file and set your keyboard combinations. | |
windowid=$(xdotool getwindowfocus) | |
sleep 0.2 && xdotool windowactivate --sync $windowid type '}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This command sends `string` value. | |
# Go to settings - keyboard - shortcuts and add a shortcut to call this file and set your keyboard combinations. | |
string="ImportantText" | |
delay=0.05 # Delay between character inputs in seconds | |
sleep "0.5" # initial wait, without this beginning text is missing | |
for char in ${string}; do | |
xdotool type "${char}" && sleep "${delay}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment