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

Compare commits

..

No commits in common. "77be32fdcb8dfec4c55e4e2db1d671d31223a47e" and "431b1a0640f74e0cfe52e740272579b5eeda6e0b" have entirely different histories.

5 changed files with 26 additions and 16 deletions

View File

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

12
mutt/.local/bin/muttimage Executable file
View File

@ -0,0 +1,12 @@
#!/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,5 +1,8 @@
#!/bin/sh
# Helps open a file with xdg-open from mutt in a external program without weird side effects.
opener="setsid xdg-open"
$opener "$1" >/dev/null 2>&1 &
[ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open"
mkdir -p "/tmp/$USER-mutt-tmp"
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,
\ {View in shotwell}
\ shotwell,
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm,*.webp
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
\ vifmimg draw %px %py %pw %ph %c
\ %pc
\ vifmimg clear