Browse Source

Moved from feh file viewer to sxiv

tags/v0.5.0
Micah Halter 1 year ago
parent
commit
a1f1ab0e86
6 changed files with 58 additions and 1 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -0
      Makefile
  3. +2
    -1
      ranger/.config/ranger/rifle.conf
  4. +46
    -0
      sxiv/.config/sxiv/exec/key-handler
  5. +4
    -0
      sxiv/.local/share/applications/sxiv.desktop
  6. +4
    -0
      xdgopen/.config/mimeapps.list

+ 1
- 0
CHANGELOG.md View File

@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- `sxiv` application to replace `feh`
- `G'MIC` plugin to Gimp
- `entr` and auto compilation to vim
- vim mapping to open html file in browser


+ 1
- 0
Makefile View File

@@ -150,6 +150,7 @@ arch: pacman
smartmontools \
speedtest-cli \
stow \
sxiv \
tcl \
terminus-font \
texlive-most \


+ 2
- 1
ranger/.config/ranger/rifle.conf View File

@@ -175,10 +175,11 @@ 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 = sxiv -a -b -- "$@"
mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"

mime ^image, has pqiv, X, flag f = pqiv -- "$@"
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has sxiv, X, flag f = sxiv -a -b -- "$@"
mime ^image, has feh, X, flag f = feh -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"


+ 46
- 0
sxiv/.config/sxiv/exec/key-handler View File

@@ -0,0 +1,46 @@
#!/bin/sh
while read file
do
dmenu="$HOME/.config/Scripts/dmenucolor"
fullpath="$(pwd)/$file"
case "$1" in
"w")
cp -f "$file" ~/.config/wall &&
cp -f "$file" /usr/share/wallpaper/wall &&
wal -g -i "$HOME/.config/wall" -o "$HOME/.config/Scripts/wal-set"
notify-send "Wallpaper changed."
;;
"W")
cp -f "$file" ~/.config/wall &&
cp -f "$file" /usr/share/wallpaper/wall &&
feh --bg-scale "$HOME/.config/wall"
notify-send "Wallpaper changed."
;;
"c")
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/Scripts/folders | 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" ~/.config/Scripts/folders | 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 "Delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
"G")
gimp "$file" & ;;
esac
done

+ 4
- 0
sxiv/.local/share/applications/sxiv.desktop View File

@@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=sxiv image viewer
Exec=/usr/bin/sxiv -a -b %u

+ 4
- 0
xdgopen/.config/mimeapps.list View File

@@ -13,3 +13,7 @@ application/xhtml+xml=qutebrowser.desktop
application/x-extension-xhtml=qutebrowser.desktop
application/x-extension-xht=qutebrowser.desktop
application/pdf=zathura.desktop
application/pdf=zathura.desktop
image/png=sxiv.desktop
image/jpeg=sxiv.desktop
image/gif=sxiv.desktop

Loading…
Cancel
Save