]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add wm_copy/paste
authorMaximilian Friedersdorff <max@friedersdorff.com>
Sat, 1 May 2021 10:39:56 +0000 (11:39 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Sat, 1 May 2021 10:39:56 +0000 (11:39 +0100)
states/tmux/files/wm_copy [new file with mode: 0644]
states/tmux/files/wm_paste [new file with mode: 0644]
states/tmux/init.sls

diff --git a/states/tmux/files/wm_copy b/states/tmux/files/wm_copy
new file mode 100644 (file)
index 0000000..d11db6f
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+xclip -i -selection "clipboard"
diff --git a/states/tmux/files/wm_paste b/states/tmux/files/wm_paste
new file mode 100644 (file)
index 0000000..d96d0ee
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+xclip -o -selection "clipboard"
index 83c49a8cc2da240f1e81301caf544889e8c7c1ea..1397f119e6d642a37b899a5db977f8c57e952e28 100644 (file)
@@ -1,5 +1,6 @@
 include:
   - tmux.{{ grains['os'] |lower }}
+  - local
 
 tmux configuration:
   file.managed:
@@ -8,3 +9,19 @@ tmux configuration:
     - user: {{ grains['user'] }}
     - group: {{ grains['user'] }}
     - mode: 640
+
+wm_paste:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.local/bin/wm_paste
+    - source: salt://tmux/files/wm_paste
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - mode: 750
+
+wm_copy:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.local/bin/wm_copy
+    - source: salt://tmux/files/wm_copy
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - mode: 750