From: Maximilian Friedersdorff Date: Sat, 1 May 2021 10:39:56 +0000 (+0100) Subject: Add wm_copy/paste X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=fc9d6ed81c336713988f92f13165a6dcdbe2c159;p=max%2Fsaltfiles.git Add wm_copy/paste --- diff --git a/states/tmux/files/wm_copy b/states/tmux/files/wm_copy new file mode 100644 index 0000000..d11db6f --- /dev/null +++ b/states/tmux/files/wm_copy @@ -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 index 0000000..d96d0ee --- /dev/null +++ b/states/tmux/files/wm_paste @@ -0,0 +1,3 @@ +#!/bin/sh + +xclip -o -selection "clipboard" diff --git a/states/tmux/init.sls b/states/tmux/init.sls index 83c49a8..1397f11 100644 --- a/states/tmux/init.sls +++ b/states/tmux/init.sls @@ -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