diff options
author | Pacien TRAN-GIRARD | 2016-04-16 21:30:59 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-04-16 21:30:59 +0200 |
commit | bd9090cbfa02285cb0940e9bd6634b1d58b7b514 (patch) | |
tree | 106c060a5cf39db44b9377b7f724de27314edbed | |
parent | 9840a10ff0d74ad5991789909b6f636366e49c21 (diff) | |
download | desktop-utilities-bd9090cbfa02285cb0940e9bd6634b1d58b7b514.tar.gz |
Add Chrome tab opening script
-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 | |||