Created
July 19, 2017 11:55
-
-
Save codepuncher/806cabf9c72263fbd5addd50ade39ad8 to your computer and use it in GitHub Desktop.
Revisions
-
codepuncher created this gist
Jul 19, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ #!/usr/bin/env bash # Focus window from 1st argument or # executes command from 2nd argument wmctrl -ia $(wmctrl -l | grep -i ${1} | awk '{print $1}') || ${2} & 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # Example usage: # from cli ./quickwin 'user@hostname:' 'gnome-terminal --hide-menubar' # Tries to focus window with title 'user@hostname:' or run gnome-terminal ./quickwin 'chrome' 'google-chrome' # keyboard shortcut usage bash -c "~/.local/bin/quickwin 'user@hostname:' 'gnome-terminal --hide-menubar'"