diff options
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-x | bin/guiscripts/clipo | 6 | ||||
-rwxr-xr-x | bin/guiscripts/clipp | 6 | ||||
-rwxr-xr-x | bin/guiscripts/clipswap | 4 | ||||
-rwxr-xr-x | bin/guiscripts/cliptype | 2 | ||||
-rwxr-xr-x | bin/guiscripts/dmfm | 3 |
5 files changed, 20 insertions, 1 deletions
diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo new file mode 100755 index 0000000..39994f9 --- /dev/null +++ b/bin/guiscripts/clipo @@ -0,0 +1,6 @@ +#!/bin/sh +[ "$1" = "-p" ] && arg='primary' +if [ "$WAYLAND_DISPLAY" ] +then wl-paste -n ${1} +else xclip -o -selection "${arg:-clipboard}" -r +fi diff --git a/bin/guiscripts/clipp b/bin/guiscripts/clipp new file mode 100755 index 0000000..c9e4f51 --- /dev/null +++ b/bin/guiscripts/clipp @@ -0,0 +1,6 @@ +#!/bin/sh +[ "$1" = "-p" ] && arg='primary' +if [ "$WAYLAND_DISPLAY" ] +then wl-copy -n $1 +else xclip -selection "${arg:-clipboard}" -r +fi diff --git a/bin/guiscripts/clipswap b/bin/guiscripts/clipswap new file mode 100755 index 0000000..1cae135 --- /dev/null +++ b/bin/guiscripts/clipswap @@ -0,0 +1,4 @@ +#!/bin/sh +paste="$(clipo)" +clipo -p | clipp +printf '%s' "$paste" | clipp -p diff --git a/bin/guiscripts/cliptype b/bin/guiscripts/cliptype new file mode 100755 index 0000000..e6ac093 --- /dev/null +++ b/bin/guiscripts/cliptype @@ -0,0 +1,2 @@ +#!/bin/sh +clipo | ydotool type -f - diff --git a/bin/guiscripts/dmfm b/bin/guiscripts/dmfm index d1dd8b8..9485469 100755 --- a/bin/guiscripts/dmfm +++ b/bin/guiscripts/dmfm @@ -2,9 +2,10 @@ while true do + dir="$(printf '%s' "$PWD" | sed "s#^$HOME#\~#;s#\([^/]\)[^/]*/#\1/#g")" file=$(find . -maxdepth 1 -mindepth 1 -not -name '.*' -printf '%y\t%f\n' | sort -k 1 -k 2 | cut -f 2- | - commander -xcd -p "$PWD>") + commander -xc -p "$dir") [ "$file" ] || break [ ! -e "$file" ] && continue |