dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 9657aa158d20fa7c24430d3278be9924e56a17f2
parent 9d7a613a878082da874ec1c632feea0f4cf5f699
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 24 May 2019 12:44:03 +0200

Delete i3, move mutt and imapfilter config to .config, specify tmux term

Diffstat:
R.imapfilter/adamsgaard.lua -> .config/.imapfilter/adamsgaard.lua | 0
D.config/i3/config | 246-------------------------------------------------------------------------------
D.config/i3/i3blocks | 106-------------------------------------------------------------------------------
D.config/i3/i3scripts/i3battery | 41-----------------------------------------
D.config/i3/i3scripts/i3cpu | 13-------------
D.config/i3/i3scripts/i3date | 14--------------
D.config/i3/i3scripts/i3disk | 20--------------------
D.config/i3/i3scripts/i3internet | 24------------------------
D.config/i3/i3scripts/i3layout | 19-------------------
D.config/i3/i3scripts/i3mail | 29-----------------------------
D.config/i3/i3scripts/i3mem | 11-----------
D.config/i3/i3scripts/i3mpd | 19-------------------
D.config/i3/i3scripts/i3mpdupdate | 9---------
D.config/i3/i3scripts/i3news | 18------------------
D.config/i3/i3scripts/i3pacman | 16----------------
D.config/i3/i3scripts/i3torrent | 27---------------------------
D.config/i3/i3scripts/i3volume | 26--------------------------
D.config/i3/i3scripts/i3weather | 22----------------------
D.config/i3/status | 68--------------------------------------------------------------------
R.mutt/cert.pem -> .config/mutt/cert.pem | 0
R.mutt/colors -> .config/mutt/colors | 0
R.mutt/muttprint-groff.sh -> .config/mutt/muttprint-groff.sh | 0
R.mutt/muttprint-vim.sh -> .config/mutt/muttprint-vim.sh | 0
A.config/mutt/muttrc | 249+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R.mutt/offlineimap-password-store.py -> .config/mutt/offlineimap-password-store.py | 0
R.mutt/offlineimap.py -> .config/mutt/offlineimap.py | 0
R.mutt/view_attachment.sh -> .config/mutt/view_attachment.sh | 0
D.mutt/colors2 | 22----------------------
D.mutt/muttrc | 251-------------------------------------------------------------------------------
M.offlineimaprc | 13+++----------
M.tmux.conf | 2+-
31 files changed, 253 insertions(+), 1012 deletions(-)

diff --git a/.imapfilter/adamsgaard.lua b/.config/.imapfilter/adamsgaard.lua diff --git a/.config/i3/config b/.config/i3/config @@ -1,246 +0,0 @@ -for_window [class="^.*"] border pixel 3 - -set $gaps_inner 15 -set $gaps_outer 10 - -set $term --no-startup-id st -set $mod Mod4 -set $modalt Mod1 -set $stoprec --no-startup-id dmenurecord kill -set $shutdown sudo -A shutdown -h now -set $reboot sudo -A reboot -set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager -set $audiomixer pulsemixer -set $volup --unmute --change-volume +3 -set $voldown --unmute --change-volume -3 -set $volmute --toggle-mute - -set $work1 1 -set $work2 2 -set $work3 3 -set $work4 4 -set $work5 5 -set $work6 6 -set $work7 7 -set $work8 8 -set $work9 9 -set $work10 10 - -font xft:PragmataPro 9 - -gaps inner $gaps_inner -gaps outer $gaps_outer - -# get instance names with xprop -for_window [class="Tor Browser" instance="Navigator"] floating enable - -# floating windows -for_window [instance="tmuxdd"] floating enable -for_window [instance="tmuxdd"] resize set 625 450 -for_window [instance="tmuxdd"] move scratchpad -for_window [instance="tmuxdd"] border pixel 6 -for_window [instance="tmuxdd"] sticky enable -for_window [instance="dropdowncalc"] floating enable -for_window [instance="dropdowncalc"] resize set 625 450 -for_window [instance="dropdowncalc"] move scratchpad -for_window [instance="dropdowncalc"] border pixel 6 -for_window [instance="dropdowncalc"] sticky enable -for_window [instance="fuzzylaunch"] floating enable -for_window [instance="fuzzylaunch"] resize set 625 450 -for_window [instance="fuzzylaunch"] move scratchpad -for_window [instance="fuzzylaunch"] border pixel 6 -for_window [instance="fuzzylaunch"] sticky enable -for_window [instance="mpcdd"] floating enable -for_window [instance="mpcdd"] resize set 725 550 -for_window [instance="mpcdd"] move scratchpad -for_window [instance="mpcdd"] border pixel 6 -for_window [instance="mpcdd"] sticky enable - -# Set Xresources colors: -set_from_resource $foreground foreground #000000 -set_from_resource $background background #000000 -set_from_resource $darkblack color0 #000000 -set_from_resource $black color8 #000000 -set_from_resource $darkred color1 #000000 -set_from_resource $red color9 #000000 -set_from_resource $darkgreen color2 #000000 -set_from_resource $green color10 #000000 -set_from_resource $darkyellow color3 #000000 -set_from_resource $yellow color11 #000000 -set_from_resource $darkblue color4 #000000 -set_from_resource $blue color12 #000000 -set_from_resource $darkmagenta color5 #000000 -set_from_resource $magenta color13 #000000 -set_from_resource $darkcyan color6 #000000 -set_from_resource $cyan color14 #000000 -set_from_resource $darkwhite color7 #000000 -set_from_resource $white color15 #000000 -set $transparent #00000000 - -# colorclass border backgr. text indicator child_border -client.focused $foreground $background $background $foreground $foreground -client.unfocused $background $background $foreground $background $background -client.focused_inactive $background $background $foreground $background $background -client.urgent $red $red $black $red $red -client.background $background - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# key bindings -bindsym $mod+Return exec $term -e tmux -bindsym $mod+Shift+Return exec $term -bindsym $mod+grave exec --no-startup-id ddspawn tmuxdd -bindsym $mod+comma exec firejail signal-desktop -bindsym $mod+space exec --no-startup-id ducksearch -bindsym $mod+Shift+space exec --no-startup-id open-bookmark.sh -bindsym $modalt+space exec --no-startup-id dmenu_themed run -#bindsym $mod+Tab focus mode_toggle -bindsym $mod+Tab [urgent=latest] focus - -bindsym $mod+a exec --no-startup-id $term -e $audiomixer -bindsym $mod+Shift+a exec --no-startup-id contactmenu -bindsym $mod+b exec --no-startup-id $term -e board ~/doc -bindsym $mod+Shift+b exec --no-startup-id $term -e board ~/mst -bindsym $mod+c exec --no-startup-id $term -e calcurse -bindsym $mod+Shift+c exec --no-startup-id showclip -bindsym $mod+$modalt+c exec --no-startup-id xcqr -bindsym $mod+e exec --no-startup-id $term -e vim -bindsym $mod+f fullscreen -bindsym $mod+Shift+f floating toggle -#bindsym $mod+g -bindsym $mod+i exec --no-startup-id $term -e irc.sh -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right -bindsym $mod+$modalt+l exec --no-startup-id keyboard-layout-switch.sh -bindsym $mod+m exec --no-startup-id $term -e tmux-mutt.sh -bindsym $mod+n exec --no-startup-id $term -e ranger -bindsym $mod+o exec --no-startup-id ddspawn fuzzylaunch -bindsym $mod+p exec --no-startup-id ddspawn dropdowncalc -bindsym $mod+Shift+p exec --no-startup-id ~/bin/passmenu -bindsym $mod+q kill -bindsym $mod+r exec --no-startup-id $term -e tmux-newsboat.sh -bindsym $mod+t exec --no-startup-id message -p -bindsym $mod+$modalt+t exec --no-startup-id textqr -bindsym $mod+u exec --no-startup-id dmenuunicode -#bindsym $mod+v -bindsym $mod+w exec --no-startup-id surf-open.sh 'https://adamsgaard.dk/bookmark.html' -bindsym $mod+Shift+w exec --no-startup-id surf-open.sh new 'https://adamsgaard.dk/bookmark.html' -bindsym $mod+$modalt+w exec tor-browser -bindsym $mod+x exec xlock -bindsym $mod+y exec --no-startup-id $term -e youtube-viewer -bindsym $mod+$modalt+y exec --no-startup-id $term -e youtube-viewer --novideo - -# function keys -bindsym $mod+F5 exec --no-startup-id $netrefresh -bindsym $mod+Shift+F5 exec --no-startup-id $term -e nmtui -bindsym $mod+F7 exec --no-startup-id displayselect -bindsym $mod+F8 exec --no-startup-id t-daemon-toggle -bindsym $mod+F9 exec --no-startup-id dmenumount -bindsym $mod+F10 exec --no-startup-id dmenuumount - -# special keys -bindsym XF86Launch1 exec --no-startup-id xrandr --output LVDS1 --auto --scale 1.0x1.0 && wallpaper.sh -bindsym XF86KbdBrightnessDown exec --no-startup-id kbd_backlight.sh down -bindsym XF86KbdBrightnessUp exec --no-startup-id kbd_backlight.sh up -bindsym XF86AudioRaiseVolume exec --no-startup-id $audiomixer $volup && pkill -RTMIN+4 i3blocks -bindsym XF86AudioLowerVolume exec --no-startup-id $audiomixer $voldown && pkill -RTMIN+4 i3blocks -bindsym XF86AudioMute exec --no-startup-id $audiomixer $volmute && pkill -RTMIN+4 i3blocks -bindsym XF86ScreenSaver exec --no-startup-id xlock -bindsym XF86Sleep exec --no-startup-id zzz - -# mpd control -bindsym $mod+Control+Shift+m exec --no-startup-id ddspawn mpcdd -bindsym $mod+Control+Shift+p exec --no-startup-id mpc toggle && pkill -RTMIN+14 i3blocks -bindsym $mod+Control+Shift+n exec --no-startup-id mpc next && pkill -RTMIN+14 i3blocks -bindsym $mod+Control+Shift+b exec --no-startup-id mpc prev && pkill -RTMIN+14 i3blocks -bindsym $mod+Control+Shift+s exec --no-startup-id mpc stop && pkill -RTMIN+14 i3blocks - -# screen capture -bindsym Print exec --no-startup-id maim ~/tmp/pic-full-"$(date '+%y%m%d-%H%M-%S').png" -bindsym Shift+Print exec --no-startup-id maimpick -bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey --position bottom --font-size small --no-systray --font PragmataPro" - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# split in horizontal orientation -bindsym $mod+slash split toggle -bindsym $mod+Control+l split h -bindsym $mod+Control+j split v - -#bindsym $mod+w layout tabbed -#bindsym $mod+e layout toggle split - -# switch to workspace -bindsym $mod+bracketleft workspace prev -bindsym $mod+bracketright workspace next -bindsym $mod+1 workspace $work1 -bindsym $mod+2 workspace $work2 -bindsym $mod+3 workspace $work3 -bindsym $mod+4 workspace $work4 -bindsym $mod+5 workspace $work5 -bindsym $mod+6 workspace $work6 -bindsym $mod+7 workspace $work7 -bindsym $mod+8 workspace $work8 -bindsym $mod+9 workspace $work9 -bindsym $mod+0 workspace $work10 - -# move focused container to workspace -bindsym $mod+Shift+bracketleft move container to workspace prev -bindsym $mod+Shift+bracketright move container to workspace next -bindsym $mod+Shift+1 move container to workspace $work1 -bindsym $mod+Shift+2 move container to workspace $work2 -bindsym $mod+Shift+3 move container to workspace $work3 -bindsym $mod+Shift+4 move container to workspace $work4 -bindsym $mod+Shift+5 move container to workspace $work5 -bindsym $mod+Shift+6 move container to workspace $work6 -bindsym $mod+Shift+7 move container to workspace $work7 -bindsym $mod+Shift+8 move container to workspace $work8 -bindsym $mod+Shift+9 move container to workspace $work9 -bindsym $mod+Shift+0 move container to workspace $work10 - -# reload the configuration file -bindsym $mod+$modalt+Shift+r reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# configure gap spacing -bindsym $mod+s gaps inner current plus 5 -bindsym $mod+Shift+s gaps inner current minus 5 -bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0 -bindsym $mod+z gaps outer current plus 5 -bindsym $mod+Shift+z gaps outer current minus 5 -bindsym $mod+Shift+t gaps inner current set $gaps_inner; gaps outer current set $gaps_outer - -bindsym $mod+Shift+y exec --no-startup-id i3resize left -bindsym $mod+Shift+u exec --no-startup-id i3resize down -bindsym $mod+Shift+i exec --no-startup-id i3resize up -bindsym $mod+Shift+o exec --no-startup-id i3resize right - -bar { - status_command i3blocks -c ~/.config/i3/i3blocks - position top - mode dock # dock or hide - workspace_buttons yes - - colors { - - background $background - statusline $foreground - separator $black - - # colorclass <border> <backgr.> <text> - focused_workspace $foreground $foreground $background - active_workspace $background $background $foreground - inactive_workspace $background $background $foreground - urgent_workspace $red $red $black - } -} diff --git a/.config/i3/i3blocks b/.config/i3/i3blocks @@ -1,106 +0,0 @@ -# i3blocks config file -# -# Please see man i3blocks for a complete reference! -# The man page is also hosted at http://vivien.github.io/i3blocks -# -# List of valid properties: -# -# align -# color -# command -# full_text -# instance -# interval -# label -# min_width -# name -# separator -# separator_block_width -# short_text -# signal -# urgent - -# Global properties -separator_block_width=14 -markup=pango -command=~/.config/i3/i3scripts/$BLOCK_NAME - -[i3mpd] -label= -interval=10 -signal=14 - -[i3torrent] -label= -interval=20 -signal=16 - -[i3mail] -label= -interval=10 -signal=2 - -# [i3news] -# label= -# interval=120 -# signal=17 - -[i3layout] -interval=once -signal=3 - -[i3volume] -#label=β™ͺ -#instance=Master -#instance=PCM -#command=/usr/lib/i3blocks/volume -interval=once -signal=4 - -[i3mem] -label=MEM -interval=30 -signal=5 - -# [swap] -# label=SWAP -# instance=swap -# command=/usr/lib/i3blocks/memory -# interval=30 -# signal=6 - -# [disk-home] -# instance=$HOME -# command=/usr/lib/i3blocks/disk -# interval=30 -# signal=7 - -# [ethernet] -# label=E -# instance=enp0s25 -# command=/usr/lib/i3blocks/network -# color=#00FF00 -# interval=10 -# signal=9 - -[cpu] -label=CPU -command=~/.config/i3/i3scripts/i3cpu -interval=20 -#min_width=CPU: 100.00% -#separator=false -signal=10 - -[i3battery BAT0] -label= -interval=10 -signal=12 - -[i3internet] -label= -signal=15 -interval=10 - -[i3date] -interval=5 -signal=13 diff --git a/.config/i3/i3scripts/i3battery b/.config/i3/i3scripts/i3battery @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Give a battery name (e.g. BAT0) as an argument. - -case $BLOCK_BUTTON in - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ”‹ Battery module:</b> -πŸ”‹: discharging -β™»: stagnant charge -πŸ”Œ: charging -⚑: charged -❗: battery very low! -- Text color reflects charge left" ;; -esac - -BAT=${1:-BAT0} - -capacity=$(cat /sys/class/power_supply/"$BAT"/capacity) || exit -status=$(cat /sys/class/power_supply/"$BAT"/status) -time=" ($(acpi -b | grep -E -o '[0-9][0-9]:[0-9][0-9]'))" -[ "$time" = " ()" ] && time="" -powerdraw=" $(( $(cat /sys/class/power_supply/"$BAT"/power_now)/1000000 ))W" -[[ "$powerdraw" = " 0W" ]] && powerdraw="" - -warn="" -color="" -if [ "$capacity" -le 20 ]; then - color="#fb4934" - warn="!" -fi - -if [[ "$status" = "Charging" ]] || [[ "$powerdraw" = " 0W" ]]; then - color="" - powerdraw="" -fi - -echo -n "<span" -[[ "$color" != "" ]] && printf " color='%s'" "$color" - -printf ">%s%s%s</span>%s" \ - "$(echo "$status" | \ - sed -e "s/,//g;s/Discharging/BAT /;s/Charging/PWR /;s/Unknown//;s/Full//;s/ 0*/ /g;s/ :/ /g")" \ - "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" "$time$powerdraw" diff --git a/.config/i3/i3scripts/i3cpu b/.config/i3/i3scripts/i3cpu @@ -1,13 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) notify-send "<b>πŸ–₯ CPU hogs</b>: -$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;; - 3) notify-send "<b>πŸ–₯ CPU module:</b> -- Shows CPU temperature. -- Click to show intensive processes. -- % is of single core." ;; -esac - -echo -n $(sensors | awk '/^temp1/ {print $2}') -cat /proc/loadavg | awk '{print " " $1}' diff --git a/.config/i3/i3scripts/i3date b/.config/i3/i3scripts/i3date @@ -1,14 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null \ - && notify-send "$(cal -3 --color=always \ - | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" \ - && notify-send "$(calcurse -d3)" ;; - 2) st -e calcurse ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ“… Time/date module:</b> -- Left click to show month via \`cal\` -- Middle click opens calcurse if installed" ;; -esac - -date '+%Y-%m-%d (%a) %H:%M:%S ' diff --git a/.config/i3/i3scripts/i3disk b/.config/i3/i3scripts/i3disk @@ -1,20 +0,0 @@ -#!/bin/sh - -# Status bar module for disk space -# $1 should be drive mountpoint -# $2 is optional icon, otherwise mountpoint will displayed - -[ -z "$1" ] && exit - -icon="$2" -[ -z "$2" ] && icon="$1" - -case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "<b>πŸ’½ Disk space:</b> -$(df -h --output=target,used,size)" ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ’½ Hard drive space remaining:</b> -- Shows used hard drive space. -- Click to show all disk info." ;; -esac - -printf "%s: %s" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')" diff --git a/.config/i3/i3scripts/i3internet b/.config/i3/i3scripts/i3internet @@ -1,24 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) st -e nmtui ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>🌐 Internet module:</b> -- Click for \`nmtui\` for wifi access -πŸ“‘: no wifi connection -πŸ“Ά: wifi connection with quality -❎: no ethernet -🌐: ethernet working -" ;; -esac - -if [ "$(cat /sys/class/net/w*/operstate | head -n 1)" = 'down' ]; then - wifiicon="πŸ“‘" -else - wifiicon=$(grep "^\s*w" /proc/net/wireless | \ - awk '{ print int($3 * 100 / 70) "% " }') - #awk '{ print "πŸ“Ά", int($3 * 100 / 70) "% " }') - ssid=$(nmcli connection show --active | grep 'wifi' | head -n 1 | awk '{print $1}') - wifiicon="$wifiicon$ssid" -fi - -printf "%s%s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down//;s/up/🌐/")" diff --git a/.config/i3/i3scripts/i3layout b/.config/i3/i3scripts/i3layout @@ -1,19 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) ~/bin/keyboard-layout-switch.sh && pkill -RTMIN+3 i3blocks;; - #3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ”‹ Battery module:</b> -#πŸ”‹: discharging -#β™»: stagnant charge -#πŸ”Œ: charging -#⚑: charged -#❗: battery very low! -#- Text color reflects charge left" ;; -esac - -lang=$(cat ~/.kbd-layout) || exit - -[ "$lang" = "dk" ] && lang=πŸ‡©πŸ‡° -[ "$lang" = "us" ] && lang=πŸ‡ΊπŸ‡Έ - -printf "%s" "$lang" diff --git a/.config/i3/i3scripts/i3mail b/.config/i3/i3scripts/i3mail @@ -1,29 +0,0 @@ -#!/bin/sh - -# i3blocks mail module. -# Displays number of unread mail and an loading icon if updating. -# When clicked, brings up `neomutt`. - -case $BLOCK_BUTTON in - 1) st -e $HOME/bin/tmux-mutt.sh ;; - 2) setsid $HOME/.config/mutt/etc/mailsync.sh >/dev/null & ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ“¬ Mail module:</b> -- Shows unread mail -- Shows πŸ”ƒ if syncing mail -- Left click opens neomutt -- Middle click syncs mail" ;; -esac - -mailstatus="$(mailstatus.sh | sed 's/\#\[.*]M: //')" - -if [[ "$mailstatus" =~ '0' ]]; then - exit - color="white" - style="normal" -else - color="#fabd2f" - style="normal" -fi - -printf "<span color=\"%s\" font_style=\"%s\">M: %s</span>" \ - "$color" "$style" "$mailstatus" diff --git a/.config/i3/i3scripts/i3mem b/.config/i3/i3scripts/i3mem @@ -1,11 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) notify-send "<b>Memory hogs:</b> -$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; - 3) notify-send "<b>Memory module:</b> -- Shows Memory Used/Total. -- Click to show memory hogs." ;; -esac - -free -h | awk '/^Mem:/ {print $3 "/" $2}' diff --git a/.config/i3/i3scripts/i3mpd b/.config/i3/i3scripts/i3mpd @@ -1,19 +0,0 @@ -#!/bin/sh - -filter() { - sed "/^volume:/d" | tac | sed -e "s/\\&/&amp;/g;s/\\[paused\\].*/<span color=\"gray\" font_style=\"italic\">/g;s/\\[playing\\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\\/span>/g" -} - -case $BLOCK_BUTTON in - 1) mpc status | filter && setsid st -e ncmpcpp & ;; # right click, pause/unpause - 2) mpc toggle | filter ;; # right click, pause/unpause - 3) mpc status | filter && pgrep -x dunst >/dev/null && notify-send "<b>🎡 Music module:</b> -- Shows mpd song playing. -- Italic when paused. -- Left click opens ncmpcpp. -- Middle click pauses. -- Scroll changes track.";; # right click, pause/unpause - 4) mpc prev | filter ;; # scroll up, previous - 5) mpc next | filter ;; # scroll down, next - *) mpc status | filter ;; -esac diff --git a/.config/i3/i3scripts/i3mpdupdate b/.config/i3/i3scripts/i3mpdupdate @@ -1,9 +0,0 @@ -#!/bin/sh - -[ "$(pgrep -x i3mpdupdate | wc -l)" -gt 2 ] && exit - -while : ; do - pgrep -x mpd || exit - mpc idle > /dev/null - pkill -RTMIN+11 i3blocks ; -done diff --git a/.config/i3/i3scripts/i3news b/.config/i3/i3scripts/i3news @@ -1,18 +0,0 @@ -#!/bin/sh - -# i3blocks newsboat module. -# Displays number of unread news items and an loading icon if updating. -# When clicked, brings up `newsboat`. - -case $BLOCK_BUTTON in - 1) setsid st -e newsboat ;; - 2) setsid newsup >/dev/null & exit ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ“° News module:</b> -- Shows unread news items -- Shows πŸ”ƒ if updating with \`newsup\` -- Left click opens newsboat -- Middle click syncs RSS feeds -<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; -esac - -cat ~/.config/newsboat/.update 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print $1}' | sed s/^0$//g)$(cat ~/.config/newsboat/.update 2>/dev/null)" diff --git a/.config/i3/i3scripts/i3pacman b/.config/i3/i3scripts/i3pacman @@ -1,16 +0,0 @@ -#!/bin/sh - -# i3blocks module for pacman upgrades. -# Displays number of upgradeable packages. -# For this to work, have a `pacman -Sy` command run in the background as a -# cronjob every so often as root. This script will then read those packages. -# When clicked, it will run an upgrade via pacman. - -case $BLOCK_BUTTON in - 1) $TERMINAL -e popupgrade ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>Upgrade module:</b> -πŸ“¦: number of upgradable packages" ;; -esac - - -pacman -Qu | wc -l | sed -e "s/^0$//g" diff --git a/.config/i3/i3scripts/i3torrent b/.config/i3/i3scripts/i3torrent @@ -1,27 +0,0 @@ -#!/bin/sh - -transmission-remote -l | grep % | - sed " # This first sed command is to ensure a desirable order with sort - s/.*Stopped.*/A/g; - s/.*Seeding.*/Z/g; - s/.*100%.*/N/g; - s/.*Idle.*/B/g; - s/.*%.*/M/g" | - sort -h | uniq -c | sed " # Now we replace the standin letters with icons. - s/A/πŸ›‘/g; - s/B/βŒ›οΈ/g; - s/M/πŸ”½/g; - s/N/βœ…/g; - s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g" - -case $BLOCK_BUTTON in - 1) transmission-daemon --port 9091 --allowed "127.0.0.1" && \ - xdg-open 'http://localhost:9091/transmission/web/' ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>Torrent module:</b> -πŸ›‘: paused -⏳: waiting -πŸ”½: downloading -βœ…: done -🌱: done and seeding" ;; -esac - diff --git a/.config/i3/i3scripts/i3volume b/.config/i3/i3scripts/i3volume @@ -1,26 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) st -e pulsemixer ;; - 2) pulsemixer --toggle-mute ;; - 4) pulsemixer --change-volume +5 ;; - 5) pulsemixer --change-volume -5 ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ“’ Volume module:</b> -- Shows volume πŸ”Š, πŸ”‡ if muted. -- Middle click to mute. -- Scroll to change." -esac - -[ "$(pulsemixer --get-mute)" = "1" ] && printf "πŸ”‡\\n" && exit - -vol=$(pulsemixer --get-volume | awk '{print $1}') - -# if [ "$vol" -gt "70" ]; then -# icon="πŸ”Š" -# elif [ "$vol" -lt "30" ]; then -# icon="πŸ”ˆ" -# else -# icon="πŸ”‰" -# fi - -printf "%s %s%%\\n" "β™ͺ" "$vol" diff --git a/.config/i3/i3scripts/i3weather b/.config/i3/i3scripts/i3weather @@ -1,22 +0,0 @@ -#!/bin/sh -### This is only if your location isn't automatically detected, otherwise you can leave it blank. -location="" - -case $BLOCK_BUTTON in - 1) $TERMINAL -e less -S ~/.weatherreport ;; - 3) pgrep -x dunst >/dev/null && notify-send "<b>🌈 Weather module:</b> -- Click for wttr.in forecast. -β˜”: Chance of rain/snow -❄: Daily low -🌞: Daily high" ;; -esac - -[ "$location" != "" ] && location="$location+" - -ping -q -w 1 -c 1 "$(ip r | grep default | tail -1 | cut -d ' ' -f 3)" >/dev/null || exit - -curl -s wttr.in/$location > ~/.weatherreport - -printf "%s" "$(sed '16q;d' ~/.weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/β˜” /g" | tr -d '\n')" - -sed '13q;d' ~/.weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' diff --git a/.config/i3/status b/.config/i3/status @@ -1,68 +0,0 @@ -general { - output_format = "i3bar" - colors = true - interval = 5 - color_good = "#859900" - color_bad = "#dc322f" - color_degraded = "#cb4b16" -} - -#order += "ipv6" -#order += "disk /" -#order += "run_watch DHCP" -#order += "run_watch VPN" -order += "wireless wlp3s0" -order += "ethernet enp0s25" -order += "volume master" -order += "battery 0" -order += "load" -#order += "cpu_usage" -order += "time" - -wireless wlp3s0 { - format_up = "W: (%quality at %essid) %ip" - format_down = "W: down" -} - -ethernet enp0s25 { - # if you use %speed, i3status requires root privileges - format_up = "E: %ip (%speed)" - format_down = "E: down" -} - -volume master { - format = "V: %volume" - device = "default" - mixer = "Master" - mixer_idx = 0 -} - -battery 0 { - format = "%status %percentage %remaining" -} - -run_watch DHCP { - pidfile = "/var/run/dhclient*.pid" -} - -run_watch VPN { - #pidfile = "/var/run/vpnc/pid" - pidfile = "/var/run/vpnc/defaultroute" -} - -time { - format = "%Y-%m-%d %H:%M:%S" -} - -load { - format = "%1min %5min" -} - -cpu_usage { - #color = "#00FF00" - format= "%usage" -} - -disk "/" { - format = "%free (or: %percentage_used used, %percentage_used_of_avail used of avail, %percentage_free free, %percentage_avail avail)" -} diff --git a/.mutt/cert.pem b/.config/mutt/cert.pem diff --git a/.mutt/colors b/.config/mutt/colors diff --git a/.mutt/muttprint-groff.sh b/.config/mutt/muttprint-groff.sh diff --git a/.mutt/muttprint-vim.sh b/.config/mutt/muttprint-vim.sh diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -0,0 +1,249 @@ +# IMAP: offlineimap +set folder = "~/mail" +source ~/.config/mutt/mailboxes # mailboxes generated by offlineimap +set spoolfile = "+adamsgaard/INBOX" +set mbox_type=Maildir + +unset move # do not move messages from IMAP folders if Mutt is used for IMAP + +# Account-specific settings +folder-hook adamsgaard 'set \ + from="Anders Damsgaard <anders@adamsgaard.dk> "\ + realname="Anders Damsgaard"\ + record=+adamsgaard/Sent\ + postponed=+adamsgaard/Drafts\ + sendmail = "msmtp -a adamsgaard"' + +folder-hook geodatahub 'set \ + from="Anders Damsgaard <anders@geodatahub.dk> "\ + realname="Anders Damsgaard"\ + record=+adamsgaard/Sent\ + postponed=+adamsgaard/Drafts\ + sendmail = "msmtp -a adamsgaard"' + +folder-hook riseup 'set \ + from="Anders Damsgaard <andersd@riseup.net> "\ + realname="Anders Damsgaard"\ + record=+riseup/Sent\ + postponed=+riseup/Drafts\ + sendmail = "msmtp -a riseup"' + +folder-hook geomail 'set \ + from="Anders Damsgaard <anders.damsgaard@geo.au.dk> "\ + realname="Anders Damsgaard"\ + record=+geomail/Sent\ + postponed=+geomail/Drafts\ + sendmail = "msmtp -a geomail"' + +folder-hook ucsd 'set \ + from="Anders Damsgaard <adamsgaard@ucsd.edu> "\ + realname="Anders Damsgaard"\ + record=+ucsd/Sent\ Items\ + postponed=+ucsd/Drafts\ + sendmail = "msmtp -a ucsd"' + +folder-hook gmail 'set \ + from="Anders Damsgaard <andersdc@gmail.com> "\ + realname="Anders Damsgaard"\ + record=+gmail/[Gmail].Sent\ Mail\ + postponed=+gmail/[Gmail].Drafts\ + sendmail = "msmtp -a gmail"' + +folder-hook princeton 'set \ + from="Anders Damsgaard <andersd@princeton.edu> "\ + realname="Anders Damsgaard"\ + record=+princeton/Sent\ Items\ + postponed=+princeton/Drafts\ + sendmail = "msmtp -a princeton"' + +folder-hook noaa 'set \ + from="Anders Damsgaard <anders.damsgaard@noaa.gov> "\ + realname="Anders Damsgaard"\ + record=+noaa/[Gmail].Sent\ Mail\ + postponed=+noaa/[Gmail].Drafts\ + sendmail = "msmtp -a noaa"' + + +# ignore own e-mail addresses from group-reply +alternates anders@adamsgaard.dk|anders@andersdamsgaard.com|anders@andersdamsgaard.dk|prints@andersdamsgaard.com|prints@andersdamsgaard.dk|adamsgaard@ucsd.edu|adamsgaard@mail.ucsd.edu|andersd@risuep.net|andersdc@gmail.com|adc@geo.au.dk|anders.damsgaard@au.dk|anders.damsgaard@geo.au.dk|andersd@princeton.edu|andersd@exchange.Princeton.EDU|anders.damsgaard@noaa.gov + +# Cache files +set header_cache=~/.config/mutt/cache/headers +set message_cachedir=~/.config/mutt/cache/bodies + +# Custom certificates +set certificate_file=~/.config/mutt/certificates + +# sort threads by date +set sort=reverse-threads +set sort_aux = last-date-received + +set charset=utf-8 +set config_charset=utf-8 +set noallow_8bit +set ascii_chars=no # set to yes if terminal cannot display thread symbols +set send_charset="utf-8" +set assumed_charset="iso-8859-1" +set meta_key=yes +set attribution="* %n <%a> [%{%Y-%m-%d %H:%M:%S %Z}]:\n" +set edit_headers # edit the message headers. +set fast_reply=yes # skip initial prompts when replying +set editor="$EDITOR +'normal G' -c 'set ft=mail noautoindent spell spelllang=en_us,da'" +set nomark_old # Don't mark unread new msgs as old. +set mime_forward # Forward message as MIME attachments. +set pager_context=3 # Display 3 lines of context in pager. +set nostrict_threads # Lets have some fuzzy threading. +set fcc_clear # Keep fcc's clear of signatues and encryption. +set signature="" # Unset signature by default +set nopipe_decode # Don't decode messages when piping. +set text_flowed # label messages as format-flowed +set sleep_time=0 # speed up IMAP folders switch +set help=no # disable top help bar +set ispell="aspell -e -c" +set tilde # Fill out messages with '~'. +set read_inc=100 # Read counter ticks every 100 msgs. +set write_inc=100 # Write counter ticks every 100 msgs. +set noconfirmappend # Just append, don't hassle me. +set pager_stop=yes # Stop at end of mail instead of displaying next mail +set smart_wrap=yes # wrap long lines at a word boundary +set markers=no # show + symbol at the start of wrapped lines +#set wrap=-1 # wrap lines 1 character from right boundary +set user_agent=no # do not add "User-Agent:" header to outgoing messages + +# What we consider to be a quote. +set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +set to_chars=" +TCF " # Drop the "L". + +# Display download progress every 5K +set net_inc=5 + +# When viewing a message, show the pager in # lines above +set pager_index_lines=5 + +# Mail check interval +set timeout = 15 +set mail_check = 5 # how often (in seconds) mutt should look for new mail (default = 5 sec) + +set alias_file=~/.config/mutt/aliases # Save aliases here +set sort_alias = alias # sort alias list when displayed in mutt +set reverse_alias = yes # sort in reverse order +source ~/.config/mutt/aliases # Load in my aliases. + +source ~/.sec/gpg.rc # Use GPG +source ~/.config/mutt/colors # Define colours. + +auto_view text/html +# HTML is the last option. +alternative_order text/plain text/enriched text/html + +# attach multiple files from file browser with 't' (tag). To attach tagged +# files: ';<enter>' + +# show email in browser +bind attach <return> view-mailcap + +# vi-like movement +bind attach,index,browser gg first-entry +bind attach,index,browser G last-entry +bind pager gg top +bind pager G bottom +bind attach,index,pager,browser \CD next-page +bind attach,index,pager,browser \CU previous-page + +bind index,pager R group-reply +bind index <tab> sync-mailbox +bind index B search-opposite +bind index \ o sort-mailbox + +macro index M "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "Mark all messages as read" +macro index \ f "l~F<enter>" "Show only flagged messages" + +# Macros to change between inboxes (e.g. SPACE 1), use noop editor to accept +# IMAP folders with spaces +bind editor <space> noop +macro index \ 1 "<change-folder>=adamsgaard/INBOX/<enter>" "Go to adamsgaard inbox" +macro index \ u "<change-folder>=adamsgaard/Spam.unsure/<enter>" "Go to adamsgaard/Spam.unsure" +macro index \ a "<change-folder>=adamsgaard/academic-alerts/<enter>" "Go to adamsgaard/academic-alerts" +macro index \ s "<change-folder>=adamsgaard/Spam/<enter>" "Go to adamsgaard/Spam" +macro index \ ! "<change-folder>=adamsgaard/Sent/<enter>" "Go to adamsgaard/Sent" +macro index \ g "<change-folder>=adamsgaard/git/<enter>" "Go to adamsgaard/git" +macro index \ 2 "<change-folder>=geomail/INBOX/<enter>" "Go to Geomail inbox" +macro index \ @ "<change-folder>=geomail/Sent/<enter>" "Go to Geomail sent" +macro index \ 6 "<change-folder>=ucsd/INBOX/<enter>" "Go to UCSD inbox" +macro index \ ^ "<change-folder>=ucsd/Sent Items/<enter>" "Go to UCSD sent" +macro index \ 4 "<change-folder>=gmail/INBOX/<enter>" "Go to Gmail inbox" +macro index \ $ "<change-folder>=gmail/[Gmail].Sent\ Mail/<enter>" "Go to Gmail sent" +macro index \ c "<change-folder>=geomail/INBOX.cryolist/<enter>" "Go to cryolist" +macro index \ 3 "<change-folder>=princeton/INBOX/<enter>" "Go to Princeton inbox" +macro index \ \# "<change-folder>=princeton/Sent Items/<enter>" "Go to Princeton sent" +macro index \ 5 "<change-folder>=noaa/INBOX/<enter>" "Go to NOAA inbox" +macro index \ % "<change-folder>=noaa/[Gmail].Sent\ Mail/<enter>" "Go to NOAA sent" +macro index \ 6 "<change-folder>=riseup/INBOX/<enter>" "Go to Riseup inbox" +macro index \ ^ "<change-folder>=riseup/Sent/<enter>" "Go to Riseup sent" + + +# mutt-sidebar +set sidebar_visible = no +macro index \ S '<enter-command>toggle sidebar_visible<enter><refresh>' +macro pager \ S '<enter-command>toggle sidebar_visible<enter><redraw-screen>' +bind index,pager \CP sidebar-prev +bind index,pager \CN sidebar-next +bind index,pager \CO sidebar-open +#set sidebar_sort = yes # fix order of sidebar entries + +# abook address book +set query_command= "abook --mutt-query '%s'" +macro index,pager A "!$EDITOR ~/.config/mutt/aliases\n:source ~/.config/mutt/aliases\n" "Edit aliases file and reload it" +macro pager a "<create-alias>" "create an alias from the message sender" +macro index Y "<next-unread-mailbox>" "go to next mailbox with unread mails" + +#macro index,pager S "<enter-command>unset wait_key<enter>\ +#<pipe-entry>bogofilter -l -s<enter>\ +#<enter-command>set wait_key<enter>\ +#<bounce-message>me@rescam.org<enter>\ +#<save-message>=riseup/Spam<enter>" "mark as spam" +macro index,pager S "<enter-command>unset wait_key<enter>\ +<pipe-entry>bogofilter -l -s<enter>\ +<enter-command>set wait_key<enter>\ +<save-message>=adamsgaard/Spam<enter>" "mark as spam" + +# sync all accounts +macro index O "<enter-command>unset wait_key<enter><shell-escape>offlineimap<enter><enter-command>set wait_key<enter>" + +# sync current inbox +folder-hook adamsgaard 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a adamsgaard -qf INBOX<enter><enter-command>set wait_key<enter>"' +folder-hook riseup 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a riseup -qf INBOX<enter><enter-command>set wait_key<enter>"' +folder-hook princeton 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a princeton -qf INBOX<enter><enter-command>set wait_key<enter>"' +folder-hook geomail 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a geomail -qf INBOX<enter><enter-command>set wait_key<enter>"' + +macro index K "<enter-command>unset wait_key<enter>\ +<shell-escape>offlineimap-kill.sh<enter>" "kill all offlineimap processes" + +macro index U "<limit>all\n" "show all messages (undo limit)" + +# notmuch-mutt integration, from `man notmuch-mutt` +macro index L "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter> <shell-escape>notmuch-mutt -r --prompt search<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: search all mail" + +macro index <F9> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt -r thread<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: reconstruct thread" + +macro index <F6> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt tag -- -inbox<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: remove message from inbox" + +# show recipient instead of sender in "Sent" folder view +set date_format='%b %d %k:%M' +set index_format="%2C %Z [%D] %-22.22F (%?l?%4l&%4c?) %s" + +# mark as spam (S) or ham (H) +macro index,pager S "<enter-command>unset wait_key<enter>\ +<pipe-entry>bogofilter -l -s<enter>\ +<enter-command>set wait_key<enter>\ +<save-message>=adamsgaard/Spam<enter>" "mark as spam" +macro index,pager H "<enter-command>unset wait_key<enter>\ +<pipe-entry>bogofilter -l -n<enter>\ +<enter-command>set wait_key<enter>\ +<save-message>=adamsgaard/INBOX<enter>" "mark as ham (non-spam)" + +# convert to pdf for printing +set print_command="$HOME/.config/mutt/muttprint-groff.sh" + +# Get mutt to display its version on startup. +push <show-version> diff --git a/.mutt/offlineimap-password-store.py b/.config/mutt/offlineimap-password-store.py diff --git a/.mutt/offlineimap.py b/.config/mutt/offlineimap.py diff --git a/.mutt/view_attachment.sh b/.config/mutt/view_attachment.sh diff --git a/.mutt/colors2 b/.mutt/colors2 @@ -1,22 +0,0 @@ -# -*-muttrc-*- - -# Palette for use with the Linux console. Black background. - -color hdrdefault blue black -color quoted blue black -color signature blue black -color attachment red black -color message brightred black -color error brightred black -color indicator black red -color status brightgreen blue -color tree white black -color normal white black -color markers red black -color search white black -color tilde brightmagenta black -color index blue black ~F -color index red black "~N|~O" - -# color body brightwhite black '\*+[^*]+\*+' -# color body brightwhite black '_+[^_]+_+' diff --git a/.mutt/muttrc b/.mutt/muttrc @@ -1,251 +0,0 @@ -# IMAP: offlineimap -set folder = "~/mail" -source ~/.mutt/mailboxes # mailboxes generated by offlineimap -set spoolfile = "+adamsgaard/INBOX" -set mbox_type=Maildir - -unset move # do not move messages from IMAP folders if Mutt is used for IMAP - -# Account-specific settings -folder-hook adamsgaard 'set \ - from="Anders Damsgaard <anders@adamsgaard.dk> "\ - realname="Anders Damsgaard"\ - record=+adamsgaard/Sent\ - postponed=+adamsgaard/Drafts\ - sendmail = "msmtp -a adamsgaard"' - -folder-hook geodatahub 'set \ - from="Anders Damsgaard <anders@geodatahub.dk> "\ - realname="Anders Damsgaard"\ - record=+adamsgaard/Sent\ - postponed=+adamsgaard/Drafts\ - sendmail = "msmtp -a adamsgaard"' - -folder-hook riseup 'set \ - from="Anders Damsgaard <andersd@riseup.net> "\ - realname="Anders Damsgaard"\ - record=+riseup/Sent\ - postponed=+riseup/Drafts\ - sendmail = "msmtp -a riseup"' - -folder-hook geomail 'set \ - from="Anders Damsgaard <anders.damsgaard@geo.au.dk> "\ - realname="Anders Damsgaard"\ - record=+geomail/Sent\ - postponed=+geomail/Drafts\ - sendmail = "msmtp -a geomail"' - -folder-hook ucsd 'set \ - from="Anders Damsgaard <adamsgaard@ucsd.edu> "\ - realname="Anders Damsgaard"\ - record=+ucsd/Sent\ Items\ - postponed=+ucsd/Drafts\ - sendmail = "msmtp -a ucsd"' - -folder-hook gmail 'set \ - from="Anders Damsgaard <andersdc@gmail.com> "\ - realname="Anders Damsgaard"\ - record=+gmail/[Gmail].Sent\ Mail\ - postponed=+gmail/[Gmail].Drafts\ - sendmail = "msmtp -a gmail"' - -folder-hook princeton 'set \ - from="Anders Damsgaard <andersd@princeton.edu> "\ - realname="Anders Damsgaard"\ - record=+princeton/Sent\ Items\ - postponed=+princeton/Drafts\ - sendmail = "msmtp -a princeton"' - -folder-hook noaa 'set \ - from="Anders Damsgaard <anders.damsgaard@noaa.gov> "\ - realname="Anders Damsgaard"\ - record=+noaa/[Gmail].Sent\ Mail\ - postponed=+noaa/[Gmail].Drafts\ - sendmail = "msmtp -a noaa"' - - -# ignore own e-mail addresses from group-reply -alternates anders@adamsgaard.dk|anders@andersdamsgaard.com|anders@andersdamsgaard.dk|prints@andersdamsgaard.com|prints@andersdamsgaard.dk|adamsgaard@ucsd.edu|adamsgaard@mail.ucsd.edu|andersd@risuep.net|andersdc@gmail.com|adc@geo.au.dk|anders.damsgaard@au.dk|anders.damsgaard@geo.au.dk|andersd@princeton.edu|andersd@exchange.Princeton.EDU|anders.damsgaard@noaa.gov - -# Cache files -set header_cache=~/.mutt/cache/headers -set message_cachedir=~/.mutt/cache/bodies - -# Custom certificates -set certificate_file=~/.mutt/certificates - -# sort threads by date -set sort=reverse-threads -set sort_aux = last-date-received - -set charset=utf-8 -set config_charset=utf-8 -set noallow_8bit -set ascii_chars=no # set to yes if terminal cannot display thread symbols -set send_charset="utf-8" -set assumed_charset="iso-8859-1" -set meta_key=yes -set attribution="* %n <%a> [%{%Y-%m-%d %H:%M:%S %Z}]:\n" -set edit_headers # edit the message headers. -set fast_reply=yes # skip initial prompts when replying -set editor="$EDITOR +'normal G' -c 'set ft=mail noautoindent spell spelllang=en_us,da'" -set nomark_old # Don't mark unread new msgs as old. -set mime_forward # Forward message as MIME attachments. -set pager_context=3 # Display 3 lines of context in pager. -set nostrict_threads # Lets have some fuzzy threading. -set fcc_clear # Keep fcc's clear of signatues and encryption. -set signature="" # Unset signature by default -set nopipe_decode # Don't decode messages when piping. -set text_flowed # label messages as format-flowed -set sleep_time=0 # speed up IMAP folders switch -set help=no # disable top help bar -set ispell="aspell -e -c" -set tilde # Fill out messages with '~'. -set read_inc=100 # Read counter ticks every 100 msgs. -set write_inc=100 # Write counter ticks every 100 msgs. -set noconfirmappend # Just append, don't hassle me. -set pager_stop=yes # Stop at end of mail instead of displaying next mail -set smart_wrap=yes # wrap long lines at a word boundary -set markers=no # show + symbol at the start of wrapped lines -#set wrap=-1 # wrap lines 1 character from right boundary -set user_agent=no # do not add "User-Agent:" header to outgoing messages - -# What we consider to be a quote. -set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" -set to_chars=" +TCF " # Drop the "L". - -# Display download progress every 5K -set net_inc=5 - -# When viewing a message, show the pager in # lines above -set pager_index_lines=5 - -# Mail check interval -set timeout = 15 -set mail_check = 5 # how often (in seconds) mutt should look for new mail (default = 5 sec) - -set alias_file=~/.mutt/aliases # Save aliases here -set sort_alias = alias # sort alias list when displayed in mutt -set reverse_alias = yes # sort in reverse order -source ~/.mutt/aliases # Load in my aliases. - -source ~/.sec/gpg.rc # Use GPG -source ~/.mutt/colors # Define colours. -#source ~/.mutt/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc - -auto_view text/html -# HTML is the last option. -alternative_order text/plain text/enriched text/html - -# attach multiple files from file browser with 't' (tag). To attach tagged -# files: ';<enter>' - -# show email in browser -bind attach <return> view-mailcap -#macro attach <return> "<pipe-entry>cat >~/.mutt_mail.html && open ~/.mutt_mail.html<enter>" "show attachment in browser" - -# vi-like movement -bind attach,index,browser gg first-entry -bind attach,index,browser G last-entry -bind pager gg top -bind pager G bottom -bind attach,index,pager,browser \CD next-page -bind attach,index,pager,browser \CU previous-page - -bind index,pager R group-reply -bind index <tab> sync-mailbox -bind index B search-opposite -bind index \ o sort-mailbox - -macro index M "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>" "Mark all messages as read" -macro index \ f "l~F<enter>" "Show only flagged messages" - -# Macros to change between inboxes (e.g. SPACE 1), use noop editor to accept -# IMAP folders with spaces -bind editor <space> noop -macro index \ 1 "<change-folder>=adamsgaard/INBOX/<enter>" "Go to adamsgaard inbox" -macro index \ u "<change-folder>=adamsgaard/Spam.unsure/<enter>" "Go to adamsgaard/Spam.unsure" -macro index \ a "<change-folder>=adamsgaard/academic-alerts/<enter>" "Go to adamsgaard/academic-alerts" -macro index \ s "<change-folder>=adamsgaard/Spam/<enter>" "Go to adamsgaard/Spam" -macro index \ ! "<change-folder>=adamsgaard/Sent/<enter>" "Go to adamsgaard/Sent" -macro index \ g "<change-folder>=adamsgaard/git/<enter>" "Go to adamsgaard/git" -macro index \ 2 "<change-folder>=geomail/INBOX/<enter>" "Go to Geomail inbox" -macro index \ @ "<change-folder>=geomail/Sent/<enter>" "Go to Geomail sent" -macro index \ 6 "<change-folder>=ucsd/INBOX/<enter>" "Go to UCSD inbox" -macro index \ ^ "<change-folder>=ucsd/Sent Items/<enter>" "Go to UCSD sent" -macro index \ 4 "<change-folder>=gmail/INBOX/<enter>" "Go to Gmail inbox" -macro index \ $ "<change-folder>=gmail/[Gmail].Sent\ Mail/<enter>" "Go to Gmail sent" -macro index \ c "<change-folder>=geomail/INBOX.cryolist/<enter>" "Go to cryolist" -macro index \ 3 "<change-folder>=princeton/INBOX/<enter>" "Go to Princeton inbox" -macro index \ \# "<change-folder>=princeton/Sent Items/<enter>" "Go to Princeton sent" -macro index \ 5 "<change-folder>=noaa/INBOX/<enter>" "Go to NOAA inbox" -macro index \ % "<change-folder>=noaa/[Gmail].Sent\ Mail/<enter>" "Go to NOAA sent" -macro index \ 6 "<change-folder>=riseup/INBOX/<enter>" "Go to Riseup inbox" -macro index \ ^ "<change-folder>=riseup/Sent/<enter>" "Go to Riseup sent" - - -# mutt-sidebar -set sidebar_visible = no -macro index \ S '<enter-command>toggle sidebar_visible<enter><refresh>' -macro pager \ S '<enter-command>toggle sidebar_visible<enter><redraw-screen>' -bind index,pager \CP sidebar-prev -bind index,pager \CN sidebar-next -bind index,pager \CO sidebar-open -#set sidebar_sort = yes # fix order of sidebar entries - -# abook address book -set query_command= "abook --mutt-query '%s'" -macro index,pager A "!$EDITOR ~/.mutt/aliases\n:source ~/.mutt/aliases\n" "Edit aliases file and reload it" -macro pager a "<create-alias>" "create an alias from the message sender" -macro index Y "<next-unread-mailbox>" "go to next mailbox with unread mails" - -#macro index,pager S "<enter-command>unset wait_key<enter>\ -#<pipe-entry>bogofilter -l -s<enter>\ -#<enter-command>set wait_key<enter>\ -#<bounce-message>me@rescam.org<enter>\ -#<save-message>=riseup/Spam<enter>" "mark as spam" -macro index,pager S "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -s<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/Spam<enter>" "mark as spam" - -# sync all accounts -macro index O "<enter-command>unset wait_key<enter><shell-escape>offlineimap<enter><enter-command>set wait_key<enter>" - -# sync current inbox -folder-hook adamsgaard 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a adamsgaard -qf INBOX<enter><enter-command>set wait_key<enter>"' -folder-hook riseup 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a riseup -qf INBOX<enter><enter-command>set wait_key<enter>"' -folder-hook princeton 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a princeton -qf INBOX<enter><enter-command>set wait_key<enter>"' -folder-hook geomail 'macro index o "<enter-command>unset wait_key<enter><shell-escape>offlineimap -a geomail -qf INBOX<enter><enter-command>set wait_key<enter>"' - -macro index K "<enter-command>unset wait_key<enter>\ -<shell-escape>offlineimap-kill.sh<enter>" "kill all offlineimap processes" - -macro index U "<limit>all\n" "show all messages (undo limit)" - -# notmuch-mutt integration, from `man notmuch-mutt` -macro index L "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter> <shell-escape>notmuch-mutt -r --prompt search<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: search all mail" - -macro index <F9> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt -r thread<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: reconstruct thread" - -macro index <F6> "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter><pipe-message>notmuch-mutt tag -- -inbox<enter><enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" "notmuch: remove message from inbox" - -# show recipient instead of sender in "Sent" folder view -set date_format='%b %d %k:%M' -set index_format="%2C %Z [%D] %-22.22F (%?l?%4l&%4c?) %s" - -# mark as spam (S) or ham (H) -macro index,pager S "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -s<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/Spam<enter>" "mark as spam" -macro index,pager H "<enter-command>unset wait_key<enter>\ -<pipe-entry>bogofilter -l -n<enter>\ -<enter-command>set wait_key<enter>\ -<save-message>=adamsgaard/INBOX<enter>" "mark as ham (non-spam)" - -# convert to pdf for printing -set print_command="$HOME/.mutt/muttprint-groff.sh" - -# Get mutt to display its version on startup. -push <show-version> diff --git a/.offlineimaprc b/.offlineimaprc @@ -1,19 +1,12 @@ -# Sample minimal config file. Copy this to ~/.offlineimaprc and edit to -# suit to get started fast. - -# passwords for offlineimap and msmtprc stored in OSX keychain -# http://stevelosh.com/blog/2012/10/the-homely-mutt/#getting-email - [general] -# List of accounts to be synced, separated by a comma. accounts = adamsgaard,geomail,princeton ui = ttyui -pythonfile=~/.mutt/offlineimap-password-store.py +pythonfile=~/.config/mutt/offlineimap-password-store.py maxsyncaccounts = 10 [mbnames] enabled = yes -filename = ~/.mutt/mailboxes +filename = ~/.config/mutt/mailboxes header = "mailboxes " peritem = "+%(accountname)s/%(foldername)s" sep = " " @@ -57,7 +50,7 @@ sslcacertfile=/etc/ssl/cert.pem [Account adamsgaard] localrepository = adamsgaard-local remoterepository = adamsgaard-remote -#presynchook = imapfilter -t ~/.mutt/cert.pem -c ~/.imapfilter/adamsgaard.lua +#presynchook = imapfilter -t ~/.config/mutt/cert.pem -c ~/.config/imapfilter/adamsgaard.lua postsynchook = notmuch new [Repository adamsgaard-local] diff --git a/.tmux.conf b/.tmux.conf @@ -21,7 +21,7 @@ bind , rename-window "" \; command-prompt "rename-window '%%'" #### APPEARANCE -# set -g default-terminal "xterm-256color" # use 256 colors +set -g default-terminal "xterm-256color" # use 256 colors # set -ga terminal-overrides ',xterm-256color:Tc' # fix escape sequences set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # fix escape sequences setw -g aggressive-resize on # resize window to smallest client