Skip to content

Commit

Permalink
Use sxiv
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Jan 3, 2019
1 parent 35a99e6 commit c93ad2d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
5 changes: 3 additions & 2 deletions i3/config.base
Expand Up @@ -207,13 +207,14 @@ mode "resize" {
mode "exec" {
bindsym m exec --no-startup-id urxvt -cd /home/proycon -T mail -e ssh -Y -A -t anaproy.nl /home/proycon/bin/tm_alot; mode "default"
bindsym v exec --no-startup-id urxvt -cd /home/proycon -T vim -e /home/proycon/bin/tm nvim; mode "default"
bindsym t exec --no-startup-id urxvt -cd /home/proycon -e tmux new; mode "default"
bindsym Shift+m exec urxvt -cd /home/proycon -T ncmpcpp -e ncmpcpp; mode "default"
bindsym w exec firefox; mode "default"
bindsym f exec pcmanfm; mode "default"
bindsym g exec geeqie; mode "default"
bindsym g exec ~/dotfiles/opensxiv.sh; mode "default"
bindsym n exec networkmanager_dmenu -fn "Sans"; mode "default"
bindsym p exec pavucontrol; mode "default"
bindsym s exec urxvt -name scratchpad -e /home/proycon/bin/tm scratchpad
bindsym s exec urxvt -name scratchpad -e /home/proycon/bin/tm scratchpad; mode "default"
bindsym F2 exec --no-startup-id /home/proycon/bin/lala; mode "default"
bindsym F8 exec --no-startup-id fcitx; mode "default"
bindsym F9 exec killall fcitx || setxkbmap proylatin; mode "default"
Expand Down
1 change: 1 addition & 0 deletions install.sh
Expand Up @@ -33,6 +33,7 @@ ln -sfn $DOTDIR/nvim $HOMEDIR/.config/nvim
ln -sfn $DOTDIR/tilda $HOMEDIR/.config/tilda
ln -sfn $DOTDIR/ranger $HOMEDIR/.config/ranger
ln -sfn $DOTDIR/polybar $HOMEDIR/.config/polybar
ln -sfn $DOTDIR/sxiv $HOMEDIR/.config/sxiv
ln -sfn $DOTDIR/i3 $HOMEDIR/.config/i3
ln -sfn $DOTDIR/konsolerc $HOMEDIR/.config/konsolerc
ln -sfn $DOTDIR/konsole $HOMEDIR/.local/share/konsole
Expand Down
3 changes: 3 additions & 0 deletions opensxiv.sh
@@ -0,0 +1,3 @@
#!/bin/bash
dir=$(ls -d ~/Pictures/*/ | sed "s|$HOME/Pictures/||g" | dmenu -fn Sans -l 20 -i -p "Open Folder?")
sxiv -t "$HOME/Pictures/$dir"
72 changes: 36 additions & 36 deletions sxiv/exec/key-handler
Expand Up @@ -3,40 +3,40 @@ while read file
do
fullpath="$(pwd)/$file"
case "$1" in
"w")
feh --bg-scale "$fullpath"
;;
"n")
cp "$file" "/nettmp" && notify-send -i "$fullpath" "$file copied to /nettmp." &
;;
"t")
cp "$file" "/tmp" && notify-send -i "$fullpath" "$file copied to /tmp." &
;;
"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
"w")
feh --bg-scale "$fullpath"
;;
"n")
cp "$file" "/nettmp" && notify-send -i "$fullpath" "$file copied to /nettmp." &
;;
"t")
cp "$file" "/tmp" && notify-send -i "$fullpath" "$file copied to /tmp." &
;;
"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." ;;
"e")
gimp "$file" & ;;
esac
done

0 comments on commit c93ad2d

Please sign in to comment.