瀏覽代碼

better mailcap for html and media

tags/v3.1
Luke Smith 6 年之前
父節點
當前提交
20c014db09
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4C50B54A911F6252
共有 2 個檔案被更改,包括 14 行新增3 行删除
  1. +10
    -0
      etc/htmlopen.sh
  2. +4
    -3
      etc/mailcap

+ 10
- 0
etc/htmlopen.sh 查看文件

@@ -0,0 +1,10 @@
#!/bin/sh

# Helps open an HTML file from mutt in a GUI browser without weird side effects.

file=$(mktemp -u --suffix=.html)

echo $file
cp "$1" "$file"

setsid firefox "$file" &

+ 4
- 3
etc/mailcap 查看文件

@@ -1,6 +1,7 @@
text/plain; vim %s ;
text/html; $BROWSER '%s' ;
text/html; ~/.config/mutt/etc/htmlopen.sh %s ;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
image/*; ~/.config/mutt/etc/muttimage.sh %s ; copiousoutput
video/*; setsid nohup mpv --quiet %s & disown; copiousoutput
application/pdf; pdftotext '%s' -; copiousoutput;
video/*; setsid mpv --quiet %s &; copiousoutput
application/pdf; cp '%s' /tmp/doc.pdf && setsid zathura /tmp/doc.pdf &; copiousoutput;
application/pgp-encrypted; gpg -d '%s'; copiousoutput;

Loading…
取消
儲存