Last active
June 28, 2022 08:26
-
-
Save Stewmath/b9bb3b5c888b7a3a1045 to your computer and use it in GitHub Desktop.
Livesplit global hotkeys workaround
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
# Livesplit hotkeys | |
# | |
"livesplithk Page_Up" | |
Page_Up | |
"livesplithk Page_Down" | |
Page_Down | |
"livesplithk Insert" | |
Insert | |
"livesplithk Delete" | |
Delete | |
"livesplithk KP_Add" | |
KP_Add | |
"livesplithk bracketleft" | |
bracketleft | |
"livesplithk bracketright" | |
bracketright |
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 | |
cd PATH_TO_LIVESPLIT | |
xbindkeys -n & | |
pid=$! | |
wine LiveSplit.exe | |
kill $pid |
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 | |
xdotool key --window $( xdotool search --limit 1 --all --pid $( pgrep LiveSplit ) --name LiveSplit ) "$1" |
May be fragile if you have LiveSplit (with that exact spelling) in other window titles e.g. a browser tab.
YMMV but for me with my Wine/Mono config the LiveSplit process becomes a zombie after closing the window, so you may want to record its PID and kill that as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Needs xbindkeys installed. "livesplitandbind" and "livesplithk" should be somewhere in the PATH, .xbindkeysrc should be in the $HOME directory. xbindkeys will be terminated when livesplit is finished so you can use your insert/delete keys, etc.