- Install xbindkeys and xdotool
- Save .discord_forward.sh and .discord_backward.sh somewhere
- Add the included text to ~/.xbindkeysrc, changing the paths to where you saved them.
- Run xbindkeys (have it run on startup if you want)
Last active
July 15, 2021 23:32
-
-
Save huantianad/ad26920c171fb30c57666b583e3125fd to your computer and use it in GitHub Desktop.
Jank fix to discord doubleclicking
This file contains hidden or 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 | |
W=$(xdotool getactivewindow) | |
S=$(xprop -id "$W" | awk '/WM_CLASS/{print $4}') | |
if [ "$S" = '"discord"' ] || [ "$S" = '"dolphin"' ]; then | |
xdotool key --clearmodifiers alt+Left | |
else | |
sleep 0.12 | |
xdotool click --window "$W" 8 | |
fi |
This file contains hidden or 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 | |
W=$(xdotool getactivewindow) | |
S=$(xprop -id "$W" | awk '/WM_CLASS/{print $4}') | |
if [ "$S" = '"discord"' ] || [ "$S" = '"dolphin"' ]; then | |
xdotool key --clearmodifiers alt+Right | |
else | |
sleep 0.12 | |
xdotool click --window "$W" 9 | |
fi |
This file contains hidden or 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
"bash /path/to/.discord_backward.sh" | |
b:8 | |
"bash /path/to/.discord_forward.sh" | |
b:9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment