diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-07-19 19:31:39 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-07-19 19:31:39 -0600 |
commit | 4f657c1a9089993396c702cf7bc3518b18eef3c9 (patch) | |
tree | 3f481b148988b912ce209fbfca0a0cbf3cc2d1df | |
parent | de4f8ceb6473cfc6a20230cc9c7728e25cc04fb8 (diff) | |
parent | 641fc49fc651b6a67fb8ff90198e889e0e3920bb (diff) |
Merge branch 'master' into build64-par/master
-rw-r--r-- | .config/Makefile | 11 | ||||
-rw-r--r-- | .config/X11/clientrc | 9 | ||||
-rw-r--r-- | .config/bash/rc.d/aliases.sh | 13 | ||||
-rw-r--r-- | .config/cron/make-config | 2 | ||||
-rw-r--r-- | .config/libretools/.gitignore | 1 | ||||
-rw-r--r-- | .config/libretools/libretools.conf | 4 | ||||
-rw-r--r-- | .config/login.d/02_xdg_runtime_dir.sh | 17 | ||||
-rw-r--r-- | .config/login.d/10_makeflags.sh | 2 | ||||
-rw-r--r-- | .config/login.d/90_dot-runtime.sh | 4 | ||||
-rw-r--r-- | .config/login.d/90_symlink_xdg_runtime_dir.sh | 7 | ||||
-rw-r--r-- | .config/maildirproc/att.rc | 12 | ||||
-rw-r--r-- | .config/pacman/makepkg.conf | 2 | ||||
-rw-r--r-- | .config/ssh/config | 2 | ||||
-rw-r--r-- | .config/symlinks | 3 | ||||
-rw-r--r-- | .config/wmii-hg/config.sh | 4 | ||||
-rwxr-xr-x | .config/wmii-hg/wmiirc | 4 |
16 files changed, 53 insertions, 44 deletions
diff --git a/.config/Makefile b/.config/Makefile index 94d0cca..9ee3115 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -4,8 +4,8 @@ default: all; @: %: . ~/.profile && $(MAKE) '$@' else -SHELL = /bin/bash +SHELL = /bin/bash -o pipefail GIT_DIR = ${HOME}/.git targets = \ @@ -16,10 +16,11 @@ targets = \ all: $(targets) clean: - rm -f $(targets) + rm -f -- $(targets) +.PHONY: all clean ${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 -r0 dirname -z -- | sort -zu | xargs -0 printf -- '.%s\n' | grep -vP '^\.FOLDERS.Ham.20(?!15)' > '$@' + find -L $< -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 -r0 dirname -z -- | sort -zu | xargs -0 printf -- '.%s\n' | grep -vP '^\.FOLDERS.Ham.20(?!15)' > '$@' ${GIT_DIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ @@ -40,7 +41,5 @@ ${HOME}/Maildir/%: | ${HOME}/Maildir touch '$@'/maildirfolder .DELETE_ON_ERROR: -.PHONY: FORCE PHONY -FORCE: ; -PHONY: ; +.SECONDARY: endif diff --git a/.config/X11/clientrc b/.config/X11/clientrc index 88ae527..ac0d5a8 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -18,9 +18,10 @@ if [ -f "$usermodmap" ]; then fi [ -n "$XDG_RUNTIME_DIR" ] || exit 1 -trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT -mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" +_DISPLAY="$(systemd-escape -- "$DISPLAY")" +trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}")" EXIT +mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" -cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" & -systemctl --user start "wm@${DISPLAY}.target" & +cat "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" & +systemctl --user start "wm@${_DISPLAY}.target" & wait diff --git a/.config/bash/rc.d/aliases.sh b/.config/bash/rc.d/aliases.sh index 6b2460e..cd2cfd8 100644 --- a/.config/bash/rc.d/aliases.sh +++ b/.config/bash/rc.d/aliases.sh @@ -46,7 +46,18 @@ alias userctl='systemctl --user' ###################################################################### alias lock="clear; away -C 'This terminal is locked'" alias plock="term-title Terminal Locked;lock" -mvln() { mv $1 $2; ln -s $2 $1; } +mvln() { + if [[ ! -L "$1" ]]; then + libremessages error 'Not a soft link: %s' "$1" + fi + target=$(readlink -f -- "$1") + ln -srT -- "$target" "$2" + if cmp -- "$1" "$2"; then + rm -f -- "$1" + else + libremessages error 'Failed moving link: %s -> %s' "$1" "$2" + fi +} 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 6a7e9d6..a4a3480 100644 --- a/.config/cron/make-config +++ b/.config/cron/make-config @@ -1,2 +1,2 @@ #m h dom mon dow command -*/5 * * * * cronic make -C ~/.config +*/5 * * * * chronic make -C ~/.config diff --git a/.config/libretools/.gitignore b/.config/libretools/.gitignore deleted file mode 100644 index 1881962..0000000 --- a/.config/libretools/.gitignore +++ /dev/null @@ -1 +0,0 @@ -blacklist.txt diff --git a/.config/libretools/libretools.conf b/.config/libretools/libretools.conf new file mode 100644 index 0000000..a2f2c24 --- /dev/null +++ b/.config/libretools/libretools.conf @@ -0,0 +1,4 @@ +HOOKPOSTRELEASE=":" +if [[ -n "${ONLY_ARCH:-}" ]]; then + ARCHES=("$ONLY_ARCH") +fi diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh index 6700669..864eadd 100644 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ b/.config/login.d/02_xdg_runtime_dir.sh @@ -4,22 +4,23 @@ if [ -z "$XDG_RUNTIME_DIR" ] && shopt -q login_shell && type flock &>/dev/null; then _diy_xdg_runtime_login() { export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" - # There's a race condition here, between the `ln -s` and `flock`. - # But it's not like I'll be hammering a box with logins. - 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 if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" - if flock -sn 7; then + 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). trap _diy_xdg_runtime_logout EXIT + flock -sn 7 fi 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")" fi diff --git a/.config/login.d/10_makeflags.sh b/.config/login.d/10_makeflags.sh new file mode 100644 index 0000000..671c6d3 --- /dev/null +++ b/.config/login.d/10_makeflags.sh @@ -0,0 +1,2 @@ +#!/hint/sh +export MAKEFLAGS="-j$(nproc)" diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh new file mode 100644 index 0000000..d06568f --- /dev/null +++ b/.config/login.d/90_dot-runtime.sh @@ -0,0 +1,4 @@ +# 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 +ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime/"$HOSTNAME" diff --git a/.config/login.d/90_symlink_xdg_runtime_dir.sh b/.config/login.d/90_symlink_xdg_runtime_dir.sh deleted file mode 100644 index 7ee4bba..0000000 --- a/.config/login.d/90_symlink_xdg_runtime_dir.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/hint/sh -# This is really only needed for ssh ControlPath; as I don't have a -# way to communicate XDG_RUNTIME_DIR -if [ -n "$XDG_RUNTIME_DIR" ]; then - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" - ln -sfT -- "$XDG_RUNTIME_DIR" "$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" -fi diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 98ef8ae..792b42c 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -13,15 +13,14 @@ def mailman_domain(mail, domain): """ Return a string that is the list-name for a mailman domain """ - m = mail["List-Id"].matches("(.*<)?([^<]*)\."+re.escape(domain)) + m = mail["List-Id"].matches("^(.*<|)([^<]*)\."+re.escape(domain)) if m: - if mail["Subject"].contains("["+m.group(2)+"]"): - return m.group(2) + return m.group(2) for hdr in [ 'To', 'Cc', 'From' ]: - m = mail[hdr].matches("(\w*)@"+re.escape(domain)) + m = mail[hdr].matches("((\w|-)*)@"+re.escape(domain)) if m: if mail["Subject"].contains("["+m.group(1)+"]"): - return m.group(2) + return m.group(1) return None def is_to_or_from(mail,address): @@ -97,6 +96,7 @@ def handle_incoming_unknown(mail): 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("@lpi.org>") or mail["From"].contains("@msdlt.k12.in.us>") or mail["From"].contains("@parabola.nu") @@ -295,6 +295,7 @@ def my_filters(mail): "@core3.amsl.com", "@defectivebydesign.org", "@eff.org", + "@fedorahosted.org", "@foocorp.net", "@fsf.org", "@github.com", @@ -303,6 +304,7 @@ def my_filters(mail): "@gnu.org", "@ietf.org", "@kde.org", + "@lists.fedorahosted.org", "@nongnu.org", "@sourceforge.com", "@thyrsus.com", diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf index 8389fb5..dc3c5ba 100644 --- a/.config/pacman/makepkg.conf +++ b/.config/pacman/makepkg.conf @@ -1,4 +1,4 @@ -#!/phony/bash +#!/hint/bash PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest" SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest" diff --git a/.config/ssh/config b/.config/ssh/config index 8649e61..dc32703 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -6,7 +6,7 @@ Host * # Purdue ################################################### -Host data lore borg?? xinu?? sac?? sslab?? +Host data lore borg?? xinu?? sac?? sslab?? moore?? HostName %h.cs.purdue.edu User shumakl Host *.cs.purdue.edu diff --git a/.config/symlinks b/.config/symlinks index 80cffc1..c99afba 100644 --- a/.config/symlinks +++ b/.config/symlinks @@ -31,7 +31,6 @@ # Directories .config/arduino/ .arduino .config/bazaar/ .bazaar -.config/cpan/ .cpan .config/emacs/ .emacs.d .config/icons/ .icons .config/mozilla/ .mozilla # @@ -44,8 +43,6 @@ # .maildirproc is not used, but must exist /tmp/ .maildirproc -# There's a silly maximum length on Domain Sockets, so alias -.cache/xdg-runtime-dir/ .runtime # KDE .config/ .kde/share/apps # diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 6846920..4b968b0 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -68,9 +68,7 @@ Event() { ## WMII-meta events Quit) ## No args trap - EXIT - if [ -S "$NOTIFY_SOCKET" ]; then - echo STOPPING=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET" - fi + systemd-notify STOPPING=1 || true Event WmiircUnmount Event WmiircQuit;; Warning) ## $@=string diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index 260aaa1..379de79 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -13,9 +13,7 @@ wmiir xwrite /event WmiircQuit # close any existing wmiirc's Event WmiircStart # Notify systemd that we're ready -if [ -S "$NOTIFY_SOCKET" ]; then - echo READY=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET" -fi +systemd-notify READY=1 || true trap "Event Quit" EXIT |