summaryrefslogtreecommitdiff
path: root/dot-config/sketchybar/plugins/front_app.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-config/sketchybar/plugins/front_app.sh')
-rwxr-xr-xdot-config/sketchybar/plugins/front_app.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/dot-config/sketchybar/plugins/front_app.sh b/dot-config/sketchybar/plugins/front_app.sh
new file mode 100755
index 0000000..fb6d0b3
--- /dev/null
+++ b/dot-config/sketchybar/plugins/front_app.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Some events send additional information specific to the event in the $INFO
+# variable. E.g. the front_app_switched event sends the name of the newly
+# focused application in the $INFO variable:
+# https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
+
+if [ "$SENDER" = "front_app_switched" ]; then
+ sketchybar --set "$NAME" label="$INFO"
+fi