commit 0be87672329ad0b083bd0475983df407208b0a59
parent bee9d27331e63983b6dbda4d89c45f714040ca8b
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 7 Nov 2013 21:25:02 +0100
Merge branch 'master' of https://github.com/anders-dc/dotfiles
Diffstat:
10 files changed, 151 insertions(+), 115 deletions(-)
diff --git a/.Xdefaults b/.Xdefaults
@@ -142,7 +142,7 @@ URxvt.termName:screen-256color
!URxvt.shading: 20
! scrollbar style - rxvt (default), plain (most compact), next, or xterm
!URxvt.scrollstyle: rxvt
-URxvt.internalBorder: 1
+URxvt.internalBorder: 1
!URxvt.loginShell: true
URxvt.scrollBar: off
!URxvt.font: 7x13euro
diff --git a/.i3/config b/.i3/config
@@ -52,7 +52,7 @@ bindsym $mod+z exec i3lock -c 111111 -d
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
-bindsym $mod+space exec dmenu_run
+bindsym $mod+space exec dmenu_run -nb \#222222 -nf \#888888 -sb \#285577 -sf \#ffffff
# change focus
bindsym $mod+h focus left
@@ -105,9 +105,9 @@ bindsym $mod+a focus parent
bindsym $mod+d focus child
# switch to workspace
-bindsym $mod+1 workspace 1: www
-bindsym $mod+2 workspace 2: dev
-bindsym $mod+3 workspace 3: ssh
+bindsym $mod+1 workspace 1
+bindsym $mod+2 workspace 2
+bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
@@ -117,9 +117,9 @@ bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
-bindsym $mod+Shift+1 move container to workspace 1: www
-bindsym $mod+Shift+2 move container to workspace 2: dev
-bindsym $mod+Shift+3 move container to workspace 3: ssh
+bindsym $mod+Shift+1 move container to workspace 1
+bindsym $mod+Shift+2 move container to workspace 2
+bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
@@ -164,5 +164,26 @@ bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
- status_command i3status --config ~/.i3/status
+ status_command i3status --config ~/.i3/status
+ #position top
+ position bottom
+ mode hide
+ workspace_buttons yes
+ tray_output none
+
+ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
+
+ colors {
+ #background #000000
+ background #111111
+ statusline #ffffff
+
+ focused_workspace #ffffff #285577
+ active_workspace #ffffff #333333
+ inactive_workspace #888888 #222222
+ urgent_workspace #ffffff #900000
+ }
}
+
+# auto-start programs
+exec --no-startup-id urxvt -e tmux-utility.sh
diff --git a/.i3/status b/.i3/status
@@ -15,6 +15,11 @@ order += "load"
order += "cpu_usage"
order += "time"
+wireless wlan1 {
+ format_up = "W: (%quality at %essid) %ip"
+ format_down = "W: down"
+}
+
wireless wlan0 {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
diff --git a/.mutt/muttrc b/.mutt/muttrc
@@ -1,11 +1,9 @@
-### Users and passwords
-
set my_realname = "Anders Damsgaard"
# Use GPG signature to decode pass file
# Password file (e.g. pass.txt) should be in the form:
-# NFIT password
-# Gmail password
+# NFIT password
+# Gmail password
# Encrypt it using `gpg -o ~/.sec/pass.gpg -e pass.txt`.
# Delete the plaintext pass.txt afterwards, e.g. `shred pass.txt && rm pass.txt`.
set my_tmp_secret = `gpg -o ~/.sec/.tmp -d ~/.sec/pass.gpg`
@@ -23,57 +21,26 @@ set my_riseup_pass = `awk '/Riseup/ {print $2}' ~/.sec/.tmp`
# Remove temporary password file
set my_del=`rm -f ~/.sec/.tmp`
-
-# List of mail folders
-mailboxes ~/Mail \
- 'imaps://imap.au.dk:993/'\
- 'imaps://mail.riseup.net:993/'
-# 'imaps://imap.gmail.com:993/'
-
- # Base hook to reset account variables to known state before activating new ones
-account-hook . 'unset preconnect imap_user imap_pass imap_authenticators; set ssl_starttls=yes'
-
-account-hook imap.au.dk 'set imap_user=$my_nfit_user imap_pass=$my_nfit_pass'
-account-hook mail.riseup.net 'set imap_user=$my_riseup_user imap_pass=$my_riseup_pass'
-
-# Macros to change between inboxes
-macro index <f2> '<change-folder>imaps://imap.au.dk<enter>'
-macro index <f3> '<change-folder>imaps://mail.riseup.net<enter>'
-
-## NFIT mail
-account-hook imaps://imap.au.dk:993/ 'set \
- imap_user = $my_nfit_user\
- imap_pass = $my_nfit_pass\
- imap_authenticators = "login"\
- smtp_authenticators = "login"\
- smtp_url = "smtp://$my_nfit_user@asmtp.au.dk:587"\
- smtp_pass = $my_nfit_pass'
-folder-hook imap.au.dk 'set \
- folder = imaps://imap.au.dk:993/\
- spoolfile = "+INBOX"\
- record = "+Sent"\
- postponed = "+Drafts"\
- from = $my_nfit_email\
- realname = $my_realname'
-
-# Riseup mail
-account-hook imaps://mail.riseup.net:993/ 'set \
- imap_user = $my_riseup_user\
- imap_pass = $my_riseup_pass\
- smtp_url = "smtp://$my_riseup_user@mail.riseup.net:587"\
- smtp_pass = $my_riseup_pass'
-folder-hook imaps://mail.riseup.net:993/ 'set \
- folder = imaps://mail.riseup.net:993/\
- spoolfile = "+INBOX"\
- record = "+Sent"\
- postponed = "+Drafts"\
- from = $my_riseup_email\
- realname = $my_realname'
-
-# Macros to change between inboxes
-macro index <f2> '<change-folder>imaps://imap.au.dk:993/<enter>'
-macro index <f3> '<change-folder>imaps://mail.riseup.net:993/<enter>'
-#macro index <f4> '<change-folder>imaps://imap.gmail.com:993/<enter>'
+# IMAP: offlineimap
+set folder = "~/Mail"
+source ~/.mutt/mailboxes
+set spoolfile = "+riseup/INBOX"
+set record = "+riseup/Sent\ Items"
+set postponed = "+riseup/Drafts"
+set mbox_type=Maildir
+
+# Send mail settings
+folder-hook riseup 'set \
+ from=andersd@riseup.net\
+ smtp_authenticators = "login"\
+ smtp_url = "smtp://$my_riseup_user@mail.riseup.net:587"\
+ smtp_pass = $my_riseup_pass'
+
+folder-hook geomail 'set \
+ from=anders.damsgaard@geo.au.dk\
+ smtp_authenticators = "login"\
+ smtp_url = "smtp://$my_nfit_user@asmtp.au.dk:587"\
+ smtp_pass = $my_nfit_pass'
# Cache files
set header_cache=~/.mutt/cache/headers
@@ -82,22 +49,6 @@ set message_cachedir=~/.mutt/cache/bodies
# Custom certificates
set certificate_file=~/.mutt/certificates
-# Enable to automatically add all IMAP folders as mailboxes
-set imap_check_subscribed
-
-# allow Mutt to open new imap connections automatically
-unset imap_passive
-
-# keep imap connection alive by polling intermittently (time in seconds)
-set imap_keepalive=300
-
-# how often to check for new mail (time in seconds)
-#set mail_check=120
-set mail_check=5
-
-set signature=~/.signature
-set charset=utf-8
-
# sort threads by date
set sort=threads
set sort_aux = reverse-last-date-received
@@ -142,6 +93,10 @@ set net_inc=5
# When viewing a message, show the pager in # lines above
set pager_index_lines=10
+# Mail check interval
+set timeout = 15
+set mail_check = 3 # how often (in seconds) mutt should look for new mail (default = 5 sec)
+
set alias_file=~/.mutt/aliases # Save aliases here
source ~/.mutt/aliases # Load in my aliases.
source ~/.sec/gpg.rc # Use GPG
@@ -155,8 +110,23 @@ alternative_order text/enriched text/plain text/html
set query_command= "abook --mutt-query '%s'"
macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"
+bind index gg first-entry
+bind index G last-entry
+
+bind index R group-reply
+bind index <tab> sync-mailbox
+bind index <space> collapse-thread
+
macro index M "T.*\n;WN" "Mark all messages as read"
-# Last, but not least, get mutt to display its version on startup.
+# Macros to change between inboxes
+macro index \1 "<change-folder>=riseup/INBOX/<enter>"
+macro index \2 "<change-folder>=geomail/INBOX/<enter>"
+
+# Sync email
+macro index O "<shell-escape>offlineimap<enter>" "run offlineimap to sync all mail"
+macro index o "<shell-escape>offlineimap -qf INBOX<enter>" "run offlineimap to sync inbox"
+
+# Get mutt to display its version on startup.
push <show-version>
diff --git a/.tmux.conf b/.tmux.conf
@@ -51,23 +51,24 @@ bind-key a send-prefix
# done
# Set status bar
+set -g status-interval 5
set -g status-bg default
set -g status-fg white
#set -g status-right "#[fg=green]#H"
set -g status-left-length 40
set -g status-left "#[fg=green]s:#S #[fg=yellow]w:#I #[fg=cyan]p:#P"
-set -g status-right "#[fg=blue]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //') #[fg=white]#(cat /proc/loadavg|awk '{print $1;}') #[fg=cyan]%d %b %R"
+set -g status-right "#[fg=blue]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //; s/Charging, /+/; s/ until charged/ /; s/, / /; s/Unknown //; s/ $//;') #[fg=white]#(cat /proc/loadavg|awk '{print $1;}') #[fg=cyan]%d %b %R"
set -g status-justify centre
# Timeout for pane-numbering in milliseconds
-set-option -g display-panes-time 2000
+set-option -g display-panes-time 3000
# Highlight active window
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
-setw -g window-status-current-bg red
+setw -g window-status-current-bg default
setw -g window-status-current-attr bright
setw -g monitor-activity on
diff --git a/.xbindkeysrc b/.xbindkeysrc
@@ -1,48 +1,46 @@
-#"xbacklight -dec 10"
-# XF86MonBrightnessDown
+"xbacklight -dec 10"
+ XF86MonBrightnessDown
-#"xbacklight -inc 10"
-# XF86MonBrightnessUp
+"xbacklight -inc 10"
+ XF86MonBrightnessUp
-#"/home/adc/bin/display-switcher.sh"
-# XF86LaunchA
+"/home/adc/bin/display-switcher.sh"
+ XF86LaunchA
-#"/home/adc/bin/display-ext.sh"
-# XF86LaunchB
+"/home/adc/bin/display-ext.sh"
+ XF86LaunchB
-#"/home/adc/bin/keyboard_backlight.sh down"
- #m:0x0 + c:237
- #XF86KbdBrightnessDown
+"/home/adc/bin/kbd_backlight.sh down"
+ XF86KbdBrightnessDown
-#"/home/adc/bin/keyboard_backlight.sh up"
- #m:0x0 + c:238
- #XF86KbdBrightnessUp
+"/home/adc/bin/kbd_backlight.sh up"
+ XF86KbdBrightnessUp
-#"mpc -h etlangtkodeord@localhost prev"
- #XF86AudioPrev
+"mpc prev"
+ XF86AudioPrev
-#"mpc -h etlangtkodeord@localhost toggle"
- #XF86AudioPlay
+"mpc toggle"
+ XF86AudioPlay
-#"mpc -h etlangtkodeord@localhost next"
- #XF86AudioNext
+"mpc next"
+ XF86AudioNext
"keyboard-layout-switch.sh"
Mod1+Mod4 + l
-#"amixer set Master toggle"
- #m:0x0 + c:121
- #XF86AudioMute
+"amixer set Master toggle"
+ XF86AudioMute
+#"pactl set-sink-volume 0 -- -5%"
#"amixer set Master playback 2-"
-"pactl set-sink-volume 0 -- -5%"
- m:0x0 + c:122
+"amixer set Master 5%-"
XF86AudioLowerVolume
+#"pactl set-sink-volume 0 -- +5%"
#"amixer set Master playback 2+"
-"pactl set-sink-volume 0 -- +5%"
- m:0x0 + c:123
+"amixer set Master 5%+"
XF86AudioRaiseVolume
+ #m:0x0 + c:123
## Mouse Buttons
#"xvkbd -xsendevent -text "\[XF86Back]""
diff --git a/.xinitrc b/.xinitrc
@@ -38,7 +38,7 @@ dunst &
#blueman-applet &
#gnome-settings-daemon & # handles themes, starts gnome-screensaver. You may have to use gconf to disable it setting the background.
-#nm-applet & # assuming you're using Network Manager
+nm-applet & # assuming you're using Network Manager
#pidgin & # if you're using pidgin. You can really put any programs here.
#gnome-power-manager & # for laptops and stuff
#gnome-volume-manager & # for mounting CDs, USB sticks, and such
@@ -48,6 +48,9 @@ dunst &
# Disable touchpad when typing
#syndaemon -t -k -i 2 -d &
+# Enable tap-to-click on touchpad
+synclient TapButton1=1 TapButton2=2 TapButton3=3
+
# Automatically suspend system after 20 mins of inactivity
#xautolock -time 20 -locker "sudo pm-suspend" &
# Automatically lock the screen after 10 mins of inactivity
@@ -56,5 +59,4 @@ xautolock -time 10 -locker "i3lock -c 1d1f21" &
# Read .Xmodmap for modified keys
xmodmap ~/.Xmodmap
-
exec i3
diff --git a/bin/irssi.sh b/bin/irssi.sh
@@ -1,3 +1,4 @@
#!/bin/sh
#ssh -t -p 12344 ircuser@susanoganders.dk 'screen -rd irssi'
-ssh -t -p 12344 ircuser@susanoganders.dk 'bin/tmux-irssi.sh'
+#ssh -t -p 12344 ircuser@susanoganders.dk 'bin/tmux-irssi.sh'
+autossh -t -p 12344 ircuser@susanoganders.dk 'bin/tmux-irssi.sh'
diff --git a/bin/kbd_backlight.sh b/bin/kbd_backlight.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Define the increment between adjustments
+#INC=5
+
+# Define the brightness increment factor between adjustments
+INC=3
+
+# The folder containing keyboard backlight files
+CTRLDIR=/sys/class/leds/smc::kbd_backlight
+
+# The current brightness file
+CTRLF=$CTRLDIR/brightness
+
+# The current brightness value
+V=`cat $CTRLF`
+
+# The max. brightness value
+MAXV=`cat $CTRLDIR/max_brightness`
+MINV=0
+
+if [[ "$1" == "up" ]]; then
+ #NEWV=$((V+INC))
+ NEWV=$(((2+V)*INC))
+ if (( "$NEWV" <= "$MAXV" )); then
+ echo $NEWV > $CTRLF
+ else
+ echo $MAXV > $CTRLF
+ fi
+elif [[ "$1" == "down" ]]; then
+ #NEWV=$((V-INC))
+ NEWV=$((V/INC-2))
+ if (( "$NEWV" >= "$MINV" )); then
+ echo $NEWV > $CTRLF
+ else
+ echo $MINV > $CTRLF
+ fi
+fi
diff --git a/bin/tor-browser-update.sh b/bin/tor-browser-update.sh
@@ -79,6 +79,6 @@ echo "Installation complete. Start with $TORFOLDER/tor-browser_en-US/start-tor-b
# Copy the old Data folder to the new TBB
if [ $BACKUPDATA == 1 ]; then
- mv $TORFOLDER/Tor $TORFOLDER/tor-browser_en-US/Data/
+ cp $TORFOLDER/Tor/* $DATAFOLDER
fi
cd -