summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/openimg7
-rwxr-xr-x.local/bin/rotdir2
2 files changed, 8 insertions, 1 deletions
diff --git a/.local/bin/openimg b/.local/bin/openimg
new file mode 100755
index 0000000..4fb0d78
--- /dev/null
+++ b/.local/bin/openimg
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for file in "$@"; do
+ echo "file: $file"
+done
+
+rotdir "$@" | command grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | nsxiv -abio
diff --git a/.local/bin/rotdir b/.local/bin/rotdir
index 013ef86..f2498ce 100755
--- a/.local/bin/rotdir
+++ b/.local/bin/rotdir
@@ -11,4 +11,4 @@
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
base="$(basename "$1")"
-exa "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }'
+command ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }'