1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
77be32fdcb Wrap xdg-open command to prevent weird output in mutt 2019-11-20 20:54:11 +01:00
ab9959edab Simplified mailcap & mutt 2019-11-20 20:01:01 +01:00
57ae9d10e2 Added webp to vifm preview 2019-11-20 18:28:24 +01:00
5 changed files with 16 additions and 26 deletions

View File

@ -1,7 +1,10 @@
audio/*; openfile %s
video/*; openfile %s
image/*; openfile %s
application/msword; openfile %s
application/pdf; openfile %s
application/postscript ; openfile %s
text/html; openfile %s ; copiousoutput
text/plain; $EDITOR %s ; text/plain; $EDITOR %s ;
text/html; openfile %s ; nametemplate=%s.html
text/html; w3m -I %{charset} -T text/html; copiousoutput;
image/*; muttimage %s ; copiousoutput
video/*; setsid mpv --quiet %s &; copiousoutput
application/pdf; openfile %s ;
application/pgp-encrypted; gpg -d '%s'; copiousoutput;

View File

@ -1,5 +1,7 @@
# vim: filetype=neomuttrc # vim: filetype=neomuttrc
set certificate_file = ~/.cache/mutt/certificates set certificate_file = ~/.cache/mutt/certificates
set mailcap_path = ~/.config/mutt/mailcap
set tmpdir = ~/Downloads
set date_format="%d-%m-%Y %H:%M" set date_format="%d-%m-%Y %H:%M"
set index_format="%2C [%Z] %?X?A& ? %D %-15.15F %s (%-4.4c)" set index_format="%2C [%Z] %?X?A& ? %D %-15.15F %s (%-4.4c)"
set sort = 'threads' set sort = 'threads'

View File

@ -1,12 +0,0 @@
#!/bin/bash
#get image resolution
resolution=$(identify $1 | awk '{print $3}')
IFS='x' # x is set as delimiter
read -ra ADDR <<< "$resolution"
width=${ADDR[0]}
height=${ADDR[1]}
### Display Image / offset with mutt bar
echo -e "2;3;\n0;1;0;42;$((width));$((height));0;0;0;0;$1\n4;\n3;" | /usr/lib/w3m/w3mimgdisplay &

View File

@ -1,8 +1,5 @@
#!/bin/sh #!/bin/sh
# Helps open a file with xdg-open from mutt in a external program without weird side effects. # Helps open a file with xdg-open from mutt in a external program without weird side effects.
[ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open" opener="setsid xdg-open"
mkdir -p "/tmp/$USER-mutt-tmp" $opener "$1" >/dev/null 2>&1 &
file="/tmp/$USER-mutt-tmp/$(basename "$1")"
rm -f "$file"
cp "$1" "$file"
$opener "$file" >/dev/null 2>&1 &

View File

@ -253,7 +253,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ gpicview %c, \ gpicview %c,
\ {View in shotwell} \ {View in shotwell}
\ shotwell, \ shotwell,
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm,*.webp
\ vifmimg draw %px %py %pw %ph %c \ vifmimg draw %px %py %pw %ph %c
\ %pc \ %pc
\ vifmimg clear \ vifmimg clear