aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2021-07-09 18:22:48 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2021-07-09 18:22:48 +0200
commitfe69f5ba615224f3277ff53c23320b66c47c53b1 (patch)
treef92bef9bcdf79e8d7f67e4be6794db61311cee1d
parentf0905518d3a6b4f7f98f995cbe1fd8d8f7f094ca (diff)
downloaddotfiles-fe69f5ba615224f3277ff53c23320b66c47c53b1.tar.gz
dotfiles-fe69f5ba615224f3277ff53c23320b66c47c53b1.zip
[mutt] add more vi bindings, correct mailcap file, diff highlighting, io_uring mailinglist
-rw-r--r--mailcap9
-rw-r--r--mutt/bindings10
-rw-r--r--mutt/mailcap13
-rw-r--r--mutt/mailinglists1
-rw-r--r--muttrc16
-rwxr-xr-xsetup.py3
6 files changed, 41 insertions, 11 deletions
diff --git a/mailcap b/mailcap
deleted file mode 100644
index 9250865..0000000
--- a/mailcap
+++ /dev/null
@@ -1,9 +0,0 @@
-audio/*; /usr/bin/xdg-open %s
-
-image/*; imv %s; test=test -n "$DISPLAY"
-
-application/msword; /usr/bin/xdg-open %s
-application/pdf; /usr/bin/xdg-open %s
-application/postscript ; /usr/bin/xdg-open %s
-
-text/html; /usr/bin/xdg-open %s ; copiousoutput
diff --git a/mutt/bindings b/mutt/bindings
index 1d7fb15..071e4c6 100644
--- a/mutt/bindings
+++ b/mutt/bindings
@@ -9,6 +9,16 @@ bind index gg first-entry
bind pager G bottom
bind index G last-entry
+# Scrolling
+bind attach,browser,pager,index \CF next-page
+bind attach,browser,pager,index \CB previous-page
+bind attach,browser,pager,index \Cu half-up
+bind attach,browser,pager,index \Cd half-down
+bind browser,pager \Ce next-line
+bind browser,pager \Cy previous-line
+bind index \Ce next-line
+bind index \Cy previous-line
+
bind index,pager \Cd purge-message
# Sidebar Navigation
diff --git a/mutt/mailcap b/mutt/mailcap
new file mode 100644
index 0000000..07f72c8
--- /dev/null
+++ b/mutt/mailcap
@@ -0,0 +1,13 @@
+###
+### Begin Red Hat Mailcap
+###
+
+audio/*; /usr/bin/xdg-open %s
+
+image/*; /usr/bin/xdg-open %s
+
+application/msword; /usr/bin/xdg-open %s
+application/pdf; /usr/bin/xdg-open %s
+application/postscript ; /usr/bin/xdg-open %s
+
+text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
diff --git a/mutt/mailinglists b/mutt/mailinglists
index e5eff7f..ede5b9b 100644
--- a/mutt/mailinglists
+++ b/mutt/mailinglists
@@ -1,2 +1,3 @@
subscribe info@fsf.org
subscribe oeffentlich@erlangen.ccc.de
+subscribe io-uring@vger.kernel.org
diff --git a/muttrc b/muttrc
index 62bd2cb..fa5d24e 100644
--- a/muttrc
+++ b/muttrc
@@ -50,8 +50,24 @@ bind editor ^T complete
# use xdg-mime to determine mime types
set mime_type_query_command = "xdg-mime query filetype"
+set mailcap_path = ~/.mutt/mailcap
+
############## COLOR #######################
+# Patch syntax highlighting
+# https://www.do-not-panic.com/2014/07/colored-diffs-with-mutt.html
+color normal white default
+color body brightwhite default ^[[:space:]].*
+color body brightwhite default ^(diff).*
+color body white default ^[\-\-\-].*
+color body white default ^[\+\+\+].*
+color body green default ^[\+].*
+color body red default ^[\-].*
+color body brightblue default [@@].*
+color body brightwhite default ^(\s).*
+color body brightwhite default ^(Signed-off-by).*
+color body brightwhite default ^(Cc)
+
source ~/.mutt/theme
############ STATUSBAR #####################
diff --git a/setup.py b/setup.py
index 18064e6..613331b 100755
--- a/setup.py
+++ b/setup.py
@@ -68,8 +68,7 @@ def dotfile_loc_helper(quiet):
return e
mutt_target = [("muttrc", home_dir + "/.muttrc"),
- ("mutt", home_dir + "/.mutt"),
- ("mailcap", home_dir + "/.mailcap")]
+ ("mutt", home_dir + "/.mutt")]
# targets are a list of tuples<file name, link destination> and/or functions
targets = {