aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm/.local/bin/hlwm_run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'herbstluftwm/.local/bin/hlwm_run.sh')
-rwxr-xr-xherbstluftwm/.local/bin/hlwm_run.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/herbstluftwm/.local/bin/hlwm_run.sh b/herbstluftwm/.local/bin/hlwm_run.sh
new file mode 100755
index 0000000..49fdc28
--- /dev/null
+++ b/herbstluftwm/.local/bin/hlwm_run.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+tag=$(herbstclient attr tags.focus.name)
+
+selectedPath=$(run_list.sh | rofi -dmenu)
+
+[ -z $selectedPath ] && exit 0
+
+herbstclient rule prepend maxage="120" pid="$$" tag="$tag" once
+
+exec $selectedPath