+online_mail/.mutt/com.friedersdorff.max/
+online_mail/.mutt/uk.ac.aber.maf54/
+aliases
*.color15: #ffffff
-*faceName: Liberation Mono
-*faceSize: 14
+XTerm*faceName: Liberation Mono
+XTerm*faceSize: 14
+URxvt*font: xft:Liberation Mono:size=14
+URxvt*letterSpace: -1
+URxvt*scrollBar: false
+
+URxvt*transparent: true
+URxvt*shading: 25
+
+URxvt.urgentOnBell: True
XTerm*termName: xterm-256color
+URxvt*termName: xterm-256color
XTerm*metaSendsEscape: true
Xterm*eightBitinput: true
--- /dev/null
+*faceSize: 12
\ No newline at end of file
xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
xmodmap -e "add Control = Control_L Control_R"
;;
- beryllium)
+ beryllium|magnesium)
setxkbmap -variant colemak us
xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L"
xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
beryllium)
xrandr --output HDMI-1 --left-of DVI-I-1
;;
+ magnesium)
+ xrandr --output VGA1 --right-of HDMI2
+ ;;
*)
;;
esac
cat ~/.ratpoisonrc.base ~/.ratpoisonrc.$HOSTNAME > ~/.ratpoisonrc
+# run xcreensaver
+if [ -x $(which xscreensaver) ]; then
+ xscreensaver&
+fi
+
case $HOSTNAME in
- platinum)
- exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startkde
- ;;
- *)
- exec /usr/bin/ratpoison
+ magnesium)
+ exec i3
+ ;;
+ *)
+ exec ratpoison
+ ;;
esac
-
--- /dev/null
+#!/bin/bash
+
+
+PASS_FILE="/dev/shm/max_aber_passwd"
+PID="/dev/shm/max_mbsync_loop_pid"
+LOG="/dev/shm/max_mail_log"
+touch $LOG
+
+clean_up()
+{
+ kill -TERM $(cat $PID)
+ rm $PID
+
+ sync_mailboxes
+ rm $PASS_FILE
+ exit
+}
+
+trap clean_up SIGTERM SIGHUP SIGINT
+
+sync_mailboxes()
+{
+ /usr/bin/mbsync -c /home/max/.mbsync.aber -a >> $LOG 2>&1
+}
+
+sync_mailboxes_loop()
+{
+ while true
+ do
+ sync_mailboxes
+
+ sleep 20
+ done
+}
+
+
+rm -f $PASS_FILE
+
+touch $PASS_FILE
+chown max:max $PASS_FILE
+chmod 600 $PASS_FILE
+pass Aber/Main | head -n 1 > $PASS_FILE
+
+sync_mailboxes_loop& >> $LOG 2>&1
+echo $! > $PID
+/usr/bin/mutt -F ~/.mutt/mutt.uk.ac.aber.maf54
+
+clean_up
--- /dev/null
+IMAPAccount aber
+Host outlook.office365.com
+User maf54@aber.ac.uk
+PassCmd "cat /dev/shm/max_aber_passwd"
+SSLType STARTTLS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+IMAPStore aber-remote
+Account aber
+
+MaildirStore aber-local
+Path ~/mail_aber/
+Inbox ~/mail_aber/Inbox
+SubFolders Verbatim
+
+Channel aber
+Master :aber-remote:
+Slave :aber-local:
+Patterns "INBOX" "INBOX/staging" "Sent" "Trash" "Junk E-Mail" "Lists/centos-sec" "Lists/ibers-all" "Lists/ubuntu-sec" "Notifications/NPPC" "Notifications/NPPC/Updates" "Notifications/NPPC/Uptime" "Notifications/NPPC/Icinga" "Notifications/ibers-cs" "Notifications/ibers-cs/vmcpuload" "UCU" "Suppliers/BrightComputing" "Suppliers/ClusterVision"
+Create Both
+SyncState *
+Expunge Both
--- /dev/null
+# vim: filetype=muttrc
+
+color normal brightyellow default
+color error red default
+color tilde black default
+color message cyan default
+color markers red white
+color attachment white default
+color search brightmagenta default
+color status brightyellow black
+color indicator brightblack yellow
+color tree yellow default # arrow in threads
+
+color index brightmagenta default "~Q" # messages that have been replied to
+color index blue default "~U" # unread messages
+color index blue default "~U~$" # unread, unreferenced messages
+color index black red "~D" # deleted messages
+
+# Sidebar
+color sidebar_indicator default color17
+color sidebar_highlight default color238
+color sidebar_new green default
--- /dev/null
+set crypt_autosign
+set crypt_autopgp
+set crypt_replyencrypt
+set crypt_replysign
+set crypt_replysignencrypted
+set crypt_timestamp
+set crypt_use_gpgme
+set pgp_use_gpg_agent
+set pgp_auto_decode
--- /dev/null
+macro index 'c' '<change-folder>?<change-dir><home>^K+<enter>'
+
+# Source the passwords file
+#source "gpg2 -dq ~/.mutt/passwords.gpg |"
+set my_aber_password=`pass Aber/Main | head -n 1`
+
+# Automatically render html emails. Not sure if this is a good idea
+auto_view text/html
+alternative_order text/plain text/enriched text/html
+
+# use abook for aliases
+set alias_file=~/.aliases
+set sort_alias= alias
+source $alias_file
+set query_command = "abook --mutt-query '%s'"
+macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"
+
+# View urls more easily with urlview
+macro index \cb "|urlview\n"
+macro pager \cb "|urlview\n"
+
+macro pager \cb "\
+:set my_tmp_pipe_decode=\$pipe_decode\n\
+:set pipe_decode\n\
+|urlview\n\
+:set pipe_decode=\$my_tmp_pipe_decode\n\
+:unset my_tmp_pipe_decode\n" \
+# call urlview to extract URLS out of a message
+
+set text_flowed=yes
+set reflow_text=yes
+set editor="vim -v +':set textwidth=72' +'set fo=aw'"
+
+# Encryption
+source ~/.mutt/gpg.rc
+
+# Speed up folder switch
+set sleep_time=0
+
+# Mutt colors
+source ~/.mutt/colors.mutt
+
+set sort=threads
+set sort_aux=last-date-received
+
+set fast_reply=yes
+
+# Show message some message headers when reading mail
+set pager_index_lines=10
+
+# Show some context when paging through email
+set pager_context=5
+
+# Stop at the end of the email
+set pager_stop=yes
+
+# Remove all headers by default
+ignore *
+unignore from date subject to cc
+
+# Use sidebar
+set mail_check_stats
+set sidebar_visible=yes
+set sidebar_width=25
+set sidebar_folder_indent=yes
+set sidebar_short_path=yes
+set sidebar_divider_char='│'
+set sidebar_format='%B%* %N'
+
+bind index,pager \CP sidebar-prev
+bind index,pager \CN sidebar-next
+bind index,pager \CO sidebar-open
+unmailboxes *
+
+# Mailbox specific settings
+set smtp_url = "smtp://maf54@aber.ac.uk@smtp.office365.com:587"
+set smtp_pass = $my_aber_password
+set from = "maf54@aber.ac.uk"
+set realname = "Maximilian Friedersdorff"
+set folder = "~/mail_aber"
+set spoolfile = "+Inbox"
+set postponed = "+Drafts"
+set trash = "+Trash"
+set record = "+Sent"
+
+set pgp_sign_as="0x251C939D"
+
+mailboxes "+Inbox" "+Inbox/staging" "+Lists" "+Lists/ibers-all" "+Lists/centos-sec" "+Lists/ubuntu-sec" "+Notifications" "+Notifications/ibers-cs" "+Notifications/ibers-cs/vmcpuload" "+Notifications/NPPC" "+Notifications/NPPC/Updates" "+Notifications/NPPC/Uptime" "+Notifications/NPPC/Icinga" "+UCU" "+Suppliers" "+Suppliers/BrightComputing" "+Suppliers/ClusterVision"
-export EDITOR="emc"
-export PAGER="/usr/bin/less -R"
+export EDITOR="vim"
export PATH="/home/max/.local/bin:${PATH}"
export TMPDIR="/home/max/.local/tmp"
# check if inside git repo
local git_status="`git status -unormal 2>&1`"
- if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
+ if git rev-parse --git-dir > /dev/null 2>&1; then
+ git_status=$(git status --porcelain)
# parse the porcelain output of git status
- if [[ "$git_status" =~ nothing\ to\ commit ]]; then
+ if [[ ! $git_status = *[![:space:]]* ]]; then
local Color_On=$GREEN
- elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
+ elif [[ $git_status =~ ^\?\? ]]; then
local Color_On=$CYAN
else
local Color_On=$RED
fi
- if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then
- branch=${BASH_REMATCH[1]}
- else
- # Detached HEAD. (branch=HEAD is a faster alternative.)
- branch="(`git describe --all --contains --abbrev=4 HEAD 2> /dev/null || echo HEAD`)"
- fi
+ branch=$(git symbolic-ref -q HEAD)
+ branch=${branch##refs/heads/}
+ branch=${branch:-HEAD}
# add the result to prompt
PS1+="\n\[$Color_On\][$branch]\[$RESET\]\n"
--- /dev/null
+# Colors
+set_from_resource $black i3wm.color0 #000000
+set_from_resource $black_super i3wm.color8 #000000
+
+set_from_resource $red i3wm.color1 #ff0000
+set_from_resource $red_super i3wm.color9 #dd0000
+
+set_from_resource $green i3wm.color2 #00ff00
+set_from_resource $green_super i3wm.color10 #00dd00
+
+set_from_resource $yellow i3wm.color3 #000000
+set_from_resource $yellow_super i3wm.color11 #000000
+
+set_from_resource $blue i3wm.color4 #000000
+set_from_resource $blue_super i3wm.color12 #000000
+
+set_from_resource $magenta i3wm.color5 #000000
+set_from_resource $magenta_super i3wm.color13 #000000
+
+set_from_resource $cyan i3wm.color6 #000000
+set_from_resource $cyan_super i3wm.color14 #000000
+
+set_from_resource $white i3wm.color7 #000000
+set_from_resource $white_super i3wm.color15 #000000
+
+client.focused $black $yellow_super $black $black $black
+client.focused_inactive $black $black_super $white $black $black
+
+
+set $mod Mod4
+
+font pango:Liberation Mono 8
+
+# Use Mouse+$mod to drag floating windows to their wanted position
+floating_modifier $mod
+
+bindsym Control+t mode "$ratpoison"
+
+set $ws1 "1"
+set $ws2 "2"
+set $ws3 "3"
+set $ws4 "4"
+set $ws5 "5"
+set $ws6 "6"
+set $ws7 "7"
+set $ws8 "8"
+set $ws9 "9"
+set $ws10 "10"
+
+mode "$ratpoison" {
+# All/most commands in this mode should revert to the default mode on comleption.
+# We are emulating ratpoison (kinda) here
+
+# Moving to workspaces
+# bindsym n workspace next mode "default"
+# bindsym Shift+n workspace prev mode "default"
+
+ bindsym 1 mode "default" workspace $ws1
+ bindsym 2 mode "default" workspace $ws2
+ bindsym 3 mode "default" workspace $ws3
+ bindsym 4 mode "default" workspace $ws4
+ bindsym 5 mode "default" workspace $ws5
+ bindsym 6 mode "default" workspace $ws6
+ bindsym 7 mode "default" workspace $ws7
+ bindsym 8 mode "default" workspace $ws8
+ bindsym 9 mode "default" workspace $ws9
+ bindsym 0 mode "default" workspace $ws10
+
+ bindsym Shift+1 mode "default" move container to workspace $ws1
+ bindsym Shift+2 mode "default" move container to workspace $ws2
+ bindsym Shift+3 mode "default" move container to workspace $ws3
+ bindsym Shift+4 mode "default" move container to workspace $ws4
+ bindsym Shift+5 mode "default" move container to workspace $ws5
+ bindsym Shift+6 mode "default" move container to workspace $ws6
+ bindsym Shift+7 mode "default" move container to workspace $ws7
+ bindsym Shift+8 mode "default" move container to workspace $ws8
+ bindsym Shift+9 mode "default" move container to workspace $ws9
+ bindsym Shift+0 mode "default" move container to workspace $ws10
+
+# Moving focus
+# bindsym Tab focus right mode "default"
+# bindsym Shift+Tab focus left mode "default"
+
+ bindsym h focus left mode "default"
+ bindsym j focus down mode "default"
+ bindsym k focus up mode "default"
+ bindsym l focus right mode "default"
+
+
+# Moving windows
+ bindsym Shift+h mode "default" move left
+ bindsym Shift+j mode "default" move down
+ bindsym Shift+k mode "default" move up
+ bindsym Shift+l mode "default" move right
+
+# Changing split modes
+ bindsym v split v mode "default"
+ bindsym o split h mode "default"
+
+
+ bindsym c mode "default" exec i3-sensible-terminal
+ bindsym q mode "default" kill
+
+ bindsym Shift+e mode "default" exec dmenu_run
+
+ bindsym Escape mode "default"
+
+ bindsym $mod+l mode "default" exec "xscreensaver-command -lock&"
+
+}
+
+
+
+# There also is the (new) i3-dmenu-desktop which only displays applications
+# shipping a .desktop file. It is a wrapper around dmenu, so you need that
+# installed.
+# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
+
+# enter fullscreen mode for the focused container
+bindsym $mod+t fullscreen toggle
+
+# change container layout (stacked, tabbed, toggle split)
+bindsym $mod+r layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+f layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# focus the child container
+#bindsym $mod+d focus child
+
+# reload the configuration file
+bindsym $mod+Shift+c 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'"
+
+# resize window (you can also use the mouse for that)
+mode "resize" {
+# These bindings trigger as soon as you enter the resize mode
+
+# Pressing left will shrink the window’s width.
+# Pressing right will grow the window’s width.
+# Pressing up will shrink the window’s height.
+# Pressing down will grow the window’s height.
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
+
+# same bindings, but for the arrow keys
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
+
+# back to normal: Enter or Escape or $mod+r
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+ bindsym $mod+p mode "default"
+}
+
+bindsym $mod+p mode "resize"
+
+
+
+hide_edge_borders both
+workspace 1 output HDMI2
+workspace 2 output VGA1
+
+focus_follows_mouse no
+
+focus_on_window_activation urgent
+
+
+
+
+
+# Start i3bar to display a workspace bar (plus the system information i3status
+# finds out, if available)
+bar {
+ id bar_left
+ status_command conky-i3bar
+ position top
+ output "DVI-I-1"
+ font pango:Liberation Mono 10
+ colors {
+ background $black_super
+ focused_background $black
+ focused_workspace $black_super $yellow_super $black
+ active_workspace $black_super $blue_super $black
+ inactive_workspace $black_super $black_super $white_super
+ urgent_workspace $black $red_super $white
+ }
+}
+
+bar {
+ id bar_right
+ position top
+ output "HDMI-4"
+ font pango:Liberation Mono 10
+ colors {
+ background $black_super
+ focused_background $black
+ focused_workspace $black_super $yellow_super $black
+ active_workspace $black_super $blue_super $black
+ inactive_workspace $black_super $black_super $white_super
+ urgent_workspace $black $red_super $white
+ }
+}
--- /dev/null
+-- vim: ts=4 sw=4 noet ai cindent syntax=lua
+
+conky.config = {
+ out_to_x = false,
+ own_window = false,
+ out_to_console = true,
+ short_units = true,
+ update_interval = 0.5,
+ background = false,
+ max_text_width = 0,
+ total_run_times = 0,
+ short_units = true,
+ if_up_strictness = 'address',
+ use_spacer = 'left',
+
+ cpu_avg_samples = 2,
+};
+
+conky.text = [[
+[
+ ${if_running mutt}
+ {"full_text": "${new_mails mail_aber/Inbox} new mails", "color": "\#ffa500"},
+ ${endif}
+ {"full_text": "Home ${fs_free /home} Free", "color": "\#ffffff"},
+ {"full_text": "Root ${fs_free /root} Free", "color": "\#ffffff"},
+ {"full_text": "Disk r:${diskio_read} w:${diskio_write}", "color": "\#ffffff"},
+ {"full_text": "CPU ${cpu cpu0}%", "color": "\#ffffff"},
+ {
+ "full_text": "d:${downspeed eno1} u:${upspeed eno1} ${addr eno1}",
+ "color":
+ ${if_match "${addr eno1}"=="No Address"}
+ "\#ff0000"
+ ${else}
+ "\#00ff00"
+ ${endif}
+ },
+ ${if_match "${addr tun0}"!="No Address"}
+ {"full_text": "VPN", "color": "\#00ff00"},
+ ${endif}
+ {
+ "full_text": "RAM ${memperc}%",
+ "color":
+ ${if_match ${memperc}<90}
+ "\#ffffff"
+ ${else}
+ "\#ff0000"
+ ${endif}
+ },
+ {"full_text": "${time}", "color": "\#ffffff"}
+],
+]];
+
--- /dev/null
+#!/bin/sh
+
+echo '{"version":1}'
+
+echo '['
+
+echo '[],'
+
+exec conky -c ~/.conkyrc
--- /dev/null
+text/html; lynx -stdin -dump -force_html ; copiousoutput
+application/pdf; mupdf %s;
+application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice %s;
+application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice %s;
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice %s;
+++ /dev/null
-text/html; lynx -stdin -dump -force_html ; copiousoutput
+++ /dev/null
-text/html; lynx -stdin -dump -force_html ; copiousoutput
+unmailboxes *
+
set imap_user = "max@friedersdorff.com"
set imap_pass = $my_personal_password
set smtp_url = "smtp://max@friedersdorff.com@mail.friedersdorff.com:587"
set record = "+Sent"
set pgp_sign_as="0xDA2EDF6D"
+
+mailboxes "+INBOX" "+todo" "+quicknote" "+google"
+unmailboxes *
+
set imap_user = "maf54@aber.ac.uk"
set imap_pass = $my_aber_password
set smtp_url = "smtp://maf54@aber.ac.uk@smtp.office365.com:587"
set record = "+Sent"
set pgp_sign_as="0x251C939D"
+
+mailboxes "+INBOX" "+Lists" "+Lists/ibers-all" "+Lists/centos-sec" "+Lists/unbuntu-sec" "+Notifications" "+Notifications/ibers-cs"
color index blue default "~U" # unread messages
color index blue default "~U~$" # unread, unreferenced messages
color index black red "~D" # deleted messages
+
+# Sidebar
+color sidebar_indicator default color17
+color sidebar_highlight default color238
+color sidebar_new green default
# Macro keys for different mailboxes
-macro index \e1 '<sync-mailbox><change-folder>imaps://mail.friedersdorff.com<enter>'
-macro index \e2 '<sync-mailbox><change-folder>imaps://outlook.office365.com<enter>'
+macro index \e1 '<sync-mailbox><change-folder>imaps://mail.friedersdorff.com<enter><sidebar-open>'
+macro index \e2 '<sync-mailbox><change-folder>imaps://outlook.office365.com<enter><sidebar-open>'
# Configuration files for different mailboxes
set text_flowed=yes
set reflow_text=yes
+
set editor="vim +':set textwidth=72' +'set fo=aw'"
# Encryption
# Show message some message headers when reading mail
set pager_index_lines=10
+
+# Remove all headers by default
+ignore *
+unignore from date subject to cc
+
+# Use sidebar
+set mail_check_stats
+set sidebar_visible=yes
+set sidebar_width=25
+set sidebar_folder_indent=yes
+set sidebar_short_path=yes
+set sidebar_divider_char='│'
+set sidebar_format='%B%* %N'
+
+bind index,pager \CP sidebar-prev
+bind index,pager \CN sidebar-next
+bind index,pager \CO sidebar-open
--- /dev/null
+bind L exec xscreensaver-command -lock