diff options
Diffstat (limited to 'open-browser-tab.sh')
-rwxr-xr-x | open-browser-tab.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/open-browser-tab.sh b/open-browser-tab.sh new file mode 100755 index 0000000..07b565a --- /dev/null +++ b/open-browser-tab.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/usr/bin/env sh | ||
2 | |||
3 | BROWSER="chromium" | ||
4 | KEYS="\Ct" | ||
5 | |||
6 | if pgrep "$BROWSER" > /dev/null; then | ||
7 | xdotool search --onlyvisible --class "$BROWSER" windowactivate --sync | ||
8 | xvkbd -xsendevent -text "$KEYS" | ||
9 | else | ||
10 | $BROWSER & | ||
11 | fi | ||
12 | |||
13 | |||