Skip to content

Instantly share code, notes, and snippets.

@aerosol
Created March 4, 2018 12:56
Show Gist options
  • Save aerosol/606169e60e40b85d1e8c84ef40b9d670 to your computer and use it in GitHub Desktop.
Save aerosol/606169e60e40b85d1e8c84ef40b9d670 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