summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/openimg7
-rwxr-xr-x.local/bin/rotdir2
-rw-r--r--.local/share/applications/nsxiv-joe.desktop2
3 files changed, 9 insertions, 2 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; }'
diff --git a/.local/share/applications/nsxiv-joe.desktop b/.local/share/applications/nsxiv-joe.desktop
index f105b30..85971c2 100644
--- a/.local/share/applications/nsxiv-joe.desktop
+++ b/.local/share/applications/nsxiv-joe.desktop
@@ -2,7 +2,7 @@
Type=Application
Name=nsxiv joe
GenericName=Image Viewer
-Exec=nsxiv -abo %F
+Exec=openimg %f
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-tga;image/x-xpixmap;image/webp;image/heic;image/svg+xml;application/postscript;image/jp2;image/jxl;image/avif;image/heif;
NoDisplay=true
Icon=nsxiv