From a98ae6bd5a1c7e2d278c5df2b927c0a5427141d0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 31 Oct 2023 14:31:32 +0100 Subject: turn aliases into scripts This allows for better integration, and makes it possible to call these from other programs, such as window managers, ... --- bin/guiscripts/clipo | 4 ++++ bin/guiscripts/clipp | 4 ++++ 2 files changed, 8 insertions(+) create mode 100755 bin/guiscripts/clipo create mode 100755 bin/guiscripts/clipp (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo new file mode 100755 index 0000000..e3ae714 --- /dev/null +++ b/bin/guiscripts/clipo @@ -0,0 +1,4 @@ +#!/bin/sh +[ "$WAYLAND_DISPLAY" ] && + wl-paste -n || + xclip -o -selection clipboard -r diff --git a/bin/guiscripts/clipp b/bin/guiscripts/clipp new file mode 100755 index 0000000..538f69b --- /dev/null +++ b/bin/guiscripts/clipp @@ -0,0 +1,4 @@ +#!/bin/sh +[ "$WAYLAND_DISPLAY" ] && + wl-copy -n || + xclip -selection clipboard -r -- cgit v1.2.3 From 8422757706462fd4abe65187902d5590942f0cc9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 3 Nov 2023 17:43:13 +0100 Subject: added cliptype --- bin/guiscripts/cliptype | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 bin/guiscripts/cliptype (limited to 'bin/guiscripts') 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 - -- cgit v1.2.3 From 53cb3d537303c75ac5d3de577075928b687d240a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 3 Nov 2023 17:58:22 +0100 Subject: added clipswap --- bin/guiscripts/clipswap | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bin/guiscripts/clipswap (limited to 'bin/guiscripts') 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 -- cgit v1.2.3 From 7d39603f3dab52c5e2212c6c12bc4b951a4de94e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 3 Nov 2023 18:36:45 +0100 Subject: added primary clipboard support --- bin/guiscripts/clipo | 8 +++++--- bin/guiscripts/clipp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo index e3ae714..39994f9 100755 --- a/bin/guiscripts/clipo +++ b/bin/guiscripts/clipo @@ -1,4 +1,6 @@ #!/bin/sh -[ "$WAYLAND_DISPLAY" ] && - wl-paste -n || - xclip -o -selection clipboard -r +[ "$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 index 538f69b..c9e4f51 100755 --- a/bin/guiscripts/clipp +++ b/bin/guiscripts/clipp @@ -1,4 +1,6 @@ #!/bin/sh -[ "$WAYLAND_DISPLAY" ] && - wl-copy -n || - xclip -selection clipboard -r +[ "$1" = "-p" ] && arg='primary' +if [ "$WAYLAND_DISPLAY" ] +then wl-copy -n $1 +else xclip -selection "${arg:-clipboard}" -r +fi -- cgit v1.2.3 From 3f3fa5e5c9df7f43507a117b7cdbc2ddabb9d555 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 7 Nov 2023 01:24:40 +0100 Subject: concatenate dir name --- bin/guiscripts/dmfm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/guiscripts') 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 -- cgit v1.2.3