From fc9d6ed81c336713988f92f13165a6dcdbe2c159 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sat, 1 May 2021 11:39:56 +0100 Subject: [PATCH] Add wm_copy/paste --- states/tmux/files/wm_copy | 3 +++ states/tmux/files/wm_paste | 3 +++ states/tmux/init.sls | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 states/tmux/files/wm_copy create mode 100644 states/tmux/files/wm_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 -- 2.46.2