diff options
author | joe <rbo@gmx.us> | 2025-09-21 01:52:20 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-09-21 01:52:20 +0200 |
commit | 129c6428e79d5dda876f4b40936509a02c144e48 (patch) | |
tree | bbcc8613c07f0a74b582b59cd11541c3b724402f | |
parent | up (diff) | |
download | dotfiles-bsd-129c6428e79d5dda876f4b40936509a02c144e48.tar.gz dotfiles-bsd-129c6428e79d5dda876f4b40936509a02c144e48.tar.bz2 dotfiles-bsd-129c6428e79d5dda876f4b40936509a02c144e48.tar.xz dotfiles-bsd-129c6428e79d5dda876f4b40936509a02c144e48.tar.zst dotfiles-bsd-129c6428e79d5dda876f4b40936509a02c144e48.zip |
up
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/openimg | 7 | ||||
-rwxr-xr-x | .local/bin/rotdir | 2 | ||||
-rw-r--r-- | .local/share/applications/nsxiv-joe.desktop | 2 |
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 |