From b3b095701f0236b0b9867a27e246d636ce278df0 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Mon, 8 Sep 2014 01:07:15 -0400 Subject: [PATCH] Various minor changes and missed fixes Missed adding authinfo for mbsync along with .bin/isync-auth.sh which uses gpg to decrypt the mbsync authinfo file and return the password for a given account. This new authinfo is required because it uses a slightly different format then the one use for gnus and offlineimap (both of which are now depreciated and will soon be removed). Also missed adding mbsync configuration (.mbsyncrc). Missed adding emacs bookmark file .emacs.d/bookmarks Added .local/share/applications/transmission-remote.desktop so it can be set as the default application for torrents and magnet links when using xdg-open Fixed key binding for url-picker (Urxvt) in .Xresources where there was a missing colon Added support for 256 color mimicry in tmux (which doesn't support true 256 colors) (in .xmonad/xmonad.hs when opening emacs-scratch and .tmux.conf) Signed-off-by: Collin J. Doering --- .Xresources | 2 +- .bin/isync-auth.sh | 32 +++++ .emacs.d/bookmarks | 110 +++++++++++++++++- .../applications/transmission-remote.desktop | 9 ++ .mbsync-authinfo.gpg | Bin 0 -> 802 bytes .mbsyncrc | 65 +++++++++++ .tmux.conf | 3 + .xmonad/xmonad.hs | 2 +- 8 files changed, 215 insertions(+), 8 deletions(-) create mode 100755 .bin/isync-auth.sh create mode 100644 .local/share/applications/transmission-remote.desktop create mode 100644 .mbsync-authinfo.gpg create mode 100644 .mbsyncrc diff --git a/.Xresources b/.Xresources index 107ab8c..6b055a3 100644 --- a/.Xresources +++ b/.Xresources @@ -65,7 +65,7 @@ URxvt.underlineURLs: true URxvt.perl-ext-common: default,clipboard,tabbedex,url-picker,keyboard-select,matcher ! Setup url-picker perl-ext -URxvt.keysym.C-M-g perl:url-picker +URxvt.keysym.M-C-g: perl:url-picker URxvt.urlLauncher: /usr/bin/conkeror URxvt.matcher.button: 1 diff --git a/.bin/isync-auth.sh b/.bin/isync-auth.sh new file mode 100755 index 0000000..9a211e3 --- /dev/null +++ b/.bin/isync-auth.sh @@ -0,0 +1,32 @@ +#!/bin/zsh + +# (C) Copyright Collin J. Doering 2014 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# File: isync-auth.sh +# Author: Collin J. Doering +# Date: Jun 13, 2014 + +# TODO: sed regular expression below will not allow passowords that contain a ". We should allow escaping it + +if [[ "x$1" != "x" && -f ~/.mbsync-authinfo.gpg ]]; then + gpg2 -q --for-your-eyes-only --no-tty -d "$HOME/.mbsync-authinfo.gpg" | grep -e "^LOGIN \"$1\".*$" | sed 's/^LOGIN "[^"]*" "\([^"]*\)"$/\1/' +else + # fail silently + exit 1 +fi + +# exit success +exit 0 diff --git a/.emacs.d/bookmarks b/.emacs.d/bookmarks index 0f7fc72..d639889 100644 --- a/.emacs.d/bookmarks +++ b/.emacs.d/bookmarks @@ -2,9 +2,107 @@ ;;; This format is meant to be slightly human-readable; ;;; nevertheless, you probably don't want to edit it. ;;; -*- End Of Bookmark File Format Version Stamp -*- -(("org-capture-last-stored" - (filename . "~/.org/notes.org") - (front-context-string . "*** Go get the c") - (rear-context-string . "n emacs further\n") - (position . 151)) -) \ No newline at end of file +(#1=(#("Blog" 0 4 + (bmkp-full-record #1#)) + (buffer-name . #3="~/.code/my-projects/www/blog-rekahsoft-ca/") + (front-context-string . "blog-rekahsoft-c") + (rear-context-string . "69 Sep 1 05:37 ") + (front-context-region-string) + (rear-context-region-string) + (visits . 0) + (time . #2=(21516 10507 539531 351000)) + (created . #2#) + (position . 256) + (filename . #3#) + (dired-directory . "~/.code/my-projects/www/blog-rekahsoft-ca/") + (dired-marked) + (dired-switches . "-al") + (dired-subdirs) + (dired-hidden-dirs) + (handler . bmkp-jump-dired)) +#1=(#(".racketrc" 0 9 + (bmkp-full-record #1#)) + (tags "racket" "config") + (filename . "~/.racketrc") + (buffer-name . ".racketrc") + (front-context-string . ";; Racket config") + (rear-context-string) + (front-context-region-string) + (rear-context-region-string) + (visits . 0) + (time . #2=(21515 52488 191887 274000)) + (created . #2#) + (position . 1)) +#1=(#(".conkerorrc" 0 11 + (bmkp-full-record #1#)) + (tags "config") + (filename . "~/.conkerorrc") + (buffer-name . ".conkerorrc") + (front-context-string . "// File: ~/.conk") + (rear-context-string) + (front-context-region-string) + (rear-context-region-string) + (visits . 0) + (time . #2=(21515 52458 692233 554000)) + (created . #2#) + (position . 1)) +#1=(#("rkd-conf" 0 8 + (bmkp-full-record #1#)) + (tags "config") + (buffer-name . #2="~/.rkd-conf/") + (front-context-string . ".\n drwx--x--- 9") + (rear-context-string . "96 Sep 6 01:48 ") + (front-context-region-string) + (rear-context-region-string) + (visits . 1) + (time 21515 58758 189800 941000) + (created 21515 52448 522407 938000) + (position . 125) + (filename . #2#) + (dired-directory . "~/.rkd-conf/") + (dired-marked) + (dired-switches . "-al") + (dired-subdirs) + (dired-hidden-dirs) + (handler . bmkp-jump-dired)) +#1=(#("snippets" 0 8 + (bmkp-full-record #1#)) + (tags "emacs" "config") + (buffer-name . "snippets") + (front-context-string . ".\n drwxr-xr-x 1") + (rear-context-string . "96 Aug 21 05:50 ") + (front-context-region-string) + (rear-context-region-string) + (visits . 1) + (time 21515 59003 434991 931000) + (created 21515 52423 153453 836000) + (position . 131) + (filename . "/home/collin/.emacs.d/snippets/") + (dired-directory . "~/.emacs.d/snippets/") + (dired-marked) + (dired-switches . "-al") + (dired-subdirs) + (dired-hidden-dirs) + (handler . bmkp-jump-dired)) +#1=(#(".emacs" 0 6 + (bmkp-full-record #1#)) + (tags "emacs" "config") + (filename . "~/.emacs") + (buffer-name . ".emacs") + (front-context-string . ";; Date: Aug 19,") + (rear-context-string) + (front-context-region-string) + (rear-context-region-string) + (visits . 0) + (time 21515 51744 740365 99000) + (created 21515 51744 740365 99000) + (position . 1)) +#1=(#("Notes" 0 5 + (bmkp-full-record #1#)) + (time 21515 58453 186826 365000) + (visits . 0) + (filename . "~/.org/notes.org") + (front-context-string . "*** Go get the c") + (rear-context-string . "n emacs further\n") + (position . 151)) +) diff --git a/.local/share/applications/transmission-remote.desktop b/.local/share/applications/transmission-remote.desktop new file mode 100644 index 0000000..5f1fe9d --- /dev/null +++ b/.local/share/applications/transmission-remote.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=transmission-remote +Exec=transmission-remote -a %u +Icon=transmission +Terminal=false +Type=Application +Categories=Network;FileTransfer;P2P; +StartupNotify=false +MimeType=application/x-bittorrent;x-scheme-handler/magnet; diff --git a/.mbsync-authinfo.gpg b/.mbsync-authinfo.gpg new file mode 100644 index 0000000000000000000000000000000000000000..16ec1c7d8869e7304ffefe017204160e50a79b4d GIT binary patch literal 802 zcmV+-1Ks?E0t^EHeg)|9Wd$?=5B@9-4R_@rfW)ba{Z?|#8@@b^l`pf&K^6w!K45M+ zy|di2&er=gpm0}?KUa1`<_@M7N^b|L`N7b~@X42wmWqp`cQU{3AW}y8@_QQqe6n42 zHjk3?1_gWE7(S9Vda}3NaU!&XWXE#`cD8A+i1l>5?~i7gs*EkLbhz;tAlQT=8XL|D1&lw5SkCz?B-_!*9Zia7-cf zCbj7>o6L@C>YsO3oP|0QagSuK9g(d6NM98?{Sj&9VN}ka2phughhrHHWl|6_XcC8j z8|Z=H;h*nwcHltgOd`pVyDRhFq3?G{^B!v`XO&X`avk<8jZTo~UmM3o%G}Y**=D@! zOBXG`n<$B!ZjY+vnDhA`6~iRIi${JU{XZc~G5<)1J_d(l9&-r1dSWky;x6b)B>)ln zJ2IyxSz*DQM(DdE3Y@Hz8g%x9;NW#mICMqHk0bs@XGyJ7!_grFyRBTJlO&&6Fdk|> zA;dqj^@j+cwWC}_NCFu976sysy1o&uc4dK9pZ2f~)+7-XyEta=rTzoiYFD9DN5+!? zvQ+)0}rVr?grovHcr43uR6 z6{=62s2%v8(>OO}RAFUwgjp>2ne7vmrJu7i#6K5`412uD&kG)2fI{;mPv7Wnu8?YZ zi!5Y0mkX##iZG^^?!{6Nu_E@MFjO!a^RxY55|oJ}4m+U!;fxhKNa-dO@c*cg&vnWY zNAEk$gx^zONpIIjBeZ(5H&y6n8bJJ7(8QbMhAcWA{%Na*CEslYQg{&O;`^U1u2%A1 g*TUT%ay1_2MnmNy1^ZIok9mB?nVjfrBb9Y`YVH(&bpQYW literal 0 HcmV?d00001 diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 0000000..1253ea7 --- /dev/null +++ b/.mbsyncrc @@ -0,0 +1,65 @@ +IMAPAccount collin.doering-gmail +# Address to connect to +Host imap.gmail.com +User collin.doering@gmail.com +PassCmd "isync-auth.sh collin.doering-gmail" +# Use SSL +UseIMAPS yes +# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section. +CertificateFile /etc/ssl/certs/ca-certificates.crt +#CertificateFile ~/.cert/imap.gmail.com.pem +#CertificateFile ~/.cert/Equifax_Secure_CA.pem + +IMAPStore collin.doering-gmail-remote +Account collin.doering-gmail + +MaildirStore collin.doering-gmail-local +# The trailing "/" is important +Path ~/.mail/collin.doering-gmail/ +Inbox ~/.mail/collin.doering-gmail/Inbox + +IMAPAccount rekahsoft-gmail +# Address to connect to +Host imap.gmail.com +User rekahsoft@gmail.com +PassCmd "isync-auth.sh rekahsoft-gmail" +# Use SSL +UseIMAPS yes +# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section. +CertificateFile /etc/ssl/certs/ca-certificates.crt +#CertificateFile ~/.cert/imap.gmail.com.pem +#CertificateFile ~/.cert/Equifax_Secure_CA.pem + +IMAPStore rekahsoft-gmail-remote +Account rekahsoft-gmail + +MaildirStore rekahsoft-gmail-local +# The trailing "/" is important +Path ~/.mail/rekahsoft-gmail/ +Inbox ~/.mail/rekahsoft-gmail/Inbox + +Channel collin.doering-gmail +Master :collin.doering-gmail-remote: +Slave :collin.doering-gmail-local: +# Exclude everything under the internal [Gmail] folder, except the interesting folders +#Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" "[Gmail]/Spam" +# Or include everything +Patterns * +# Automatically create missing mailboxes, both locally and on the server +Create Both +# Save the synchronization state files in the relevant directory +SyncState * + + +Channel rekahsoft-gmail +Master :rekahsoft-gmail-remote: +Slave :rekahsoft-gmail-local: +# Exclude everything under the internal [Gmail] folder, except the interesting folders +Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" "[Gmail]/Spam" +# Or include everything +#Patterns * +# Automatically create missing mailboxes, both locally and on the server +Create Both +# Save the synchronization state files in the relevant directory +SyncState * + diff --git a/.tmux.conf b/.tmux.conf index 1013ff7..37bab40 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -6,6 +6,9 @@ unbind C-b set -g prefix C-t +;; Mimic 256 colors +set -g default-terminal "screen-256color" + # Toggle last window like screen bind-key C-t last-window diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 0cdc40a..9264589 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -421,7 +421,7 @@ scratchpads = [ NS "emacs-scratch" spawnEmacsScratch findEmacsScratch manageEmac findMcScratch = resource =? "mc-scratch" findNcmpcppScratch = resource =? "ncmpcpp-scratch" - spawnEmacsScratch = myTerminal ++ " -name emacs-scratch -pe -tabbedex -e tmux new-session -s emacs-scratch \"emacsclient -nw\"" + spawnEmacsScratch = myTerminal ++ " -name emacs-scratch -pe -tabbedex -e tmux -2 new-session -s emacs-scratch \"emacsclient -nw\"" spawnMaintenanceTerminal = myTerminal ++ " -name scratchpad -bg black" spawnScreenTerminal = myTerminal ++ " -name screen-scratch -bg black" spawnMcScratch = myTerminal ++ " -name mc-scratch -pe -tabbedex -e mc"