]> gitweb.michael.orlitzky.com - mutt.git/blobdiff - no-sidebar
Add a toggle to enable/disable the sidebar.
[mutt.git] / no-sidebar
similarity index 61%
rename from hooks
rename to no-sidebar
index 83728ae5b29ad1c2e64ac31d10951039166c5393..f3828b16a2c8f3665b78ce6b14b97055debdbb92 100644 (file)
--- a/hooks
@@ -1,3 +1,7 @@
+# Settings used only when the sidebar is NOT visible.
+unset sidebar_visible
+unset mail_check_stats
+
 # The "33" is a magic number, totaling the number of characters in the
 # non-subject/author fields.
 #
@@ -7,3 +11,9 @@
 folder-hook .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-33) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-33) / 100))`; set index_format="%D | %Z %-$my_col_from.${my_col_from}t %-$my_col_subject.${my_col_subject}s (%-4.4c)"'
 
 folder-hook ! .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-33) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-33) / 100))`; set index_format="%D | %Z %-$my_col_from.${my_col_from}F %-$my_col_subject.${my_col_subject}s (%-4.4c)"'
+
+# This overrides the macro in "sidebar", so that Alt-s toggles the
+# sidebar on and off by loading the (no-)sidebar config file in
+# succession. The final "change-folder" command reloads the current
+# folder, to ensure that the hook gets run to resize things.
+macro index "\es" "<enter-command>source ~/.mutt/sidebar<enter><change-folder> =<enter>"