summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/mimeapps.list6
-rw-r--r--.config/ranger/rifle.conf3
-rwxr-xr-x.config/sxiv/exec/key-handler37
-rw-r--r--.local/share/applications/sxiv.desktop4
-rwxr-xr-x.scripts/i3cmds/tutorialvids2
5 files changed, 46 insertions, 6 deletions
diff --git a/.config/mimeapps.list b/.config/mimeapps.list
index fa9bdb1..8522431 100644
--- a/.config/mimeapps.list
+++ b/.config/mimeapps.list
@@ -3,6 +3,6 @@ x-scheme-handler/magnet=transmission-remote.desktop;
x-scheme-handler/mailto=mutt.desktop;
text/plain=vim.desktop;
application/pdf=zathura.desktop;
-image/png=feh.desktop;
-image/jpeg=feh.desktop;
-image/gif=gif.desktop;
+image/png=sxiv.desktop;
+image/jpeg=sxiv.desktop;
+image/gif=sxiv.desktop;
diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf
index c783678..c6b85d0 100644
--- a/.config/ranger/rifle.conf
+++ b/.config/ranger/rifle.conf
@@ -184,14 +184,13 @@ ext djvu, has atril, X, flag f = atril -- "$@"
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
-mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"
mime ^image/gif, has viewnior, X, flag f = viewnior -- "$@"
mime ^image/gif, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext xcf, X, flag f = gimp -- "$@"
+mime ^image, has sxiv, X, flag f = sxiv -a -- "$@"
mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom --image-bg black -- "$@"
mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom -- "$@"
-mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"
mime ^image, has eog, X, flag f = eog -- "$@"
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
new file mode 100755
index 0000000..e0303f9
--- /dev/null
+++ b/.config/sxiv/exec/key-handler
@@ -0,0 +1,37 @@
+#!/bin/sh
+while read file
+do
+ fullpath="$(pwd)/$file"
+ case "$1" in
+ "w")
+ cp "$file" ~/.config/wall.png &&
+ feh --bg-scale "$HOME/.config/wall.png"
+ notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." ;;
+ "c")
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && exit
+ cp "$file" "$destdir" && notify-send -i "$fullpath" "$file copied to $destdir." &
+ ;;
+ "m")
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && exit
+ cp "$file" "$destdir" && notify-send -i "$fullpath" "$file moved to $destdir." &
+ ;;
+ "r")
+ convert -rotate 90 "$file" "$file" ;;
+ "R")
+ convert -rotate -90 "$file" "$file" ;;
+ "f")
+ convert -flop "$file" "$file" ;;
+ "y")
+ echo -n "$file" | xclip -selection clipboard &&
+ notify-send "$file copied to clipboard" & ;;
+ "Y")
+ echo -n "$fullpath" | xclip -selection clipboard &&
+ notify-send "$fullpath copied to clipboard" & ;;
+ "d")
+ [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
+ "G")
+ gimp "$file" & ;;
+ esac
+done
diff --git a/.local/share/applications/sxiv.desktop b/.local/share/applications/sxiv.desktop
new file mode 100644
index 0000000..fa810f2
--- /dev/null
+++ b/.local/share/applications/sxiv.desktop
@@ -0,0 +1,4 @@
+[Desktop Entry]
+Type=Application
+Name=feh image viewer
+Exec=/usr/bin/sxiv -a %u
diff --git a/.scripts/i3cmds/tutorialvids b/.scripts/i3cmds/tutorialvids
index 1449cbe..5a3aa2b 100755
--- a/.scripts/i3cmds/tutorialvids
+++ b/.scripts/i3cmds/tutorialvids
@@ -1,7 +1,7 @@
#!/bin/sh
vidlist="
status bar https://www.youtube.com/watch?v=gKumet6b-WY
-feh
+sxiv (image viewer) https://www.youtube.com/watch?v=GYW9i_u5PYs
st (terminal) https://www.youtube.com/watch?v=9H75enWM22k
i3 (window manager) https://www.youtube.com/watch?v=GKviflL9XeI
mutt (email) https://www.youtube.com/watch?v=2U3vRbF7v5A