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 a7153f697f7e5d4640a7aba6dd33002497deb9f7
parent ea523d79b4c91e26cb758ca5129d1cd9bdac8469
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Mon,  3 Apr 2017 12:13:10 -0700

Merge branch 'master' of github.com:anders-dc/dotfiles

Diffstat:
M.mutt/muttrc | 16++++++++--------
M.signature | 7+++----
M.tmux.conf | 7+++++--
M.weechat/irc.conf | 2+-
M.weechat/plugins.conf | 13+++++++++++++
M.weechat/sec.conf | 28++++++++++++++--------------
Abin/google-cloud-lamps-instance1-ssh.sh | 12++++++++++++
Abin/mailstatus.sh | 35+++++++++++++++++++++++++++++++++++
Mbin/tmux-utility.sh | 2+-
9 files changed, 92 insertions(+), 30 deletions(-)

diff --git a/.mutt/muttrc b/.mutt/muttrc @@ -152,17 +152,17 @@ macro index \ u "<change-folder>=riseup/Spam.unsure/<enter>" "Go to Riseup/Spam. macro index \ a "<change-folder>=riseup/academic-alerts/<enter>" "Go to Riseup/academic-alerts" macro index \ s "<change-folder>=riseup/Spam/<enter>" "Go to Riseup/Spam" macro index \ ! "<change-folder>=riseup/Sent/<enter>" "Go to Riseup sent" -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 \ 3 "<change-folder>=ucsd/INBOX/<enter>" "Go to UCSD inbox" -macro index \ \# "<change-folder>=ucsd/Sent Items/<enter>" "Go to UCSD sent" +macro index \ 5 "<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 \ 5 "<change-folder>=princeton/INBOX/<enter>" "Go to Princeton inbox" -macro index \ % "<change-folder>=princeton/Sent Items/<enter>" "Go to Princeton sent" -macro index \ 6 "<change-folder>=noaa/INBOX/<enter>" "Go to NOAA inbox" -macro index \ ^ "<change-folder>=noaa/[Gmail].Sent\ Mail/<enter>" "Go to NOAA sent" +macro index \ 2 "<change-folder>=princeton/INBOX/<enter>" "Go to Princeton inbox" +macro index \ @ "<change-folder>=princeton/Sent Items/<enter>" "Go to Princeton sent" +macro index \ 3 "<change-folder>=noaa/INBOX/<enter>" "Go to NOAA inbox" +macro index \ \# "<change-folder>=noaa/[Gmail].Sent\ Mail/<enter>" "Go to NOAA sent" # mutt-sidebar diff --git a/.signature b/.signature @@ -1,10 +1,9 @@ Anders Damsgaard, Ph.D. https://adamsgaard.dk -Institute of Geophysics and Planetary Physics -Scripps Institution of Oceanography -University of California, San Diego +Geophysical Fluid Dynamics Laboratory +NOAA / Princeton University PGP public key: -https://adamsgaard.dk/ad-public.key +https://adamsgaard.dk/ad-public-key.txt https://pgp.mit.edu/pks/lookup?op=get&search=0x3033ABDE56A56CA2 diff --git a/.tmux.conf b/.tmux.conf @@ -119,8 +119,8 @@ set -g status-right-length 60 #set -g status-right "#[fg=cyan]#(~/bin/battery) #[fg=yellow]#(cat /proc/loadavg|awk '{print $1;}') #[fg=green]%d %b %R" # #set -g status-right "#[fg=cyan]#(~/bin/battery) #[fg=yellow]#(uptime|awk '{print \$NF;}') #[fg=green]%d %b %R" -if-shell 'uname | grep -qi Darwin' "set -g status-right \"#[fg=#81a2be]#(/usr/local/bin/mpc | head -n 1 | sed 's/volume.*$//' | cut -c 1-22) #[fg=cyan]#(~/bin/battery-osx) #[fg=red]M: #(find ~/Mail/*/INBOX/new -type f | wc -l | sed 's/ *//') #[fg=yellow]#(uptime|sed 's/.* //') #[fg=green]%Y-%m-%d %R\"" -if-shell 'uname | grep -qi Linux' "set -g status-right \"#[fg=cyan]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //; s/Charging, /+/; s/ until charged/ /; s/, / /; s/Unknown //; s/ $//;') #[fg=red]M: #(find ~/Mail/*/INBOX/new -type f | wc -l | sed 's/ *//') #[fg=yellow]#(cat /proc/loadavg|awk '{print $1;}') #[fg=green]%Y-%m-%d %R\"" +if-shell 'uname | grep -qi Darwin' "set -g status-right \"#[fg=#81a2be]#(/usr/local/bin/mpc | head -n 1 | sed 's/volume.*$//' | cut -c 1-22) #[fg=cyan]#(~/bin/battery-osx) #(~/bin/mailstatus.sh) #[fg=yellow]#(uptime|sed 's/.* //') #[fg=green]%Y-%m-%d %R\"" +if-shell 'uname | grep -qi Linux' "set -g status-right \"#[fg=cyan]#(acpi|sed 's/Battery//; s/0://; s/Discharging//; s/Full, //; s/remaining//; s/ , //; s/Charging, /+/; s/ until charged/ /; s/, / /; s/Unknown //; s/ $//;') #[fg=red]M: #(~/bin/mailstatus.sh) #[fg=yellow]#(cat /proc/loadavg|awk '{print $1;}') #[fg=green]%Y-%m-%d %R\"" set -g status-justify centre #set -g status-bg default #set -g status-fg cyan @@ -178,6 +178,9 @@ set -g message-attr bright # use urlview to follow URLs bind-key u capture-pane \; save-buffer /tmp/active_tmux_buffer \; new-window -n urlview '$SHELL -c "urlview < /tmp/active_tmux_buffer && rm /tmp/active_tmux_buffer"' +bind-key o split-window -p 25 '$SHELL -c "offlineimap -qf INBOX"' \; select-pane -U \; +bind-key O split-window -p 25 '$SHELL -c "offlineimap"' \; select-pane -U + bind-key -r n next-window bind-key -r N previous-window diff --git a/.weechat/irc.conf b/.weechat/irc.conf @@ -169,7 +169,7 @@ freenode.realname freenode.local_hostname freenode.command freenode.command_delay -freenode.autojoin +freenode.autojoin = "#bash,#debian,#mutt,#tmux,##hearthstone" freenode.autorejoin freenode.autorejoin_delay freenode.connection_timeout diff --git a/.weechat/plugins.conf b/.weechat/plugins.conf @@ -38,6 +38,8 @@ perl.highmon.output = "buffer" perl.highmon.short_names = "off" perl.pushover.blacklist = "#twitter_damsgaardanders" perl.pushover.enabled = "on" +perl.pushover.free_pass = "" +perl.pushover.free_user = "" perl.pushover.nma_apikey = "" perl.pushover.only_if_away = "off" perl.pushover.only_if_inactive = "off" @@ -77,6 +79,13 @@ python.cmd_help.start_on_load = "off" python.cmd_help.stop_on_enter = "on" python.cmd_help.suffix = "]" python.cmd_help.timer = "0" +python.grep.clear_buffer = "off" +python.grep.default_tail_head = "10" +python.grep.go_to_buffer = "on" +python.grep.log_filter = "" +python.grep.max_lines = "4000" +python.grep.show_summary = "on" +python.grep.size_limit = "2048" python.urlserver.buffer_short_name = "off" python.urlserver.color = "darkgray" python.urlserver.color_in_msg = "" @@ -103,6 +112,7 @@ python.urlserver.http_scheme_display = "http" python.urlserver.http_time_format = "%d/%m/%y %H:%M:%S" python.urlserver.http_title = "WeeChat URLs" python.urlserver.http_url_prefix = "" +python.urlserver.msg_filtered = "off" python.urlserver.msg_ignore_buffers = "core.weechat,python.grep" python.urlserver.msg_ignore_dup_urls = "off" python.urlserver.msg_ignore_regex = "" @@ -135,6 +145,8 @@ perl.beep.whitelist_channels = "comma-separated list of "server.#channel": if no perl.beep.whitelist_nicks = "comma-separated list of "server.nick": if not empty, only these nicks will trigger execution of commands (example: "freenode.nick1,freenode.nick2") (default: "")" perl.pushover.blacklist = "Comma separated list of buffers (full name) to blacklist for notifications (wildcard "*" is allowed, name beginning with "!" is excluded) (default: "")" perl.pushover.enabled = "Turn script on or off (default: "on")" +perl.pushover.free_pass = "Automatic generated Free key (default: "")" +perl.pushover.free_user = "Free Mobile User ID (see your account) (default: "")" perl.pushover.nma_apikey = "nma API key (default: "")" perl.pushover.only_if_away = "Notify only if away status is active (default: "off")" perl.pushover.only_if_inactive = "Notify only if buffer is not the active (current) buffer (default: "off")" @@ -199,6 +211,7 @@ python.urlserver.http_scheme_display = "display this scheme in shortened URLs (d python.urlserver.http_time_format = "time format in the HTML page (default: "%d/%m/%y %H:%M:%S")" python.urlserver.http_title = "title of the HTML page (default: "WeeChat URLs")" python.urlserver.http_url_prefix = "prefix to add in URLs to prevent external people to scan your URLs (for example: prefix "xx" will give URL: http://host.com:1234/xx/8) (default: "")" +python.urlserver.msg_filtered = "shorten URLs in filtered messages (with /filter) (default: "off")" python.urlserver.msg_ignore_buffers = "comma-separated list (without spaces) of buffers to ignore (full name like "irc.freenode.#weechat") (default: "core.weechat,python.grep")" python.urlserver.msg_ignore_dup_urls = "ignore duplicated URLs (do not add an URL in list if it is already) (default: "off")" python.urlserver.msg_ignore_regex = "ignore messages matching this regex (default: "")" diff --git a/.weechat/sec.conf b/.weechat/sec.conf @@ -10,17 +10,17 @@ salt = on [data] __passphrase__ = on -freenode_username = "71F3DE32E3ED3D078D7081B10F56EDC8BADA361C82395FFBD180245B0AFDA2C1D20F2D93B16F6C16B269884E" -gitterpass = "896B4517B8B39CC042435D45882FF356BEEB474E9018585385186E103D2B21BBE2F512C5B637B1D3BF7DEB11E467B94844F12064B047CDCE7659EDC7B6C569EF1344779556380143E840175F11C046C578" -qualitystreet_password = "8B5EF28CA01F4E648D9FBE8D9207767218B290632B5E6574064433707889A8189CF02D7E5AF407C4DF7FEE6D9C205A5BB70A04F575B4CD0FB902C0DDFF08C1DBBDC53315C2617857A6253B" -qualitystreet_username = "C25A89E3FDAD6D58804BFB0DDFB481A81D5956F00C86168F406FFCB54C590EFD2327E9E976F591BDF4EBFA23A09C4AB5" -takuglacierpass = "6EA58623BFCAEA9A5E10BEC60618B0E2BCF8EBD961419683DC869C7EE8459E649B508C5AD26A124D2B82E4A73BD59CC05766653BD0999C9D8B3199F1B6776C1F30710ADD7A82CA72A3" -pushapikey = "9DD995F6EC085A87DB146098B97FBEBF8019B25BDE5B744F00E3F50EC677596A48F22E46BA6477E609F3B4CE9BC82F3E32DBD1F0F6E8D8AC46E6CA307C5454853567FB85B5C8B2" -slack-sigma-stanford_password = "6552B750D39C2DB3891AFD745810281B7C750BF0353CCA78CDCD2A578B8B35A9E9F250DEAA04C58AFE57F0D048FB80A93E43EB98DB00FCA8728163F5EAE885AF5A49DFA0BE79FB984355C9E6" -pushoverkey = "A2573AD57890839B7155D6447CEB38DA6CE6309F15CCBAEFF84FF94F82364A8DCD1DDAF68F027CDDE76826397315861348730AA27CFA13E2CB7E4D365CA9ECDA4B44C5F659DE65" -bitlbee_password = "BE49EECAC91D42B59906DCDC7954BF5F8CDBFE4076CF894FFD6519D20E17922D63A7162D324D4EDAB3C78DA1D252EFA44E23AEB7D33CED6E9AAEF181E600" -pushuserkey = "51E2323BC44EECE75DD967179C77D05C524D9C5B9E95619057D8491D6536CB357114A959A2D41581DF52629BB52BCF3D19922E15B5505CF333F5DDB3396415E82C9CEAF259230B" -freenode_password = "AFAC7ED4B726B59ECBCA2E761D7390E7B517F091C27A4220D7D77A21EA7E983D54922061EA54A615938DFE4CC59C585E30886F489A8C46B400B34B13701A76" -slack-taku_username = "BB500079A88BBF0F687FFB007D3C3291A5D056B03F2D9B7D940C9713C9D146EF6043EDE8AB70510673575A7DF515B67A37C585BA95C34A6BAE" -slack-sigma-stanford_username = "2681FBB2E838BD5B7017435E09CE166011FEEB67B05093E55DE843B30C05474CE8967261849DF12049678541C5AC66EE1A36E598F55B1C2003" -slack-taku_password = "240BDC39DEC6B11876E526B06C3F94DB43EBC45FF1CBB420086A096006AECA71C7A0733771944DA05248439B250DEC82621221C88323020B60AD975F6AD521D3FD63EFC9839AF0E13E" +freenode_username = "F3B9F6F11857CA33B461004B6E4CB65F1F8658157503409DE08DD0B6C378D5C42ACAF2DCD3D797DC5713033C" +gitterpass = "E990474369A7728F25B9CF2A2E20755CA6010A89311CF576532ECEE73A8699107EB202A5782F25224D77E5F69495131ACD6D47245693FF6E1791E66F5F6B7B2D9DD8C69D5688EEB9D5066A51DFD0561573" +qualitystreet_password = "48A5940D88FF62AEAC472A506E8BE8569C3AC1164491FB2EC1F8627E0F6F33C585A93EEDE469A0179F8402E5EF22EA86459FEEE4F5FD87140EAD4AC40C5EF63BF89DF0290B258872176A91" +qualitystreet_username = "29F20E5CF86E25D2B8AEF5FE2CDE841BC1527E727A53C2B26694D1144091145FC03184D268681E7D32A291CA718C9486" +takuglacierpass = "D9AD9A7D05F0F5E99CEFBA217C68D90A3E4C206144376E5F04F3939B549A87E5B40C40E150D6873065E2B03337D1890ED13870B2945725717974C2CB7B0415152E193F31620F566418" +pushapikey = "27FA662B278633EE3DD81372F5776423ADA6E65C9FB16C55A1C050A40EBFF2B9296DE2C3CC78590346A4E83AC318FA600680A62B598EAF1727DC986749420A69A49B32410B75E9" +slack-sigma-stanford_password = "E340A8CB164B0C2563469F8A24AA6DFAB5AB68AEAA2522745850969D03A37907FBEEF747BD5BAFF689D3BCD2A9FAEAF6F5BDE1F92E8C61C48A7F5E171B2853170491B52AEA4D79895254A0DD" +pushoverkey = "BF65EFD0B9BE565349E36DE0FD8A6D17F50A85FAC873FEA5887A92FC691EE6B20921E3B66111460979B2274779A0C94FC6371BA6312EE6AEB79B3AC1891224BD5A68A2CDF001B3" +bitlbee_password = "2CB20F3C2C98BFFCCF13F59989DF66866714B11D8FF1070E0DAAED20706019C96F5669A3B177AEAC8AE2D8F3C3643390519129010040ED6C3DF6571C98FB" +pushuserkey = "C2CD071E6600738671BE5FC1323771BB9175501C12DC3E2723DAF7FFCF17287E939613ED126F6AB6C3BBDADB5C7E6223A73140A25F2B61186D1E7C388B0353A86665570CBAEAF7" +freenode_password = "64E008324DC0A228A8D13472F05F45A3EC0EA6F0A48933FF70C13B0E72574720F7A265D1A3FADF6C4052D557511D29D9CA76E7EE8A34272F3336971475B3FC" +slack-taku_username = "48021D73E6805E914C8D2B6A3AFF17E74D5498B8CD924E5B518C72B53266795DDF8F1BBAE09B99F8D883D8FAE007DC980F658E4ED044478DFA" +slack-sigma-stanford_username = "F1B6156061D31BC6B5113C343F1DA58897D4302ADDD6E1B37C1E5854C2293F91DFB8BAA512B3D38BB11DBC403CCE1D4B4CCBBE492A799A02C9" +slack-taku_password = "35554A861601C3954F98C1E8B1B170AD98B9B79FA127B68268264993C2CB7DFF4E2F414E6D6DC639D05DF8032E9E28B5B60C806647F8F61E03D406DC2B8AA106E200875EC5357F753D" diff --git a/bin/google-cloud-lamps-instance1-ssh.sh b/bin/google-cloud-lamps-instance1-ssh.sh @@ -0,0 +1,12 @@ +#!/bin/bash +remotecommand='tmux attach -dt 0' +set -e +if [ "$1" = "-s" ]; then + ssh -i ~/.ssh/google-cloud-ssh-key andersdc@104.154.231.211 \ + -t $remotecommand +elif [ "$1" = "-a" ]; then + autossh -i ~/.ssh/google-cloud-ssh-key andersdc@104.154.231.211 +else + mosh --ssh="ssh -i ~/.ssh/google-cloud-ssh-key" andersdc@104.154.231.211 \ + -- $remotecommand +fi diff --git a/bin/mailstatus.sh b/bin/mailstatus.sh @@ -0,0 +1,35 @@ +#!/bin/bash +newmails=$(find ~/Mail/*/INBOX/new -type f) +numbernewmails=$(echo $newmails | wc -w | sed 's/ *//') +mailboxes="$(echo $newmails | tr ' ' '\n' | sed 's/.*Mail\///' | sed 's/\/INBOX.*//')" + +mailcolor="#859900" +debug=false +#debug=true +offlineimap=/usr/local/bin/offlineimap + +accounts="" +if [[ $mailboxes == *"riseup"* ]]; then + accounts="${accounts}r" +fi +if [[ $mailboxes == *"princeton"* ]]; then + accounts="${accounts}p" +fi +if [[ $mailboxes == *"noaa"* ]]; then + accounts="${accounts}n" +fi +if [[ $mailboxes == *"gmail"* ]]; then + accounts="${accounts}g" +fi +if [[ $mailboxes == *"geomail"* ]]; then + accounts="${accounts}a" +fi +if [[ $mailboxes == *"ucsd"* ]]; then + accounts="${accounts}u" +fi + +if [ "$numbernewmails" -gt 0 ]; then + echo "#[fg=red]M: ${numbernewmails} (${accounts})" +else + echo "#[fg=green]M: ${numbernewmails}" +fi diff --git a/bin/tmux-utility.sh b/bin/tmux-utility.sh @@ -18,7 +18,7 @@ then tmux send-keys -t $SESSION 'fortune' C-m tmux select-pane -t $SESSION:1.1 - tmux split-window -v -t $SESSION + tmux split-window -p 33 -v -t $SESSION tmux send-keys -t $SESSION 'vimpc' C-m tmux select-pane -t $SESSION:1.3