From bd9090cbfa02285cb0940e9bd6634b1d58b7b514 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 16 Apr 2016 21:30:59 +0200 Subject: Add Chrome tab opening script --- open-browser-tab.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 open-browser-tab.sh (limited to 'open-browser-tab.sh') 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 @@ +#!/usr/bin/env sh + +BROWSER="chromium" +KEYS="\Ct" + +if pgrep "$BROWSER" > /dev/null; then + xdotool search --onlyvisible --class "$BROWSER" windowactivate --sync + xvkbd -xsendevent -text "$KEYS" +else + $BROWSER & +fi + + -- cgit v1.2.3