]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Use dmenu-wayland-git with wrapper
authorMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 12 Dec 2019 09:58:43 +0000 (09:58 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 12 Dec 2019 09:58:43 +0000 (09:58 +0000)
states/sway/arch.sls

index d0f74682d361085fd1b129081223539422caf87b..0879813eea32edf8e2aeafd2fc2e358ba931f9d1 100644 (file)
@@ -4,4 +4,15 @@ install sway:
       - sway 
       - swaylock
       - swayidle
-      - dmenu
+      - dmenu-wayland-git
+
+ensure dmenu-wl wrapper:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.local/bin/dmenu_run
+    - mode: 750
+    - owner: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - contents:
+      - "#!/bin/sh"
+      - "active_monitor=$(swaymsg -t get_outputs | jq -r '.[map(.focused) | index(true)].name')"
+      - '/usr/bin/dmenu_run -m "${active_monitor}" "$@"'