From 03af22ed8fcb4ef6b381a94cd18372487a28b49b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:46:34 -0500 Subject: mv .emacs.d .config/emacs; ln -s .config/emacs/ .emacs.d --- .config/emacs/custom.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .config/emacs/custom.el (limited to '.config/emacs/custom.el') diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el new file mode 100644 index 0000000..5a3e67f --- /dev/null +++ b/.config/emacs/custom.el @@ -0,0 +1,21 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(custom-enabled-themes (quote (wombat))) + '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(erc-nick "lukeshu") + '(explicit-shell-file-name "/bin/bash") + '(inhibit-startup-screen t) + '(mdmua-maildir "~/Maildir") + '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) + '(ruby-deep-arglist nil) + '(ruby-deep-indent-paren nil) + '(scroll-bar-mode nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) -- cgit v1.2.3-54-g00ecf From 79603171010f907ef037213b7ec6cbf5f33258c1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 10 Jul 2014 18:05:37 -0400 Subject: stuff --- .config/Makefile | 4 +- .config/bash/aliases.sh | 3 ++ .config/cron/make-config | 2 +- .config/emacs/custom.el | 2 + .config/emacs/init.el | 6 +-- .config/emacs/wl.el | 12 ++--- .config/git/config | 2 +- .config/irbrc | 2 + .config/login.sh | 1 + .config/maildirproc/att.rc | 117 ++++++++++++++++++++++++++------------------- .config/offlineimaprc | 12 ++--- .config/selected_editor | 3 ++ .config/ssh/config | 22 +++++++-- .config/wmii-hg/autostart | 6 ++- .config/wmii-hg/wmiirc | 3 ++ .local/bin/x-pdf | 2 +- 16 files changed, 119 insertions(+), 80 deletions(-) (limited to '.config/emacs/custom.el') diff --git a/.config/Makefile b/.config/Makefile index 829b820..dd4c37f 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -14,8 +14,8 @@ all: $(targets) clean: rm -f $(targets) -${HOME}/.folders: ${HOME}/Maildir - ( echo '..'; find $< -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' +${HOME}/.folders: ${HOME}/Maildir $(MAKEFILE_LIST) + find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf '.%s\n' >'$@' ${GITDIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index c9a1987..f59eef9 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -56,3 +56,6 @@ unset redshift alias lock="clear; away -C 'This terminal is locked'" alias plock="term-title Terminal Locked;lock" mvln() { mv $1 $2; ln -s $2 $1; } +jarls() { jar tf "$1" | sed -n 's/\.class$//p' | LC_ALL=C sort | xargs -r -d $'\n' javap -classpath "$1"; } +tarls() { local file; for file in "$@"; do bsdtar tf "$file" | sed "s|^|$file:|"; done; } +jarmain() { jarls "$1" 2>/dev/null | grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ '; } diff --git a/.config/cron/make-config b/.config/cron/make-config index 6e0fca9..9ac5ac2 100644 --- a/.config/cron/make-config +++ b/.config/cron/make-config @@ -1,2 +1,2 @@ -# m h dom mon dow command +#m h dom mon dow command */5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME' diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 47bf654..e801e02 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -5,6 +5,7 @@ ;; If there is more than one, they won't work right. '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]) '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451")) + '(asm-comment-char 35) '(custom-enabled-themes (quote (tango-dark))) '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") @@ -25,6 +26,7 @@ '(sh-indent-comment t) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) + '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) '(vc-annotate-background "#2b2b2b") '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) '(vc-annotate-very-old-color "#dc8cc3") diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 2a7645f..11765b0 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -17,7 +17,7 @@ (eval-region (point) (point-max)) (kill-buffer (current-buffer))))) - ;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (unless (require 'package nil t) (eval-url "http://tromey.com/elpa/package-install.el")) @@ -59,6 +59,7 @@ ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'go-mode-load) +(require 'uniquify) (require 'mailcrypt) (mc-setversion "gpg") @@ -127,8 +128,7 @@ inhibit-startup-screen t line-number-mode t server-use-tcp t - server-mode t - show-paren-mode t) + server-mode t) (setq browse-url-generic-program (executable-find "v-www-browser") browse-url-browser-function 'browse-url-generic) diff --git a/.config/emacs/wl.el b/.config/emacs/wl.el index a169249..815c97c 100644 --- a/.config/emacs/wl.el +++ b/.config/emacs/wl.el @@ -27,12 +27,12 @@ ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path ;; the '.'-prefix is for marking them as maildirs - wl-fcc "..Sent" ;; sent msgs go to the "sent"-folder - wl-default-folder "..Ham" ;; my main inbox - wl-draft-folder "..Draft" ;; store drafts in 'postponed' - wl-trash-folder "..Trash" ;; put trash in 'trash' - wl-spam-folder "..Bulk Mail" ;; put spam in 'Bulk Mail' - wl-queue-folder "..queue" ;; we don't use this + wl-fcc ".Sent" ;; sent msgs go to the "sent"-folder + wl-default-folder ".FOLDERS.Ham" ;; my main inbox + wl-draft-folder ".Draft" ;; store drafts in 'postponed' + wl-trash-folder ".Trash" ;; put trash in 'trash' + wl-spam-folder ".FOLDERS.Spam.training" ;; put spam in 'Bulk Mail' + wl-queue-folder ".FOLDERS.queue" ;; we don't use this ;; check this folder periodically, and update modeline ;wl-biff-check-folder-list '(".todo") ;; check every 180 seconds diff --git a/.config/git/config b/.config/git/config index 218b006..71c68f6 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,6 +1,6 @@ [user] name = Luke Shumaker - email = LukeShu@sbcglobal.net + email = lukeshu@sbcglobal.net [color] ui = auto [sendemail] diff --git a/.config/irbrc b/.config/irbrc index cda5ada..15d362a 100644 --- a/.config/irbrc +++ b/.config/irbrc @@ -1,5 +1,7 @@ # -*- mode: Ruby -*- require 'rubygems' unless defined? Gem # only needed in 1.8 require 'irb/ext/save-history' +require 'fileutils' IRB.conf[:SAVE_HISTORY] = 5000 IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history" +FileUtils.mkdir_p(File.dirname(IRB.conf[:HISTORY_FILE])) diff --git a/.config/login.sh b/.config/login.sh index e1650b2..392dc88 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -11,6 +11,7 @@ # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. umask 022 +ulimit -c unlimited # save core dumps ## Paths ############################################################# diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 381ce8f..0252c74 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -46,7 +46,7 @@ def bogofilter_spam(mail): def handle_incoming_spam_training(mail): bogofilter_spam(mail) - mail.move(".Bulk Mail") + mail.move("FOLDERS.Spam") def handle_incoming_ham_training(mail): bogofilter_ham(mail) @@ -55,10 +55,26 @@ def handle_incoming_ham_training(mail): def handle_incoming_ham(mail): my_filters(mail) def handle_incoming_spam(mail): - mail.move(".Bulk Mail") + mail.move("FOLDERS.Spam") def handle_incoming_unknown(mail): # Filter spam + + if ( + False + or mail["Subject"].contains("[systemd-devel]") + or mail["Subject"].contains("[PATCH") + or mail["Subject"].contains("[Dev]") + or mail["Subject"].contains("[Maintenance]") + or is_to_or_from(mail, "gnu.org") + or is_to_or_from(mail, "fsf.org") + or mail["From"].contains("@parabola.nu") + or mail["From"].contains("parabolagnulinux.org") + or mail["From"].contains("@facebookmail.com>") + or mail["List-Id"].matches(".*\.(gnu|archlinux|parabolagnulinuxlibre)\.org") + ): + handle_incoming_ham_training(mail) + return spam = bogofilter_auto(mail) if spam == 0: @@ -68,10 +84,10 @@ def handle_incoming_unknown(mail): handle_incoming_ham(mail) return elif spam == 2: - # maybe spam + mail.move("Inbox") return else: - mail.move(".Error") + mail.move("FOLDERS.Error") return def my_filters(mail): @@ -82,7 +98,7 @@ def my_filters(mail): or mail["List-Id"].matches(list+"\.gnu\.org") or mail["Subject"].contains('['+list+']') ): - mail.move(".software."+list) + mail.move("FOLDERS.software."+list) return # Sort mail from other software mailing lists @@ -91,36 +107,36 @@ def my_filters(mail): or mail["List-Id"].matches("social-discuss\.gnu\.org") or mail["Subject"].contains("social-discuss") ): - mail.move(".software.social") + mail.move("FOLDERS.software.social") return if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move(".software.networkmanager") + mail.move("FOLDERS.software.networkmanager") return if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): if mail["From"].contains("monit@"): if mail["Message-Id"].contains("@repo.parabolagnulinux.org"): if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"): - mail.move(".software.parabola-maintenance.monit-repo.sshd") + mail.move("FOLDERS.software.parabola-maintenance.monit-repo.sshd") return - mail.move(".software.parabola-maintenance.monit-repo") + mail.move("FOLDERS.software.parabola-maintenance.monit-repo") return if mail["Message-Id"].contains("@rshg054.dnsready.net"): - mail.move(".software.parabola-maintenance.monit-rshg054") + mail.move("FOLDERS.software.parabola-maintenance.monit-rshg054") return if mail["Subject"].matches("Cron <.*@repo>"): - mail.move(".software.parabola-maintenance.cron-repo") + mail.move("FOLDERS.software.parabola-maintenance.cron-repo") return if mail["Subject"].matches("Cron <.*@rshg054>"): - mail.move(".software.parabola-maintenance.cron-rshg054") + mail.move("FOLDERS.software.parabola-maintenance.cron-rshg054") return - mail.move(".software.parabola-maintenance") + mail.move("FOLDERS.software.parabola-maintenance") return - if is_to_or_from(mail, "parabola.nu"): - mail.move(".software.parabola-labs") - return + #if is_to_or_from(mail, "parabola.nu"): + # mail.move("FOLDERS.software.parabola-labs") + # return if ( False @@ -129,29 +145,29 @@ def my_filters(mail): or is_to_or_from(mail, "kiwwwi.com.ar") ): if mail["Subject"].contains("[Django]"): - mail.move(".software.parabola-maintenance.django") + mail.move("FOLDERS.software.parabola-maintenance.django") return - mail.move(".software.parabola-dev") + mail.move("FOLDERS.software.parabola-dev") return if (mail["List-Id"].matches("pacman-dev.archlinux.org")): - mail.move(".software.pacman-dev") + mail.move("FOLDERS.software.pacman-dev") return - if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")): - mail.move(".software.systemd-devel") + if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org") or is_to_or_from(mail, "systemd-devel@lists.freedesktop.org")): + mail.move("FOLDERS.software.systemd-devel") return for subject_re in [ "\[Stow-[^\]]*\].*", ]: if mail["Subject"].matches(subject_re): - mail.move(".software") + mail.move("FOLDERS.software") return # Sort mail from some social websites if mail["From"].matches("facebook(|mail)\.com"): - mail.move(".Social.Facebook") + mail.move("FOLDERS.Social.Facebook") return if ( @@ -159,15 +175,15 @@ def my_filters(mail): or mail["From"].matches("identi\.ca") or mail["From"].matches("statusnet") ): - mail.move(".Social.Identica") + mail.move("FOLDERS.Social.Identica") return if mail["From"].matches("twitter\.com"): - mail.move(".Social.Twitter") + mail.move("FOLDERS.Social.Twitter") return if mail["From"].matches("@xkcd\.com"): - mail.move(".Social.xkcd") + mail.move("FOLDERS.Social.xkcd") return # Sort mail related to Troop 276 @@ -191,12 +207,12 @@ def my_filters(mail): or is_to_or_from(mail,"mytroop.us") or is_to_or_from(mail,"crossroadsbsa.org") ): - mail.move(".Troop276") + mail.move("FOLDERS.BoyScouts") return # Sort mail from misc people if mail["From"].matches("margieshu@sbcglobal\.net"): - mail.move(".misc.Mom") + mail.move("FOLDERS.misc.Mom") return for address in [ @@ -206,7 +222,7 @@ def my_filters(mail): "jadparso@umail.iu.edu", ]: if is_to_or_from(mail,address): - mail.move(".misc.Jade") + mail.move("FOLDERS.misc.Jade") return for address in [ @@ -214,7 +230,7 @@ def my_filters(mail): "nintendo-news.com", ]: if mail["From"].contains(address): - mail.move(".misc.Nintendo") + mail.move("FOLDERS.misc.Nintendo") return for address in [ @@ -223,7 +239,7 @@ def my_filters(mail): "CompTIA", ]: if mail["From"].contains(address): - mail.move(".misc.CompTIA") + mail.move("FOLDERS.misc.CompTIA") return # Sort mail from FRC people @@ -248,7 +264,7 @@ def my_filters(mail): "william.walk@gmail.com", ]: if is_to_or_from(mail,address): - mail.move(".School.Robotics") + mail.move("FOLDERS.School.Robotics") return for subject_re in [ "robotics", @@ -256,7 +272,7 @@ def my_filters(mail): "kil-?a-?bytes", ]: if mail["Subject"].matches(subject_re): - mail.move(".School.Robotics") + mail.move("FOLDERS.School.Robotics") return # Sort mail from software people @@ -278,7 +294,7 @@ def my_filters(mail): "trustees@core3.amsl.com", ]: if is_to_or_from(mail,address): - mail.move(".software") + mail.move("FOLDERS.software") return @@ -288,16 +304,16 @@ def my_filters(mail): or is_to_or_from(mail, "@lnnorthstar.org") or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") ): - mail.move(".School.Newspaper") + mail.move("FOLDERS.School.Newspaper") return # Sort mail from various employers/people who pay me if is_to_or_from(mail, "@precisepath.com"): - mail.move(".Work.PrecisePath") + mail.move("FOLDERS.Work.PrecisePath") return if is_to_or_from(mail,"susyphil@aol.com"): - mail.move(".Work.PMCH") + mail.move("FOLDERS.Work.PMCH") for address in [ "d.farrar@comcast.net", @@ -305,7 +321,7 @@ def my_filters(mail): "@vmware.com", ]: if is_to_or_from(mail,address): - mail.move(".Work.FAST") + mail.move("FOLDERS.Work.FAST") return # Sort misc newsletters @@ -319,12 +335,13 @@ def my_filters(mail): or mail["From"].contains("info@demandprogress.org") or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): - mail.move(".misc.Newsletters") + mail.move("FOLDERS.misc.Newsletters") return if ( False or mail["From"].contains("@msdlt.k12.in.us") + or mail["From"].contains("ltschoolfoundation@gmail.com") or mail["From"].contains("naviance.com") or is_to_or_from(mail,"ibwhite@comcast.net") or mail["Subject"].contains("IOA") @@ -334,7 +351,7 @@ def my_filters(mail): or mail["Subject"].contains("NHS") or mail["Subject"].contains("National Honor Society") ): - mail.move(".School") + mail.move("FOLDERS.School") return # from college stuff @@ -343,7 +360,7 @@ def my_filters(mail): or mail["Subject"].contains("NYLF") # National Youth Leadership Conference or mail["Subject"].contains("NSHSS") ): - mail.move(".College.Societies") + mail.move("FOLDERS.College.Societies") return if ( False @@ -356,11 +373,11 @@ def my_filters(mail): or mail["From"].contains("@dreamitdoitindiana.com") or mail["From"].contains("@indianatechinfo.org") ): - mail.move(".College") + mail.move("FOLDERS.College") return if mail["From"].contains("@projectwonderful.com"): - mail.move(".ProjectWonderful") + mail.move("FOLDERS.misc.ProjectWonderful") return if ( @@ -370,23 +387,23 @@ def my_filters(mail): or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") or mail["To"].matches("luke@") ): - mail.move(".LocalSystems") + mail.move("FOLDERS.LocalSystems") return if ( False or mail["Subject"].contains("password") or mail["Subject"].contains("account") ): - mail.move(".misc.accounts") + mail.move("FOLDERS.misc.accounts") return - mail.move(".Ham") + mail.move("FOLDERS.Ham") handle_mapping = { - ".": handle_incoming_unknown, - ".spam-training": handle_incoming_spam_training, - ".ham-training": handle_incoming_ham_training, - #".Ham": handle_incoming_ham, + "Inbox": handle_incoming_unknown, + "Bulk Mail": handle_incoming_unknown, + "FOLDERS.Spam.training": handle_incoming_spam_training, + "FOLDERS.Ham.training": handle_incoming_ham_training, } processor.maildirs = handle_mapping.keys() for mail in processor: diff --git a/.config/offlineimaprc b/.config/offlineimaprc index d027001..bdc2c66 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -12,21 +12,15 @@ remoterepository = Remote-SBCGlobal type = Maildir localfolders = ~/Maildir sep = . -folderfilter = lambda foldername: not re.search('(Trash|Del|-old|Draft)', foldername) -# transforms local -> remote -nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^'+re.escape('%(sep)s'), '', foldername)) +folderfilter = lambda folder: folder in [ 'Inbox' ] [Repository Remote-SBCGlobal] type = IMAP ssl = yes -cert_fingerprint = a6ee8d759eb76dafacffffc47c4507d51f444984 +cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8 remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net -folderfilter = lambda foldername: not re.search('(Trash|Del)', foldername) - -# transforms remote -> local -# we must assume that sep=/ on the remote IMAP server. -nametrans = lambda foldername: '/'+re.sub('^Inbox$', '', foldername) +folderfilter = lambda folder: folder in [ 'Inbox' ] ## Purdue ############################################################ diff --git a/.config/selected_editor b/.config/selected_editor index 7631487..eca2482 100644 --- a/.config/selected_editor +++ b/.config/selected_editor @@ -1,4 +1,7 @@ # Generated by /usr/bin/select-editor SELECTED_EDITOR="emacsclient -a '' -c" +if [[ -n $SSH_CONNECTION ]]; then + SELECTED_EDITOR+=' -nw' +fi ALTERNATE_EDITOR='nano' VISUAL="$SELECTED_EDITOR" diff --git a/.config/ssh/config b/.config/ssh/config index 9b366ed..2a5b79a 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -4,21 +4,33 @@ Host * ControlPath ~/.runtime/ssh-%r@%h:%p Compression yes +# Purdue ################################################### + Host lore HostName lore.cs.purdue.edu - User shumakl - Host data HostName data.cs.purdue.edu +Host *.cs.purdue.edu User shumakl +# Parabola ################################################# + +# short names Host repo - Port 1863 HostName repo.parabolagnulinux.org +Host wiki + HostName wiki.parabolagnulinux.org +Host projects + HostName projects.parabolagnulinux.org +Host parabola + HostName parabolagnulinux.org -Host rshg054 +Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu Port 1863 - HostName parabolagnulinux.org + User lukeshu + +# Personal ################################################# Host lukeshu.com Port 1863 + User lukeshu diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index f5e5419..cee702a 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -1,12 +1,14 @@ #!/bin/bash . include.sh +xrandr --output VGA-1 --off + daemon xcompmgr &> /dev/null daemon lxpanel &> /dev/null #daemon nm-applet &> /dev/null daemon dunst &> /dev/null daemon blueman-applet &> /dev/null -dameon clipit -dn &> /dev/null +daemon clipit -dn &> /dev/null -Action rbar_cpu 01 & +#Action rbar_cpu 01 & Action rbar_clock 99 & diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a6bc4b4..a7dd80c 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -1,4 +1,7 @@ #!/bin/bash +unset WMII_NAMESPACE +unset WMII_DIR + export _PATH="$PATH" export PATH="$WMII_CONFPATH:$PATH" diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index 1b23a3d..3610fde 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,4 +1,4 @@ #!/bin/sh -`pick evince okular xpdf` "$@" +`pick zathura mupdf okular evince xpdf` "$@" exit $? -- cgit v1.2.3-54-g00ecf From b2a41f953efda8e90dcf5fc0da1910b9df5cdb9e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 30 Jul 2014 22:59:53 -0400 Subject: clean up emacs config --- .config/bash/rc.d/emacs.sh | 6 +- .config/emacs/custom.el | 13 +- .config/emacs/init.el | 303 +++++++++++++++++++++------------------------ .config/emacs/wl.el | 4 +- 4 files changed, 144 insertions(+), 182 deletions(-) (limited to '.config/emacs/custom.el') diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 165d71e..12fa9ad 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -10,7 +10,7 @@ if [[ $TERM == eterm* ]]; then # _emacs_run LISP _emacs_run() { - emacsclient -e "$*" 2>/dev/null + emacsclient -a false -e "$*" 2>/dev/null } # _emacs_quote UNQUOTED_STRING _emacs_quote() { @@ -94,5 +94,7 @@ if [[ $TERM == eterm* ]]; then _emacs_set_remote_dir _emacs_set_shell_DISPLAY } - PROMPT_COMMAND=_emacs_PROMPT_COMMAND + if _emacs_run '()' >/dev/null; then + PROMPT_COMMAND=_emacs_PROMPT_COMMAND + fi fi diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index e801e02..ef9048d 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -10,28 +10,17 @@ '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") - '(fci-rule-color "#00346e") - '(global-whitespace-mode nil) - '(inhibit-startup-screen t) - '(maildir-mail-dir "~/Maildir") - '(mdmua-maildir "~/Maildir") - '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) '(page-break-lines-char 45) '(ruby-deep-arglist nil) '(ruby-deep-indent-paren nil) - '(safe-local-variable-values (quote ((Nginx-indent-tabs-mode) (Nginx-indent-level . 4) (Nginx-indent-level . 8)))) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) - '(sh-basic-offset 8) - '(sh-indent-comment t) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) '(vc-annotate-background "#2b2b2b") '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) - '(vc-annotate-very-old-color "#dc8cc3") - '(wl-init-file "~/.emacs.d/wl.el") - '(wl-score-files-directory "~/.emacs.d/elmo")) + '(vc-annotate-very-old-color "#dc8cc3")) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 11765b0..5647398 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,12 +1,48 @@ +; Use XDG-ish locations +(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) +(setq + package-user-dir (concat xdg-cache-home "emacs/elpa") + ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el") + el-get-dir (concat xdg-cache-home "emacs/el-get/") + eshell-directory-name (concat xdg-cache-home "emacs/eshell/") + wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") + elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") + elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") + auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") + tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") + custom-file (concat user-emacs-directory "custom.el") + wl-init-file (concat user-emacs-directory "wl.el") + ) + +;; The basics I can't live without ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(show-paren-mode 1) +(column-number-mode 1) +(line-number-mode 1) +(ido-mode 1) +(unless (daemonp) (server-mode 1)) +(when (require 'whitespace nil t) + (setq whitespace-style '( + tab-mark + space-mark + newline-mark + empty + )) + (global-set-key "\C-cw" 'global-whitespace-mode)) +(setq minibuffer-prompt-properties '( + read-only t + point-entered minibuffer-avoid-prompt + face minibuffer-prompt + )) + ;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (set-face-attribute 'default nil :height 80) -(setq notify-method 'notify-via-libnotify) -(add-to-list 'load-path "~/.emacs.d/") -(add-to-list 'load-path "~/.emacs.d/el-get/el-get") -(setq custom-file "~/.emacs.d/custom.el") +(add-to-list 'load-path user-emacs-directory) +(load custom-file 'noerror) -; derived from ELPA installation +;; Bootstrap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; Derived from ELPA installation ; http://tromey.com/elpa/install.html (defun eval-url (url) (let ((buffer (url-retrieve-synchronously url))) @@ -17,123 +53,115 @@ (eval-region (point) (point-max)) (kill-buffer (current-buffer))))) -;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(unless (require 'package nil t) - (eval-url "http://tromey.com/elpa/package-install.el")) - -(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") - ("marmalade" . "http://marmalade-repo.org/packages/") - ("gnu" . "http://elpa.gnu.org/packages/"))) - -;; el-get stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(setq el-get-install-branch "master") ;; live life on the edge +(add-to-list 'load-path (concat el-get-dir "el-get")) (unless (require 'el-get nil t) - (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) + (let ((el-get-install-branch "master")) ;; live life on the edge + (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) -(setq el-get-sources '( - (:name nxhtml - :type http - :url "http://ourcomments.org/Emacs/DL/elisp/nxhtml/zip/nxhtml-2.08-100425.zip" - :build ("unzip nxhtml-2.08-100425.zip") - :load "nxhtml/autostart.el") - )) - -(setq my-el-get-packages - '(el-get -; nxhtml - apel flim semi wanderlust - smarttabs - )) +;; Install plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Now load all of that ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) +(setq package-enable-at-startup nil) -;; ELPA -(package-initialize) -;; el-get -(when (require 'el-get nil t) (el-get 'sync my-el-get-packages)) -;; custom -(load custom-file 'noerror) +(setq el-get-sources '( + (:name dtrt-indent :type elpa + :after (dtrt-indent-mode 1)) + (:name coffee-mode :type elpa + :after (add-hook 'coffee-mode-hook + '(lambda () + (set (make-local-variable 'tab-width) 2) + (set (make-local-variable 'indent-tabs-mode) nil) + ))) + (:name smart-tabs-mode :type elpa + :after (progn + (smart-tabs-mode-enable) + (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + (:name graphviz-dot-mode :type elpa) + (:name markdown-mode :type elpa + :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) + (:name nginx-mode :type elpa + :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) + (:name scss-mode :type elpa) + )) +(el-get 'sync '(el-get + apel flim semi wanderlust + dtrt-indent + smart-tabs-mode + nginx-mode + markdown-mode + ;nxhtml + )) ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'go-mode-load) -(require 'uniquify) +(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(require 'mailcrypt) -(mc-setversion "gpg") -(add-hook 'wl-summary-mode-hook 'mc-install-read-mode) -(add-hook 'wl-mail-setup-hook 'mc-install-write-mode) +(defadvice align-regexp (around align-with-spaces) + (let ((indent-tabs-mode nil)) ad-do-it)) -(defun mc-wl-verify-signature () - (interactive) - (save-window-excursion - (wl-summary-jump-to-current-message) - (mc-verify))) - -(defun mc-wl-decrypt-message () - (interactive) - (save-window-excursion - (wl-summary-jump-to-current-message) - (let ((inhibit-read-only t)) - (mc-decrypt)))) - -(eval-after-load "mailcrypt" - '(setq mc-modes-alist - (append - (quote - ((wl-draft-mode (encrypt . mc-encrypt-message) - (sign . mc-sign-message)) - (wl-summary-mode (decrypt . mc-wl-decrypt-message) - (verify . mc-wl-verify-signature)))) - mc-modes-alist))) - -;(load "mdmua") +(require 'go-mode-load nil t) +(require 'uniquify) (load "emacsutils") -(set-default 'truncate-lines t) -(tool-bar-mode -1) -(ido-mode t) -(show-paren-mode 1) -(setq org-log-done 'time) -(setq gamegrid-user-score-file-directory "/var/games/emacs/") -;(xclip-mode 1) - -(load "whitespace") -(setq whitespace-style '( - tab-mark - space-mark - newline-mark - empty -)) - - -;; These are my preferred settings; we let dtrt-indent detect when we play with other's files -(setq-default tab-width 8) -(setq-default c-basic-offset 8) -(setq-default indent-tabs-mode t) - - +(when (require 'mailcrypt nil t) + (mc-setversion "gpg") + (add-hook 'wl-summary-mode-hook 'mc-install-read-mode) + (add-hook 'wl-mail-setup-hook 'mc-install-write-mode) + (defun mc-wl-verify-signature () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (mc-verify))) + (defun mc-wl-decrypt-message () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (let ((inhibit-read-only t)) + (mc-decrypt)))) + (eval-after-load "mailcrypt" + '(setq mc-modes-alist + (append + (quote + ((wl-draft-mode (encrypt . mc-encrypt-message) + (sign . mc-sign-message)) + (wl-summary-mode (decrypt . mc-wl-decrypt-message) + (verify . mc-wl-verify-signature)))) + mc-modes-alist))) + ) + +(setq-default truncate-lines t) +(setq + inhibit-startup-screen t + org-log-done 'time + gamegrid-user-score-file-directory "/var/games/emacs/" + ) + +;; Indent settings +(setq-default + indent-tabs-mode t + tab-width 8 + c-basic-offset 8 + sh-basic-offset 8 + sh-indent-comment t + ) + +;; Backup settings (setq backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.emacs.d/saves")) ;; don't litter my fs tree + backup-directory-alist '(("." . "~/.cache/emacs/emacs/saves")) ;; don't litter my fs tree delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t ;; use versioned backups -) - -(setq column-number-mode t - inhibit-startup-screen t - line-number-mode t - server-use-tcp t - server-mode t) - -(setq browse-url-generic-program (executable-find "v-www-browser") - browse-url-browser-function 'browse-url-generic) + ) +;; Web browser settings +(setq + browse-url-generic-program (executable-find "v-www-browser") + browse-url-browser-function 'browse-url-generic + ) +;; Make work like in every other program (defun toggle-fullscreen (&optional f) (interactive) (let ((current-value (frame-parameter nil 'fullscreen))) @@ -142,25 +170,11 @@ (if (boundp 'old-fullscreen) old-fullscreen nil) (progn (setq old-fullscreen current-value) 'fullboth))))) - -;; Custom keybindings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (global-set-key [f11] 'toggle-fullscreen) -(global-set-key "\C-cw" 'global-whitespace-mode) -;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-hook 'text-mode-hook 'turn-on-auto-fill) -; for term-mode -;; (add-hook 'after-make-frame-functions -;; (lambda (frame) -;; (set-variable 'term-default-fg-color -;; (face-foreground 'default)) -;; (set-variable 'term-default-bg-color -;; (face-background 'default))) -;; t) - (add-hook 'lisp-mode-hook '(lambda () (set (make-local-variable 'indent-tabs-mode) nil) @@ -171,21 +185,14 @@ (set (make-local-variable 'indent-tabs-mode) nil) )) -(add-hook 'coffee-mode-hook - '(lambda () - (set (make-local-variable 'tab-width) 2) - )) - (add-hook 'term-mode-hook '(lambda () - (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *") - (make-local-variable 'mouse-yank-at-point) - ;(make-local-variable 'transient-mark-mode) - (setq mouse-yank-at-point t) - ;(setq transient-mark-mode nil) (auto-fill-mode -1) + (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *") + (set (make-local-variable 'mouse-yank-at-point) t) (setq tab-width 8 ) - (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term + (setq truncate-lines nil) + (set (make-local-variable 'autopair-dont-activate) t) ;; Don't let autopair break ansi-term )) (add-hook 'ruby-mode-hook @@ -195,46 +202,12 @@ (set (make-local-variable 'tab-width) 4) )) -(add-hook 'coffee-mode-hook - '(lambda () - (set (make-local-variable 'indent-tabs-mode) nil) - )) - (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) -(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) -(add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode)) - -;(require 'flymake) -;(add-hook 'php-mode-hook (lambda() (flymake-mode 1))) -;(define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error) -;(define-key php-mode-map '[M-S-down] 'flymake-goto-next-error) - -;(setq tramp-debug-buffer t) -;(setq tramp-verbose 10) - -;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") -;; (require 'mu4e) -;; (require 'mu4e-speedbar) - -;; (setq -;; mu4e-maildir "~/Maildir" ;; top-level Maildir -;; mu4e-sent-folder "/.Sent" ;; folder for sent messages -;; mu4e-drafts-folder "/.Draft" ;; unfinished messages -;; mu4e-trash-folder "/.Trash" ;; trashed messages -;; mu4e-refile-folder "/archive") ;; saved messages -;; (setq mu4e-get-mail-command "offlineimap") -;; (setq mu4e-use-fancy-chars "t") -;; ;; enable inline images -;; (setq mu4e-view-show-images t) -;; ;; use imagemagick, if available -;; (when (fboundp 'imagemagick-register-types) -;; (imagemagick-register-types)) - - -(defun sm-try-smerge () + +(defun try-smerge-mode () (save-excursion (goto-char (point-min)) (when (re-search-forward "^<<<<<<< " nil t) (smerge-mode 1)))) -(add-hook 'find-file-hook 'sm-try-smerge t) +(add-hook 'find-file-hook 'try-smerge-mode t) diff --git a/.config/emacs/wl.el b/.config/emacs/wl.el index 815c97c..e9e61bd 100644 --- a/.config/emacs/wl.el +++ b/.config/emacs/wl.el @@ -21,8 +21,6 @@ wl-message-id-domain user-mail-address ;; Folders/File system ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - elmo-msgdb-directory "~/.emacs.d/elmo" ;; where elmo keeps all its stuff - elmo-cache-directory "~/.emacs.d/elmo-cache" ;; where elmo keeps all its stuff elmo-maildir-folder-path "~/Maildir" ;; where I store my mail ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path @@ -32,7 +30,7 @@ wl-draft-folder ".Draft" ;; store drafts in 'postponed' wl-trash-folder ".Trash" ;; put trash in 'trash' wl-spam-folder ".FOLDERS.Spam.training" ;; put spam in 'Bulk Mail' - wl-queue-folder ".FOLDERS.queue" ;; we don't use this + wl-queue-folder ".FOLDERS.Queue" ;; we don't use this ;; check this folder periodically, and update modeline ;wl-biff-check-folder-list '(".todo") ;; check every 180 seconds -- cgit v1.2.3-54-g00ecf From f88159c624564d5fe9945820b89b21ef5685fc23 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 31 Jul 2014 00:57:28 -0400 Subject: terminals: Make blue readable on the tango background --- .config/X11/defaults | 12 +++++++----- .config/emacs/custom.el | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to '.config/emacs/custom.el') diff --git a/.config/X11/defaults b/.config/X11/defaults index 252170c..fca1914 100644 --- a/.config/X11/defaults +++ b/.config/X11/defaults @@ -1,11 +1,13 @@ -# -*- Mode: Conf-xdefaults -*- +! -*- Mode: Conf-xdefaults -*- -# "native" colors -#URxvt.background: #000000 -#URxvt.foreground: #CCCCCC -# Tango-dark +! "native" colors +!URxvt.background: #000000 +!URxvt.foreground: #CCCCCC +! Tango-dark URxvt.background: #2E3436 URxvt.foreground: #EEEEEC +URxvt.color4: #729FCF +URxvt.color12: #729FCF URxvt.scrollstyle: plain URxvt.scrollBar_floating: true diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index ef9048d..0eb22a6 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -26,4 +26,4 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(term-color-blue ((t (:background "#729fcf" :foreground "#729fcf"))))) -- cgit v1.2.3-54-g00ecf From 0e67aadb031f8b16e50e97b60fef56060185e789 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:09:23 -0400 Subject: Update emacs config --- .config/emacs/custom.el | 11 +- .config/emacs/init.el | 114 +++++++++++++++------ .config/selected_editor | 2 +- .../user/default.target.wants/emacs-daemon.service | 1 + 4 files changed, 84 insertions(+), 44 deletions(-) (limited to '.config/emacs/custom.el') diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 0eb22a6..af2aef8 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -3,24 +3,15 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]) - '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451")) - '(asm-comment-char 35) '(custom-enabled-themes (quote (tango-dark))) '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") - '(page-break-lines-char 45) - '(ruby-deep-arglist nil) - '(ruby-deep-indent-paren nil) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) - '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) - '(vc-annotate-background "#2b2b2b") - '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) - '(vc-annotate-very-old-color "#dc8cc3")) + '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 5647398..a36cf37 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,4 +1,5 @@ -; Use XDG-ish locations +; This config requires Emacs 24(+?) +;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) (setq package-user-dir (concat xdg-cache-home "emacs/elpa") @@ -14,7 +15,7 @@ wl-init-file (concat user-emacs-directory "wl.el") ) -;; The basics I can't live without ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;;;; (show-paren-mode 1) (column-number-mode 1) (line-number-mode 1) @@ -33,14 +34,19 @@ point-entered minibuffer-avoid-prompt face minibuffer-prompt )) - -;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(set-face-attribute 'default nil :height 80) (add-to-list 'load-path user-emacs-directory) (load custom-file 'noerror) -;; Bootstrap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This isn't particularly important, but set it before doing a whole +; lot (loading packages), so there isn't a weird change in text size. +(set-face-attribute 'default nil :height 80) + + +;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This downloads and installs el-get (package management) if isn't +; installed. ; Derived from ELPA installation ; http://tromey.com/elpa/install.html @@ -58,24 +64,40 @@ (let ((el-get-install-branch "master")) ;; live life on the edge (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) -;; Install plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This is kinda funny how it works. +; +; package.el/ELPA (The standard package manager in Emacs 24) has +; terrible programatic management. It's great at installing packages, +; but only interactively. So, I +; 1) Disable package.el from getting loading all downloaded packages +; 2) Use el-get to load a specified list of packages from elpa. +; +; This is also nice because I can do event-base programming for what +; to do once a package is loaded, using :after. (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (setq package-enable-at-startup nil) +; What packages el-get should get from ELPA (if it gets them at all) (setq el-get-sources '( - (:name dtrt-indent :type elpa + ; Minor modes + (:name dtrt-indent :type elpa ; Detect indent style for existing files :after (dtrt-indent-mode 1)) + (:name page-break-lines :type elpa ; Display form-feeds pretty + :after (global-page-break-lines-mode 1)) + (:name smart-tabs-mode :type elpa ; Indent with tabs, align with spaces + :after (progn + (smart-tabs-mode 1) + (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + ; Major modes (:name coffee-mode :type elpa :after (add-hook 'coffee-mode-hook '(lambda () (set (make-local-variable 'tab-width) 2) (set (make-local-variable 'indent-tabs-mode) nil) ))) - (:name smart-tabs-mode :type elpa - :after (progn - (smart-tabs-mode-enable) - (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) (:name graphviz-dot-mode :type elpa) (:name markdown-mode :type elpa :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) @@ -83,18 +105,25 @@ :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) (:name scss-mode :type elpa) )) +; What packages el-get should install, both from above, and it's +; internal list of sources. (el-get 'sync '(el-get - apel flim semi wanderlust + ; Minor modes dtrt-indent smart-tabs-mode - nginx-mode + page-break-lines + ; Major modes + apel flim semi wanderlust markdown-mode - ;nxhtml + nginx-mode + ;nxhtml ; nxhtml is invasive, only enable if actively using + php-mode-improved )) -;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Misc. crap -(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) +(when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (defadvice align-regexp (around align-with-spaces) (let ((indent-tabs-mode nil)) ad-do-it)) @@ -103,6 +132,24 @@ (require 'uniquify) (load "emacsutils") +(setq-default truncate-lines t) +(setq + inhibit-startup-screen t + org-log-done 'time + gamegrid-user-score-file-directory "/var/games/emacs/" + ) + + + +;; Make the mouse work in an xterm +(when (fboundp 'xterm-mouse-mode) + (xterm-mouse-mode 1) + (add-hook 'after-make-frame-functions + '(lambda (frame) + (if xterm-mouse-mode (xterm-mouse-mode 1)) + ))) + +;; Use mailcrypt to encrypt/decrypt email (when (require 'mailcrypt nil t) (mc-setversion "gpg") (add-hook 'wl-summary-mode-hook 'mc-install-read-mode) @@ -129,13 +176,6 @@ mc-modes-alist))) ) -(setq-default truncate-lines t) -(setq - inhibit-startup-screen t - org-log-done 'time - gamegrid-user-score-file-directory "/var/games/emacs/" - ) - ;; Indent settings (setq-default indent-tabs-mode t @@ -148,7 +188,7 @@ ;; Backup settings (setq backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.cache/emacs/emacs/saves")) ;; don't litter my fs tree + backup-directory-alist '(("." . (concat xdg-cache-home "emacs/saves"))) ;; don't litter my fs tree delete-old-versions t kept-new-versions 6 kept-old-versions 2 @@ -172,6 +212,16 @@ 'fullboth))))) (global-set-key [f11] 'toggle-fullscreen) +;; Automatically load smerge mode for merge files +(defun try-smerge-mode () + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^<<<<<<< " nil t) + (smerge-mode 1)))) +(add-hook 'find-file-hook 'try-smerge-mode t) + + +;; All my weird mode-specific settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-hook 'text-mode-hook 'turn-on-auto-fill) @@ -202,12 +252,10 @@ (set (make-local-variable 'tab-width) 4) )) +(add-hook 'php-mode-hook + '(lambda() + (c-set-offset 'cpp-macro 0) + )) + (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) - -(defun try-smerge-mode () - (save-excursion - (goto-char (point-min)) - (when (re-search-forward "^<<<<<<< " nil t) - (smerge-mode 1)))) -(add-hook 'find-file-hook 'try-smerge-mode t) diff --git a/.config/selected_editor b/.config/selected_editor index eca2482..1cc76a7 100644 --- a/.config/selected_editor +++ b/.config/selected_editor @@ -1,5 +1,5 @@ # Generated by /usr/bin/select-editor -SELECTED_EDITOR="emacsclient -a '' -c" +SELECTED_EDITOR="emacsclient -c" if [[ -n $SSH_CONNECTION ]]; then SELECTED_EDITOR+=' -nw' fi diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service index ef8f65f..279d83a 100644 --- a/.config/systemd/user/default.target.wants/emacs-daemon.service +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -4,6 +4,7 @@ Description=Emacs deamon [Service] Type=forking ExecStart=/bin/bash -l -c 'emacs --daemon' +ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' [Install] WantedBy=default.target -- cgit v1.2.3-54-g00ecf From 8d5402c81566b7dbef4839a78b5cb2623b9857a0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 22:21:43 -0500 Subject: upgrade emacs --- .config/emacs/custom.el | 4 +++- .config/emacs/emacsutils.el | 13 ------------- .config/emacs/init.el | 20 -------------------- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 .config/emacs/emacsutils.el (limited to '.config/emacs/custom.el') diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index af2aef8..26eb2ae 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -4,7 +4,9 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-enabled-themes (quote (tango-dark))) - '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(custom-safe-themes + (quote + ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") '(scroll-bar-mode nil) diff --git a/.config/emacs/emacsutils.el b/.config/emacs/emacsutils.el deleted file mode 100644 index 966d16e..0000000 --- a/.config/emacs/emacsutils.el +++ /dev/null @@ -1,13 +0,0 @@ -(defun mailto-compose-mail (mailto-url) - (if (and (stringp mailto-url) - (string-match "\\`mailto:" mailto-url)) - (progn - (require 'rfc2368) - (let* ((headers (mapcar (lambda (h) (cons (intern (car h)) (cdr h))) - (rfc2368-parse-mailto-url mailto-url))) - (good-headers (remove-if (lambda (h) (member (car h) '(Body))) headers)) - (body (cdr (assoc 'Body headers)))) - (wl-draft good-headers nil nil body))))) - -(defun emacs-terminal-emulator (program) - (ansi-term program)) \ No newline at end of file diff --git a/.config/emacs/init.el b/.config/emacs/init.el index a36cf37..f766ac5 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -34,7 +34,6 @@ point-entered minibuffer-avoid-prompt face minibuffer-prompt )) -(add-to-list 'load-path user-emacs-directory) (load custom-file 'noerror) @@ -129,15 +128,6 @@ (let ((indent-tabs-mode nil)) ad-do-it)) (require 'go-mode-load nil t) -(require 'uniquify) -(load "emacsutils") - -(setq-default truncate-lines t) -(setq - inhibit-startup-screen t - org-log-done 'time - gamegrid-user-score-file-directory "/var/games/emacs/" - ) @@ -201,16 +191,6 @@ browse-url-browser-function 'browse-url-generic ) -;; Make work like in every other program -(defun toggle-fullscreen (&optional f) - (interactive) - (let ((current-value (frame-parameter nil 'fullscreen))) - (set-frame-parameter nil 'fullscreen - (if (equal 'fullboth current-value) - (if (boundp 'old-fullscreen) old-fullscreen nil) - (progn (setq old-fullscreen current-value) - 'fullboth))))) -(global-set-key [f11] 'toggle-fullscreen) ;; Automatically load smerge mode for merge files (defun try-smerge-mode () -- cgit v1.2.3-54-g00ecf