summaryrefslogtreecommitdiff
path: root/open-browser-tab.sh
diff options
context:
space:
mode:
Diffstat (limited to 'open-browser-tab.sh')
-rwxr-xr-xopen-browser-tab.sh13
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
3BROWSER="chromium"
4KEYS="\Ct"
5
6if pgrep "$BROWSER" > /dev/null; then
7 xdotool search --onlyvisible --class "$BROWSER" windowactivate --sync
8 xvkbd -xsendevent -text "$KEYS"
9else
10 $BROWSER &
11fi
12
13