summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/extra/supd5
-rwxr-xr-xbin/guiscripts/clipo4
-rwxr-xr-xbin/guiscripts/clipp4
-rwxr-xr-xbin/menuscripts/memoji17
4 files changed, 14 insertions, 16 deletions
diff --git a/bin/extra/supd b/bin/extra/supd
index 48638bd..61ea144 100755
--- a/bin/extra/supd
+++ b/bin/extra/supd
@@ -7,7 +7,7 @@ then
>&2 cat <<-EOF
usage:
supd Update dirs in current dir
- ls ~/projects | supd Update dirs read from stdin
+ ... | supd Update dirs read from stdin
supd -h Show help
EOF
exit
@@ -17,9 +17,10 @@ fi
for dir in $dirs
do
- printf '%s:' "$dir" | >&2 sed "s#$HOME#~#"
(
cd "$dir" || return
+ git rev-parse > /dev/null 2>&1 || return
+ printf '%s:' "$dir" | >&2 sed "s#$HOME#~#"
git "${1:-fetch}" > /dev/null 2>&1 &&
printf ' o' ||
printf ' x'
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
diff --git a/bin/menuscripts/memoji b/bin/menuscripts/memoji
index 9c45950..45a74f1 100755
--- a/bin/menuscripts/memoji
+++ b/bin/menuscripts/memoji
@@ -5,30 +5,19 @@
# If this file includes emojis below "__DATA__" it is generated.
# This file was generated: 2022-04-21 12:38:03+00:00
-if [ "$WAYLAND_DISPLAY" ]
-then
- alias copycmd="wl-copy"
-else
- alias copycmd="xclip -sel c"
-fi
set -e
case "$1" in
- "list")
- data=$(sed '0,/^__DATA__$/d' "$0")
- printf "%s" "$data"
- ;;
+ "list") printf "%s" "$(sed '0,/^__DATA__$/d' "$0")" ;;
"copy")
input=$(tee | cut -f 1 -d ' ')
if [ "$input" ]
then
notify-send "dmemoji" "$input <b>copied!</b>"
- printf "%s" "$input" | copycmd
+ printf "%s" "$input" | clipp
fi
;;
- "")
- sh "$0" list | commander -p "Emoji:" -l -x | sh "$0" copy
- ;;
+ "") sh "$0" list | commander -p "Emoji:" -x -w 44 -y 10 -c | sh "$0" copy ;;
esac
exit