Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xandkar/5fab0d29ae79a2afaf17e04d2fd0c2ed to your computer and use it in GitHub Desktop.
Save xandkar/5fab0d29ae79a2afaf17e04d2fd0c2ed to your computer and use it in GitHub Desktop.
linux desktop tyranny
#!/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