diff options
author | xyz <gky44px1999@gmail.com> | 2021-10-03 01:42:17 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-10-03 01:42:17 -0700 |
commit | 929d76d8b6c0494072cf78c61cd4bab1c7d966d2 (patch) | |
tree | aa3293f9e636bb9f8dd4fd47c26a9a4916e52044 | |
parent | 4cfa508c3077006e800a841074363882cb7f3965 (diff) |
switch from sxiv to nsxiv
-rw-r--r-- | .Xresources | 10 | ||||
-rw-r--r-- | .config/mimeapps.list | 6 | ||||
-rwxr-xr-x | .config/sxiv/exec/key-handler | 64 | ||||
-rwxr-xr-x | .local/bin/upd | 2 |
4 files changed, 11 insertions, 71 deletions
diff --git a/.Xresources b/.Xresources index a373206e..8953b89e 100644 --- a/.Xresources +++ b/.Xresources @@ -1,4 +1,6 @@ -! sxiv -Sxiv.font:monospace:style=bold:size=10 -Sxiv.foreground:#c5c8c6 -Sxiv.background:#1d1f21 +! nsxiv, fnune/base16-vim base16-tomorrow-night colorscheme +Nsxiv.bar.font:monospace:size=11 +Nsxiv.window.foreground:#c5c8c6 +Nsxiv.window.background:#1d1f21 +Nsxiv.bar.foreground:#b4b7b4 +Nsxiv.bar.background:#282a2e diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 36410767..e075a567 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -3,7 +3,7 @@ # but if you what to create new .desktop desktop entries with new name, you need to put it in ~/.local/share/applications/ [Default Applications] -image/gif=sxiv.desktop; -image/png=sxiv.desktop; -image/jpeg=sxiv.desktop; +image/gif=nsxiv.desktop; +image/png=nsxiv.desktop; +image/jpeg=nsxiv.desktop; application/pdf=okularApplication_pdf.desktop; diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler deleted file mode 100755 index 80dd82f0..00000000 --- a/.config/sxiv/exec/key-handler +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler -# Called by sxiv(1) after the external prefix key (C-x by default) is pressed. -# The next key combo is passed as its first argument. Passed via stdin are the -# images to act upon, one path per line: all marked images, if in thumbnail -# mode and at least one image has been marked, otherwise the current image. -# sxiv(1) blocks until this script terminates. It then checks which images -# have been modified and reloads them. - -# The key combo argument has the following form: "[C-][M-][S-]KEY", -# where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X -# keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. - -# my dependency notes -# jpegtran is owned by libjpeg-turbo -# mogrify is owned by imagemagick -# exiv2 is owned by exiv2 -# rawtherapee is owned by rawtherapee - -rotate() { - tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read -r file; do - case "$(file -b -i "$file")" in - image/jpeg*) jpegtran -rotate 90 -copy all -outfile "$file" "$file" ;; - *) mogrify -rotate 90 "$file" ;; - esac - done -} - -flip() { - tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read -r file; do - case "$(file -b -i "$file")" in - image/jpeg*) jpegtran -flip vertical -copy all -outfile "$file" "$file" ;; - *) mogrify -flip "$file" ;; - esac - done -} - -linkwall() { - tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read -r file; do - walldir="$XDG_PICTURES_DIR/wallpapers/" - name=$(basename "$file") - if [ ! -e "$walldir$name" ]; then - convwall "$file" "$walldir$name" || ln -s "$file" "$walldir" - else - notify-send 'error' "$name exist" - fi - done -} - -# I choose not to put case nested in while read file loop -# because it can pipe multiple files to one command? -case "$1" in - "d") [ "$(printf 'No\nYes' | dmenu -i -p 'delete?')" = "Yes" ] && tr '\n' '\0' | xargs -0 rm ;; - "e") while read -r file; do alacritty -e sh -c "exiv2 pr -q -pa '$file' | less" & done ;; - "f") flip ;; - "g") tr '\n' '\0' | xargs -0 setsid -f gimp ;; - "l") linkwall ;; - "p") tr '\n' '\0' | xargs -0 sh -c 'convert "$@" $(time.uuid).pdf' shell ;; - "r") rotate ;; - "w") tr '\n' '\0' | xargs -0 shufwall ;; - "y") tr '\n' '\0' | xargs -0 realpath | xsel -b ;; -esac - diff --git a/.local/bin/upd b/.local/bin/upd index 5f5ee657..4eb66fc6 100755 --- a/.local/bin/upd +++ b/.local/bin/upd @@ -34,6 +34,8 @@ misc () nvim +PlugUpgrade +PlugClean! +PlugUpdate +qa tldr --update sudo hardcode-fixer + nsxiv -c + find "$XDG_CACHE_HOME/nsxiv/" -depth -type d -execdir rmdir --ignore-fail-on-non-empty -- '{}' \+ } ncm () |