Forked from aerosol/gist:606169e60e40b85d1e8c84ef40b9d670
Created
March 4, 2018 19:47
-
-
Save xandkar/5fab0d29ae79a2afaf17e04d2fd0c2ed to your computer and use it in GitHub Desktop.
linux desktop tyranny
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 | |
W=`xdotool getactivewindow` | |
S1=`xprop -id ${W} |awk -F '"' '/WM_CLASS/{print $4}'` | |
echo "$S1" >> /tmp/log.txt | |
if [ "$S1" = "Firefox" ]; then | |
xdotool keydown --window ${W} Ctrl+t | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment