From bcdc8591d20f23e3f4a1645a7ccfc473b2916c3e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:19:24 -0400 Subject: X11/clientrc: properly escape $DISPLAY for systemd --- .config/X11/clientrc | 9 +++++---- .config/X11/modmap.new | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .config/X11/modmap.new 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/X11/modmap.new b/.config/X11/modmap.new new file mode 100644 index 0000000..c902b52 --- /dev/null +++ b/.config/X11/modmap.new @@ -0,0 +1,4 @@ +keycode 135 = Super_R + +clear mod4 +add mod4 = Super_L Super_R Hyper_L Hyper_R Menu -- cgit v1.2.3-54-g00ecf From 93420febe072e47be485fda291e00a41a504e3af Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:20:11 -0400 Subject: Update mail filters --- .config/maildirproc/att.rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 98ef8ae..43cec78 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -15,10 +15,9 @@ def mailman_domain(mail, 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) @@ -295,6 +294,7 @@ def my_filters(mail): "@core3.amsl.com", "@defectivebydesign.org", "@eff.org", + "@fedorahosted.org", "@foocorp.net", "@fsf.org", "@github.com", @@ -303,6 +303,7 @@ def my_filters(mail): "@gnu.org", "@ietf.org", "@kde.org", + "@lists.fedorahosted.org", "@nongnu.org", "@sourceforge.com", "@thyrsus.com", -- cgit v1.2.3-54-g00ecf From 4fbcd8769a06ddb9e53b7b647c3e1416b8d9962f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:21:08 -0400 Subject: wmii: Use systemd-notify instead of hitting the socket manually --- .config/wmii-hg/config.sh | 4 +--- .config/wmii-hg/wmiirc | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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 -- cgit v1.2.3-54-g00ecf From 3d872ce1c678e5d829d5e324f92b50eef02877fb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:24:55 -0400 Subject: libretools configuration --- .config/libretools/.gitignore | 1 - .config/libretools/libretools.conf | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 .config/libretools/.gitignore create mode 100644 .config/libretools/libretools.conf 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 -- cgit v1.2.3-54-g00ecf From b575e899e72f78a0f810be8fc614b018f6926f6d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jul 2015 19:23:39 -0600 Subject: .config/Makefile: better error handling --- .config/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/Makefile b/.config/Makefile index 94d0cca..ffac989 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,7 +16,8 @@ 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)' > '$@' @@ -40,7 +41,5 @@ ${HOME}/Maildir/%: | ${HOME}/Maildir touch '$@'/maildirfolder .DELETE_ON_ERROR: -.PHONY: FORCE PHONY -FORCE: ; -PHONY: ; +.SECONDARY: endif -- cgit v1.2.3-54-g00ecf From 9211c8a57ec13be6c9ebe0333aa8d3ad65c8cdbe Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jul 2015 19:24:11 -0600 Subject: Makefile: .folders: recognize symlinks --- .config/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/Makefile b/.config/Makefile index ffac989..9ee3115 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -20,7 +20,7 @@ clean: .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@^\./@/@' ) > $@ -- cgit v1.2.3-54-g00ecf From f58b1d0d6467ee0e0fe460cbc51b507b6ca404f5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jul 2015 19:26:11 -0600 Subject: tidy --- .config/X11/modmap.new | 4 ---- .config/pacman/makepkg.conf | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 .config/X11/modmap.new diff --git a/.config/X11/modmap.new b/.config/X11/modmap.new deleted file mode 100644 index c902b52..0000000 --- a/.config/X11/modmap.new +++ /dev/null @@ -1,4 +0,0 @@ -keycode 135 = Super_R - -clear mod4 -add mod4 = Super_L Super_R Hyper_L Hyper_R Menu 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" -- cgit v1.2.3-54-g00ecf From 83431d32040061990874bebd6150eeab80aa0322 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jul 2015 19:26:23 -0600 Subject: mail filters --- .config/maildirproc/att.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 43cec78..792b42c 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -13,14 +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: return m.group(2) for hdr in [ 'To', 'Cc', 'From' ]: 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): @@ -96,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") -- cgit v1.2.3-54-g00ecf From 4c94dd5c044d3e3456937919e48481d8b3bb00cb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 19 Jul 2015 19:27:08 -0600 Subject: bash aliases: change mvln --- .config/bash/rc.d/aliases.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 '^ '; } -- cgit v1.2.3-54-g00ecf