From 90972cbcc737530a8d8bf677fa7501da239d8ab2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Dec 2015 23:45:39 -0500 Subject: update ~/.config/emacs --- .config/emacs/custom.el | 8 ++++++++ .config/emacs/init.el | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 55af402..a33c87f 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -31,10 +31,18 @@ (quote ("xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f"))) '(org-src-fontify-natively t) + '(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)) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) + '(tramp-use-ssh-controlmaster-options nil) '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 38f6e77..d102269 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -105,6 +105,7 @@ (set (make-local-variable 'tab-width) 2) (set (make-local-variable 'indent-tabs-mode) nil) ))) + (:name go-mode :type elpa) (:name graphviz-dot-mode :type elpa) (:name haml-mode :type elpa) (:name markdown-mode :type elpa @@ -112,7 +113,7 @@ (:name nginx-mode :type elpa :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) (:name scss-mode :type elpa) - (:name go-mode :type elpa) + (:name yaml-mode :type elpa) )) ;; What packages el-get should install, both from above, and it's ;; internal list of sources. @@ -138,6 +139,7 @@ nginx-mode php-mode-improved scss-mode + yaml-mode ))) -- cgit v1.2.3-54-g00ecf From f189b197d568df8555a7de1e08f7f05665f708ba Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Dec 2015 23:40:42 -0500 Subject: minor fixes to the XDG_RUNTIME_DIR implementation --- .config/login.d/02_xdg_runtime_dir.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh index 6db58af..6e3e4ad 100644 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ b/.config/login.d/02_xdg_runtime_dir.sh @@ -5,11 +5,11 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then _diy_xdg_runtime_login() { export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" if flock -xn 7; then if [ ! -d "$XDG_RUNTIME_DIR" ]; then local tmp="$(mktemp -d --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" fi # Unfortunately this doesn't survive across exec(1). @@ -19,7 +19,6 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then fi } _diy_xdg_runtime_logout() { - exec 7>&- exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" if flock -xn 7; then rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" -- cgit v1.2.3-54-g00ecf From 3306324e032199c0af8c9ea1f0e29b102b806a59 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Dec 2015 23:49:12 -0500 Subject: build64-par: update ~/.config/emacs --- .config/emacs/custom.el | 4 +++- .config/emacs/init.el | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index a33c87f..ef6e985 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -3,7 +3,9 @@ ;; 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 (tango-dark))) + '(ansi-color-names-vector + ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" "#8cc4ff" "#eeeeec"]) + '(custom-enabled-themes (quote (tsdh-dark))) '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index d102269..e0e39d4 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -105,6 +105,7 @@ (set (make-local-variable 'tab-width) 2) (set (make-local-variable 'indent-tabs-mode) nil) ))) + (:name glsl-mode :type elpa) (:name go-mode :type elpa) (:name graphviz-dot-mode :type elpa) (:name haml-mode :type elpa) @@ -132,6 +133,7 @@ ;;nxhtml ; nxhtml is invasive, only enable if actively using bison-mode coffee-mode + glsl-mode go-mode graphviz-dot-mode haml-mode @@ -328,3 +330,4 @@ sh-script.el is broken." (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("\\.jad\\'" . java-mode)) +(put 'downcase-region 'disabled nil) -- cgit v1.2.3-54-g00ecf From 65bb0acde892d608fe2937ad194664b031df2c28 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Dec 2015 23:49:26 -0500 Subject: update mail filters --- .config/maildirproc/att.rc | 151 ++++++++++++++++++++++++++++-------------- .config/maildirproc/purdue.rc | 8 +++ 2 files changed, 111 insertions(+), 48 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 792b42c..397ffcf 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -23,6 +23,19 @@ def mailman_domain(mail, domain): return m.group(1) return None +def ezmlm_domain(mail, domain): + """ + Return a string that is the list-name for a ezmlm domain + """ + m = mail["Mailing-List"].matches("^(.* )?(\w+)(-\S*)?@"+re.escape(domain)+"(;.*)?$") + if m: + return m.group(2) + for hdr in [ 'To', 'Cc', 'From' ]: + m = mail[hdr].matches("(\w)@"+re.escape(domain)) + if m: + return m.group(1) + return None + def is_to_or_from(mail,address): """ Return true if [mail] is to or from an address that contains [address]. @@ -86,25 +99,38 @@ def handle_incoming_unknown(mail): # Whitelist if ( False + or is_to_or_from(mail, "Bryan@ChankTunUnGi.onmicrosoft.com") + or is_to_or_from(mail, "cacnedcomms@gmail.com") or is_to_or_from(mail, "fsf.org") or is_to_or_from(mail, "gnu.org") or is_to_or_from(mail, "parabola.nu") or is_to_or_from(mail, "parabolagnulinux.org") - or mail["From"] == "MAILER-DAEMON@yahoo.com" or mail["From"] == "3174451635@mms.att.net" + or mail["From"] == "MAILER-DAEMON@yahoo.com" + or mail["From"].contains("@e.oldnational.com>") or mail["From"].contains("@facebookmail.com>") or mail["From"].contains("@gandi.net") or mail["From"].contains("@github.com>") or mail["From"].contains("@goodwillindy.org>") or mail["From"].contains("@kickstarter.com>") + or mail["From"].contains("@list.cr.yp.to") or mail["From"].contains("@lpi.org>") + or mail["From"].contains("@lulzbot.com>") + or mail["From"].contains("@mail.scribd.com>") + or mail["From"].contains("@massdrop.com>") or mail["From"].contains("@msdlt.k12.in.us>") or mail["From"].contains("@parabola.nu") or mail["From"].contains("@post.oreilly.com>") or mail["From"].contains("@scouting.org>") + or mail["From"].contains("@solutionsinplastic.com>") + or mail["From"].contains("@startcom.org>") + or mail["From"].contains("@usfirst.org>") or mail["From"].contains("@wolframalpha.com>") + or mail["From"].contains("Promo@email.newegg.com") + or mail["From"].contains("info@email2.mysimplemobile.com") or mail["From"].contains("margieshu@sbcglobal.net") or mail["From"].contains("parabolagnulinux.org") + or mail["From"].matches("@[a-z]+\.gandi\.net") or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre|fedorahosted)\.org") or mail["List-Id"].matches(".*\.parabola\.nu") or mail["Subject"].contains("[Dev]") @@ -144,7 +170,12 @@ def my_filters(mail): [ 'parabola.nu', 'parabola' ] ]: list = mailman_domain(mail, pair[0]) if list: - move_ham(mail,".software."+pair[1]+"."+list) + move_ham(mail, ".software."+pair[1]+"."+list) + return + for pair in [ [ 'list.cr.yp.to', 'djb' ] ]: + list = ezmlm_domain(mail, pair[0]) + if list: + move_ham(mail, ".software."+pair[1]+"."+list) return if ( False @@ -152,12 +183,12 @@ def my_filters(mail): or is_to_or_from(mail, "parabola.nu") or is_to_or_from(mail, "kiwwwi.com.ar") ): - move_ham(mail,".software.parabola") + move_ham(mail, ".software.parabola") return # Sort mail from some social websites if mail["From"].matches("facebook(|mail)\.com"): - move_ham(mail,".Social.Facebook") + move_ham(mail, ".Social.Facebook") return if ( @@ -165,7 +196,7 @@ def my_filters(mail): or mail["From"].matches("identi\.ca") or mail["From"].matches("statusnet") ): - move_ham(mail,".Social.Identica") + move_ham(mail, ".Social.Identica") return if ( @@ -173,49 +204,54 @@ def my_filters(mail): or mail["From"].contains("@gandi.net") or mail["From"].contains("@ramhost.us") or mail["From"].contains("@startcom.org") + or (mail["From"].contains("@2co.com") and mail["Subject"].contains("RAM Host")) ): - move_ham(mail,".lukeshu-com") + move_ham(mail, ".lukeshu-com") return if mail["From"].matches("twitter\.com"): - move_ham(mail,".Social.Twitter") + move_ham(mail, ".Social.Twitter") return if mail["From"].matches("@xkcd\.com"): - move_ham(mail,".Social.xkcd") + move_ham(mail, ".Social.xkcd") return # Sort mail related to Troop 276 if ( False or mail["List-Id"].contains("troopmailinglist.troop276.net") - or is_to_or_from(mail,"t276_announcements@att.net") + or is_to_or_from(mail, "t276_announcements@att.net") or mail["Subject"].matches("troop") or mail["Subject"].matches("merit\s*badge") - or is_to_or_from(mail,"jsting@sbcglobal.net") - or is_to_or_from(mail,"trdindy@comcast.net") - or is_to_or_from(mail,"wjensen111@aol.com") - or is_to_or_from(mail,"dhoyt@yourhomecompany.com") - or is_to_or_from(mail,"salupo_vincent_p@lilly.com") - or is_to_or_from(mail,"basu@maharjan.org") - or is_to_or_from(mail,"muellerindy@yahoo.com") - or is_to_or_from(mail,"solorzano.luis@rocketmail.com") - or is_to_or_from(mail,"eldredmac@comcast.net")# MacDonell - or is_to_or_from(mail,"mitchprather@sbcglobal.net") - or is_to_or_from(mail,"oa_wap@yahoo.com") - or is_to_or_from(mail,"mytroop.us") - or is_to_or_from(mail,"crossroadsbsa.org") + or is_to_or_from(mail, "Bryan@ChankTunUnGi.onmicrosoft.com") + or is_to_or_from(mail, "basu@maharjan.org") + or is_to_or_from(mail, "cacnedcomms@gmail.com") + or is_to_or_from(mail, "crossroadsbsa.org") + or is_to_or_from(mail, "dhoyt@yourhomecompany.com") + or is_to_or_from(mail, "dllargent@comcast.net") + or is_to_or_from(mail, "eldredmac@comcast.net")# MacDonell + or is_to_or_from(mail, "jsting@sbcglobal.net") + or is_to_or_from(mail, "mitchprather@sbcglobal.net") + or is_to_or_from(mail, "muellerindy@yahoo.com") + or is_to_or_from(mail, "mytroop.us") + or is_to_or_from(mail, "oa_wap@yahoo.com") + or is_to_or_from(mail, "salupo_vincent_p@lilly.com") + or is_to_or_from(mail, "scouting.org") + or is_to_or_from(mail, "solorzano.luis@rocketmail.com") + or is_to_or_from(mail, "trdindy@comcast.net") + or is_to_or_from(mail, "wjensen111@aol.com") ): - move_ham(mail,".BoyScouts") + move_ham(mail, ".BoyScouts") return # Sort mail from misc people if ( False - or is_to_or_from(mail,"margieshu@sbcglobal.net") - or is_to_or_from(mail,"3174451635@mms.att.net") + or is_to_or_from(mail, "margieshu@sbcglobal.net") + or is_to_or_from(mail, "3174451635@mms.att.net") ): - move_ham(mail,".misc.Mom") + move_ham(mail, ".misc.Mom") return for address in [ @@ -223,23 +259,24 @@ def my_filters(mail): "nintendo-news.com", ]: if mail["From"].contains(address): - move_ham(mail,".misc.Nintendo") + move_ham(mail, ".misc.Nintendo") return for address in [ "@lpi.org", "@pearson.com", + "ciscotraining-notify@cisco.com", "CompTIA", ]: if mail["From"].contains(address): - move_ham(mail,".misc.CompTIA") + move_ham(mail, ".misc.CompTIA") return # Sort mail from FRC people # Generic for address in [ "@ni.com", "@usfirst.org" ]: if is_to_or_from(mail,address): - move_ham(mail,".FRC") + move_ham(mail, ".FRC") return # FRC 829 for address in [ @@ -247,10 +284,10 @@ def my_filters(mail): "william.walk@gmail.com", ]: if is_to_or_from(mail,address): - move_ham(mail,".FRC.829") + move_ham(mail, ".FRC.829") return if mail["Subject"].matches("\b829\b"): - move_hame(mail,".FRC.829") + move_ham(mail, ".FRC.829") return # FRC 1024 for address in [ @@ -270,15 +307,15 @@ def my_filters(mail): "tswilson4801@att.net", ]: if is_to_or_from(mail,address): - move_ham(mail,".FRC.1024") + move_ham(mail, ".FRC.1024") return for subject_re in [ "\b1024\b", "kil-?a-?bytes" ]: if mail["Subject"].matches(subject_re): - move_ham(mail,".FRC.1024") + move_ham(mail, ".FRC.1024") return # FRC 4272 if mail["Subject"].matches("\b4272\b"): - move_hame(mail,".FRC.4272") + move_ham(mail, ".FRC.4272") return # Catch BS things because of CS classes before the general @@ -310,7 +347,7 @@ def my_filters(mail): "@thyrsus.com", ]: if is_to_or_from(mail,address): - move_ham(mail,".software") + move_ham(mail, ".software") return # Sort mail from the school newspaper @@ -319,21 +356,38 @@ def my_filters(mail): or is_to_or_from(mail, "@lnnorthstar.org") or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") ): - move_ham(mail,".HighSchool.Newspaper") + move_ham(mail, ".HighSchool.Newspaper") return # Sort misc newsletters if ( False or mail["From"].contains("newsletter") - or mail["From"].contains("auto@comicsbyemail.com") - or mail["From"].contains("oreilly.com") + or mail["From"].contains("announcements") or mail["Subject"].contains("newsletter") + or mail["Message-Id"].contains("@sailthru.com") + or False + or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) + or (mail["From"].contains("no-reply@kickstarter.com") and mail["Message-Id"].contains(".sendgrid.net")) + or (mail["From"].contains("no-reply@kickstarter.com") and ( + False + or mail["Subject"].contains("Projects We Love:") + or mail["Subject"].contains("Project Update"))) or mail["From"].contains("Info@mailing.jamendo.com") + or mail["From"].contains("Promo@email.newegg.com") + or mail["From"].contains("auto@comicsbyemail.com") or mail["From"].contains("info@demandprogress.org") - or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) + or mail["From"].contains("info@email2.mysimplemobile.com") + or mail["From"].contains("info@massdrop.com") + or mail["From"].contains("info@lulzbot.com") + or mail["From"].contains("oreilly.com") + or mail["From"].contains("reply-to@e.digikey.com") + or mail["From"].contains("communication@communications.bmv.in.gov") + or mail["From"].contains("sales@solutionsinplastic.com") + or mail["From"].contains("social@goodwillindy.org") + or mail["From"].contains("support@support.digitalocean.com") ): - move_ham(mail,".misc.Newsletters") + move_ham(mail, ".misc.Newsletters") return if ( @@ -341,7 +395,7 @@ def my_filters(mail): 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 is_to_or_from(mail, "ibwhite@comcast.net") or mail["Subject"].contains("IOA") or mail["From"].contains("nths.org") or mail["Subject"].contains("NTHS") @@ -349,7 +403,7 @@ def my_filters(mail): or mail["Subject"].contains("NHS") or mail["Subject"].contains("National Honor Society") ): - move_ham(mail,".HighSchool") + move_ham(mail, ".HighSchool") return # from college stuff @@ -358,7 +412,7 @@ def my_filters(mail): or mail["Subject"].contains("NYLF") # National Youth Leadership Conference or mail["Subject"].contains("NSHSS") ): - move_ham(mail,".College.Societies") + move_ham(mail, ".College.Societies") return if ( False @@ -368,11 +422,11 @@ def my_filters(mail): or mail["From"].contains("@dreamitdoitindiana.com") or mail["From"].contains("@indianatechinfo.org") ): - move_ham(mail,".College") + move_ham(mail, ".College") return if mail["From"].contains("@projectwonderful.com"): - move_ham(mail,".misc.ProjectWonderful") + move_ham(mail, ".misc.ProjectWonderful") return if ( @@ -382,17 +436,18 @@ def my_filters(mail): or mail["From"].matches("@[^,>]*\.lan") or mail["To"].matches("luke@") ): - move_ham(mail,".LocalSystems") + move_ham(mail, ".LocalSystems") return if ( False or mail["Subject"].contains("password") or mail["Subject"].contains("account") + or mail["From"].contains("accounts") ): - move_ham(mail,".misc.accounts") + move_ham(mail, ".misc.accounts") return - move_ham(mail,"") + move_ham(mail, "") handle_mapping = { "Inbox": handle_incoming_unknown, diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index a09d7ab..06f349b 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -131,6 +131,14 @@ def my_filters(mail): mail.move("INBOX.crap.cron") return + if is_to_or_from(mail,"austin-group-l@opengroup.org"): + mail.move("INBOX.POSIX") + return + + if mail["From"].contains("build@travis-ci.org"): + mail.move("INBOX.crap.TravisCI") + return + # # Fall 2012 ############################################################ # # SCI210 (Teaming principles) -- cgit v1.2.3-54-g00ecf From fd60f207ec451406885578e282bfb3cb252a58cc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Dec 2015 23:49:55 -0500 Subject: tidy --- .config/okular/.gitignore | 1 - .config/symlinks | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .config/okular/.gitignore diff --git a/.config/okular/.gitignore b/.config/okular/.gitignore deleted file mode 100644 index 4e33b14..0000000 --- a/.config/okular/.gitignore +++ /dev/null @@ -1 +0,0 @@ -docdata diff --git a/.config/symlinks b/.config/symlinks index c99afba..209f291 100644 --- a/.config/symlinks +++ b/.config/symlinks @@ -42,7 +42,7 @@ .config/wmii/ .wmii # # .maildirproc is not used, but must exist -/tmp/ .maildirproc +/var/empty/ .maildirproc # KDE .config/ .kde/share/apps # -- cgit v1.2.3-54-g00ecf From 4b4a1f35dc73546de7dbb87a2bde338535ee22c3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Oct 2015 15:34:06 -0400 Subject: emacs: fix typos in comments --- .config/emacs/init.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index e0e39d4..fe2400d 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -75,7 +75,7 @@ ;; 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 +;; This is also nice because I can do event-based programming for what ;; to do once a package is loaded, using :after. ;; For some reason, el-get adds a bunch of 3rd-party repos to @@ -116,7 +116,7 @@ (:name scss-mode :type elpa) (:name yaml-mode :type elpa) )) -;; What packages el-get should install, both from above, and it's +;; What packages el-get should install, both from above, and its ;; internal list of sources. (el-get 'sync (append '(el-get) -- cgit v1.2.3-54-g00ecf From c9daeaee779e50ed84b03a34914ebf940aa7993c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Dec 2015 16:47:45 -0500 Subject: bash: alias mv='mv -i' --- .config/bash/rc.d/10_aliases.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index 758c069..d6a1ab3 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -68,6 +68,7 @@ alias tree='tree --charset utf8' alias cd=pushd alias gitk='gitk --all --date-order' alias userctl='systemctl --user' +alias mv='mv -i' ###################################################################### # These are actually functions :P # -- cgit v1.2.3-54-g00ecf From 771d5a041a48b4ebf2c5ee8ff2fc98834a613843 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Dec 2015 16:48:02 -0500 Subject: bash: improve the mvln function --- .config/bash/rc.d/10_aliases.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh index d6a1ab3..f34230b 100644 --- a/.config/bash/rc.d/10_aliases.sh +++ b/.config/bash/rc.d/10_aliases.sh @@ -82,15 +82,23 @@ term-title() { printf "$fmt" "$*" } mvln() { + local target link if [[ ! -L "$1" ]]; then libremessages error 'Not a soft link: %s' "$1" + return 1 fi - target=$(readlink -f -- "$1") - ln -srT -- "$target" "$2" - if cmp -- "$1" "$2"; then + if [[ -d "$2" ]]; then + link="$2/${1##*/}" + else + link="$2" + fi + target=$(readlink -f -- "$1") || return 1 + ln -srT -- "$target" "$link" + if cmp -- "$1" "$link"; then rm -f -- "$1" else - libremessages error 'Failed moving link: %s -> %s' "$1" "$2" + libremessages error 'Failed moving link: %s -> %s' "$1" "$link" + return 1 fi } jarls() { -- cgit v1.2.3-54-g00ecf From 2ae901c981b699f7a8607a5ea6f6790ccbb0adb8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Dec 2015 17:22:17 -0500 Subject: emacs: stuff --- .config/emacs/custom.el | 3 ++- .config/emacs/init.el | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index ef6e985..a099221 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -39,7 +39,8 @@ (quote ((Nginx-indent-tabs-mode) (Nginx-indent-level . 4) - (Nginx-indent-level . 8)))) + (Nginx-indent-level . 8) + (c-set-style . "K&R")))) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") diff --git a/.config/emacs/init.el b/.config/emacs/init.el index fe2400d..f1650a4 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -111,6 +111,7 @@ (:name haml-mode :type elpa) (:name markdown-mode :type elpa :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) + (:name mediawiki :type elpa) (:name nginx-mode :type elpa :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) (:name scss-mode :type elpa) @@ -138,6 +139,8 @@ graphviz-dot-mode haml-mode markdown-mode + yaml-mode + mediawiki nginx-mode php-mode-improved scss-mode -- cgit v1.2.3-54-g00ecf From d69957eb815987ab1f96b7b8ef43d3d5df69d1e4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Dec 2015 17:17:27 -0500 Subject: libreoffice: use GTK-2 theme --- .config/login.d/10_libreoffice.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .config/login.d/10_libreoffice.sh diff --git a/.config/login.d/10_libreoffice.sh b/.config/login.d/10_libreoffice.sh new file mode 100644 index 0000000..1831f5a --- /dev/null +++ b/.config/login.d/10_libreoffice.sh @@ -0,0 +1,4 @@ +#!/hint/sh +# Force LibreOffice to use GTK2. +# (gtk = GTK2, gtk3 = GTK3, kde4 = Qt, gen = ?) +export SAL_USE_VCLPLUGIN=gtk -- cgit v1.2.3-54-g00ecf From b29a4ce1e8256987e195c710a76bb529644ed46f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 7 Dec 2015 00:39:22 -0500 Subject: tidy (generic) --- .config/login.d/10_gpg.sh | 2 +- .config/login.d/90_dot-runtime.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/login.d/10_gpg.sh b/.config/login.d/10_gpg.sh index c1c5f82..83e4203 100644 --- a/.config/login.d/10_gpg.sh +++ b/.config/login.d/10_gpg.sh @@ -1,4 +1,4 @@ #!/hint/sh -if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then +if [ -z "$GPGKEY" -a -f "${HOME}/.gnupg/gpg.conf" ]; then export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf"` fi diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh index cb0b7f2..9aefa59 100644 --- a/.config/login.d/90_dot-runtime.sh +++ b/.config/login.d/90_dot-runtime.sh @@ -1,3 +1,4 @@ +#!/hint/sh # This is really only needed for ssh ControlPath; as I don't have a # way to communicate XDG_RUNTIME_DIR to it otherwise. mkdir -p -- ~/.runtime -- cgit v1.2.3-54-g00ecf From bde70052c4b05b9ecc19b17f03bcff348bfc354a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Dec 2015 17:27:17 -0500 Subject: shorten ~/.runtime to ~/.r --- .config/login.d/90_dot-runtime.sh | 6 +++--- .config/ssh/config | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh index 9aefa59..9536fb4 100644 --- a/.config/login.d/90_dot-runtime.sh +++ b/.config/login.d/90_dot-runtime.sh @@ -1,9 +1,9 @@ #!/hint/sh # This is really only needed for ssh ControlPath; as I don't have a # way to communicate XDG_RUNTIME_DIR to it otherwise. -mkdir -p -- ~/.runtime +mkdir -p -- ~/.r if [ -n "$XDG_RUNTIME_DIR" ]; then - ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime/"$HOSTNAME" + ln -sfT -- "$XDG_RUNTIME_DIR" ~/.r/"$HOSTNAME" else - ln -sfT -- /tmp ~/.runtime/"$HOSTNAME" + ln -sfT -- /tmp ~/.r/"$HOSTNAME" fi diff --git a/.config/ssh/config b/.config/ssh/config index f651513..a243c5d 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -1,7 +1,7 @@ Host * Protocol 2 ControlMaster auto - ControlPath ~/.runtime/%l/ssh-%r@%h:%p + ControlPath ~/.r/%l/ssh-%r@%h:%p Compression yes # Purdue ################################################### -- cgit v1.2.3-54-g00ecf From 259b88d6f8df12ff737257a4ef0a3ab23ab2bdb9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 10 Dec 2015 21:12:08 -0500 Subject: git: ignore NFS lock files --- .config/git/ignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/git/ignore b/.config/git/ignore index d0f607c..a227edd 100644 --- a/.config/git/ignore +++ b/.config/git/ignore @@ -1,3 +1,4 @@ #*# .#* *~ +.nfs* -- cgit v1.2.3-54-g00ecf From 21bb3f7fb1111d8b1043ff4c3a1d821042a8e4c6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 10 Dec 2015 21:14:23 -0500 Subject: XDG_RUNTIME_DIR: "Recent" Linux kernels support flock over NFS. And Purdue seems to have enabled that. --- .config/login.d/02_xdg_runtime_dir.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh index 6e3e4ad..86f1232 100644 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ b/.config/login.d/02_xdg_runtime_dir.sh @@ -1,12 +1,11 @@ #!/hint/sh - # Set XDG_RUNTIME_DIR if we can if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then _diy_xdg_runtime_login() { - export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" - if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" - exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" + export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME.dir" + if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME.lock" ]; then + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" + exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME.lock" if flock -xn 7; then if [ ! -d "$XDG_RUNTIME_DIR" ]; then local tmp="$(mktemp -d --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" @@ -19,9 +18,9 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then fi } _diy_xdg_runtime_logout() { - exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" if flock -xn 7; then rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" + rm -f -- "$XDG_RUNTIME_DIR" fi } _diy_xdg_runtime_login -- cgit v1.2.3-54-g00ecf