From 47f75ae06768ab0478301430f815645ddd94eeae Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 27 May 2013 23:37:07 +0200 Subject: [PATCH 1/2] Mutt: moved folder to be more consistent. --- {.mutt.d => .mutt}/account-example | 0 {.mutt.d => .mutt}/colors.ambrevar | 0 {.mutt.d => .mutt}/colorset.sh | 0 {.mutt.d => .mutt}/mailcap | 0 {.mutt.d => .mutt}/maileditor.sh | 0 .muttrc => .mutt/muttrc | 65 +++++++++++++++--------------- .scripts/homeinit | 3 +- 7 files changed, 34 insertions(+), 34 deletions(-) rename {.mutt.d => .mutt}/account-example (100%) rename {.mutt.d => .mutt}/colors.ambrevar (100%) rename {.mutt.d => .mutt}/colorset.sh (100%) rename {.mutt.d => .mutt}/mailcap (100%) rename {.mutt.d => .mutt}/maileditor.sh (100%) rename .muttrc => .mutt/muttrc (82%) diff --git a/.mutt.d/account-example b/.mutt/account-example similarity index 100% rename from .mutt.d/account-example rename to .mutt/account-example diff --git a/.mutt.d/colors.ambrevar b/.mutt/colors.ambrevar similarity index 100% rename from .mutt.d/colors.ambrevar rename to .mutt/colors.ambrevar diff --git a/.mutt.d/colorset.sh b/.mutt/colorset.sh similarity index 100% rename from .mutt.d/colorset.sh rename to .mutt/colorset.sh diff --git a/.mutt.d/mailcap b/.mutt/mailcap similarity index 100% rename from .mutt.d/mailcap rename to .mutt/mailcap diff --git a/.mutt.d/maileditor.sh b/.mutt/maileditor.sh similarity index 100% rename from .mutt.d/maileditor.sh rename to .mutt/maileditor.sh diff --git a/.muttrc b/.mutt/muttrc similarity index 82% rename from .muttrc rename to .mutt/muttrc index 5ffc3b5a..5983bc6b 100644 --- a/.muttrc +++ b/.mutt/muttrc @@ -6,8 +6,9 @@ ## Note on folders: ## These folders are assumed to exist: -## ~/.mutt: personal stuff (contacts, account information) -## ~/.mutt.d: public stuff (theme, mailcap) +## ~/.mutt.d: personal stuff (contacts, account information). +## ~/.mutt: public stuff (theme, mailcap). +## ~/.cache/mutt: header cache. ##------------------------------------------------------------------------------ ## General options @@ -20,7 +21,7 @@ set beep_new = "yes" set edit_headers=yes ## Set EDITOR dynamically. -source "~/.mutt.d/maileditor.sh|" +source "~/.mutt/maileditor.sh|" ## Store message headers locally to speed things up. Gentoo wiki says that if a ## folder is specified, it is even faster. If no folder exists, the cache will @@ -40,7 +41,7 @@ set imap_keepalive = 300 unset imap_passive ## Mailcap -set mailcap_path = ~/.mutt.d/mailcap +set mailcap_path = ~/.mutt/mailcap auto_view text/html alternative_order text/plain text/html @@ -60,39 +61,39 @@ set sleep_time = 0 ## Multiple accounts ##------------------------------------------------------------------------------ -set my_ac_dev=dev -set my_ac_personal=personal -set my_ac_university=university -set my_ac_work=work +## accountrc should contain the following config: + +## Set account names (arbitrary). +# set my_ac_personal=personal +# set my_ac_work=work +# +## Fetch passwords +# source "ccat ~/.mutt-pwds.cpt |" +## Or +# source "gpg2 -dq ~/.mutt-pwds.gpg |" +## +## Folder hooks, one per account. +# source "~/.mutt.d/$my_ac_personal" +# folder-hook $folder 'source ~/.mutt.d/$my_ac_personal' +# source "~/.mutt.d/$my_ac_work" +# folder-hook $folder 'source ~/.mutt.d/$my_ac_work' +## +## Optionnaly you can add shortcuts to switch mailboxes: +# macro index,pager 'source ~/.mutt.d/$my_ac_personal!' +# macro index,pager 'source ~/.mutt.d/$my_ac_work!' -## Login ## Store passwords as follows in .mutt-pwds: -## set my_pw_account = foo +# set my_pw_account = foo ## ## CCRYPT: -## ccencrypt .mutt-pwds +## $ ccencrypt .mutt-pwds ## ## GNUPG: Generate a key pair with: -## gpg2 --gen-key +## $ gpg2 --gen-key ## Encrypt them with: -## gpg2 -e -r ".mutt-pwds" -source "ccat ~/.mutt-pwds.cpt |" -# source "gpg2 -dq ~/.mutt-pwds.gpg |" +## $ gpg2 -e -r ".mutt-pwds" -## Last account is default. -source "~/.mutt/$my_ac_dev" -folder-hook $folder 'source ~/.mutt/$my_ac_dev' -source "~/.mutt/$my_ac_personal" -folder-hook $folder 'source ~/.mutt/$my_ac_personal' -source "~/.mutt/$my_ac_university" -folder-hook $folder 'source ~/.mutt/$my_ac_university' -source "~/.mutt/$my_ac_work" -folder-hook $folder 'source ~/.mutt/$my_ac_work' - -macro index,pager 'source ~/.mutt/$my_ac_dev!' -macro index,pager 'source ~/.mutt/$my_ac_personal!' -macro index,pager 'source ~/.mutt/$my_ac_university!' -macro index,pager 'source ~/.mutt/$my_ac_work!' +source "~/.mutt.d/accountrc" ##------------------------------------------------------------------------------ ## Sidebar @@ -127,7 +128,7 @@ macro pager b 'toggle sidebar_visible' ##------------------------------------------------------------------------------ ## Mutt native support -# set alias_file = "~/.mutt/aliases" +# set alias_file = "~/.mutt.d/aliases" # set sort_alias = alias # set reverse_alias = yes # source $alias_file @@ -210,8 +211,8 @@ folder-hook .*[sS]ent.* 'set index_format="%2C | %Z [%d] %-30.30t (%-4.4c) %s"' folder-hook ! .*[sS]ent.* 'set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"' ## Colors -source "~/.mutt.d/colorset.sh|" -source "~/.mutt.d/colors.ambrevar" +source "~/.mutt/colorset.sh|" +source "~/.mutt/colors.ambrevar" # source "/usr/share/doc/mutt/samples/colors.default" # source "/usr/share/doc/mutt/samples/colors.linux" diff --git a/.scripts/homeinit b/.scripts/homeinit index 89b79e70..df55d09f 100755 --- a/.scripts/homeinit +++ b/.scripts/homeinit @@ -54,8 +54,7 @@ fi if [ -n "$(command -v mutt)" ]; then echo "==> Mutt" - # [ -d "$SOURCEDIR" ] && ln -snf "$(realpath ${SOURCEDIR}/mails)" "${HOME}/.mutt" - [ -d "$SOURCEDIR" ] && ln -snf "${SOURCEDIR}/mails" "${HOME}/.mutt" + [ -d "$SOURCEDIR" ] && ln -snf "${SOURCEDIR}/mails" "${HOME}/.mutt.d" mkdir -p "${HOME}/.cache/mutt/hcache" echo fi From b21636efaf6c1623c1e0d9ff5c18e872ab535dad Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 27 May 2013 23:56:42 +0200 Subject: [PATCH 2/2] Emacs: ediff in one single frame. README update. --- .emacs.d/main.el | 3 +++ README | 29 ++++++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.emacs.d/main.el b/.emacs.d/main.el index 966528b8..df4393dc 100644 --- a/.emacs.d/main.el +++ b/.emacs.d/main.el @@ -185,3 +185,6 @@ (lambda () (interactive) ) (setq org-agenda-files '("~/todo.org")) (setq org-enforce-todo-dependencies t)) + +;; Ediff in one frame. +(setq ediff-window-setup-function 'ediff-setup-windows-plain) diff --git a/README b/README index 04a026c7..18d6c5f3 100644 --- a/README +++ b/README @@ -81,7 +81,7 @@ all files directly. To fetch source from Git repo: Some applications will need extra dependencies other than the default ones. You might have a look at the .pkg-* files to see what software I've been using. -Final word: do not forget to read the manpages! +Final word: do not forget to read the man pages! ################################################################################ @@ -99,11 +99,21 @@ Some custom options, download location, search engines, etc. Emacs ***** -Extra deps: emacs-bison-mode emacs-flex-mode emacs-glsl-mode emacs-lua-mode - emacs-make-regexp emacs-mediawiki-bzr emacs-multiple-cursors emacs-nox - emacs-xclip emacs-yasnippet +Extra deps +- recommended: emacs-multiple-cursors emacs-xclip emacs-yasnippet +- optional: emacs-bison-mode emacs-flex-mode emacs-glsl-mode emacs-lua-mode + emacs-make-regexp emacs-mediawiki-bzr + +Build options: + ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \ + --localstatedir=/var --with-x-toolkit=lucid --with-xft \ + --without-gconf --without-sound Emacs daemon is integrated flawlessly thanks to a small script. See homeinit. +Because terminal and graphical clients do not behave the same way, it is +sometimes useful to specify which version should be used. For mutt, ranger +bulkrename, git commit message and dwb, it is required to wait for the client to +return. Configuration for C programming. Bindings to compile either from makefile or from a custom command if no makefile is found. @@ -179,17 +189,14 @@ pkggen: generates lists of installed with pacman, FreeBSD's pkg and tlmgr (TeX Shell ***** -Target: zsh, bash +Target: POSIX shell, dash, zsh Probably the most interesting part here. A lot of stuff: aliases, functions, shell options, etc. -Please note that this config is mainly intended -- and tested -- for zsh. It -should be mostly compatible with Bourne shell though. When incompabilities have -been encountered, it has been reported into the configuration files. Hence the -shared folder .shell.d/, whose files get sourced by both bash and zsh. -Bash-specific and zsh-specific options are in dedicated files ending with the -appropriate shell name. +Please note that this config is mainly intended -- and tested -- for zsh. I +removed bash support since bash is really a scourge to shell scripting. However +most of the script and the shell configuration are POSIX shell compatible. TeX ***