config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 5fd00a73cf14fcba4f56a3a08c322bf2c7d61a24
parent 3e200ecb194d2695a36792ac065037b2746ca558
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Fri, 12 Feb 2021 21:34:21 -0800

Update clipswap script

Add copywrite and license header aswell as use `/bin/sh' shebang
rather than `/usr/bin/env dash' and remove commented code.

Diffstat:
Mmodules/scripts/.local/bin/clipswap | 15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/scripts/.local/bin/clipswap b/modules/scripts/.local/bin/clipswap @@ -1,15 +1,12 @@ -#!/usr/bin/env dash -#! clipswap -- swap clipboard and primary selection +#!/bin/sh +# Copywrite 2020, 2021 Jacob R. Edwards +# License: GPLv3 +# +# clipswap -- swap primary selection and clipboard -set -eu - -xclip() { command xclip -selection $@ ;} -#notify() { notify-send "clipboard: '`xclip clipboard -o`' -# primary: '`xclip primary -o`'" ;} +xclip() { command xclip -selection $* ;} tmp=`mktemp /tmp/primary-XXXXXXX` && trap "rm -f $tmp" 0 - xclip primary -o >$tmp xclip clipboard -o | xclip primary -i xclip clipboard -i <$tmp -#notify