diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-02-06 15:58:25 -0500 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-02-06 15:58:25 -0500 |
commit | b8b427b09f81755e9fe7d25223efa06881f126c3 (patch) | |
tree | a37a5d94adf253f5f25f7710dadc2cf639b32031 | |
parent | dab097d5000c4697761b6985cb3512f7bce0147f (diff) |
fix, kinda
-rwxr-xr-x | .config/X11/clientrc | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | .config/X11/login | 0 | ||||
-rw-r--r-- | .config/bash/logout.sh | 9 | ||||
-rw-r--r-- | .config/emacs/init.el | 9 | ||||
-rw-r--r-- | .config/login.d/01_xdg.sh | 7 |
5 files changed, 12 insertions, 15 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc index 4478db0..1ad935f 100755 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -17,7 +17,7 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -exec gnome-session +exec mate-session trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" diff --git a/.config/X11/login b/.config/X11/login index 03bad2a..03bad2a 100644..100755 --- a/.config/X11/login +++ b/.config/X11/login diff --git a/.config/bash/logout.sh b/.config/bash/logout.sh index de4f5f7..5dd8f7d 100644 --- a/.config/bash/logout.sh +++ b/.config/bash/logout.sh @@ -1,7 +1,4 @@ -# ~/.bash_logout: executed by bash(1) when login shell exits. +# ~/.bash_logout: sourced by bash(1) when login shell exits. -# when leaving the console clear the screen to increase privacy - -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi +# Clear the screen for privacy's sake. +clear diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 08b356f..e69a9ec 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,4 +1,5 @@ -;; This config requires Emacs 24(+?) +;; This config requires Emacs 24.4(+?) +;; Without (add-advice) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) (setq @@ -118,7 +119,7 @@ smart-tabs-mode page-break-lines ;; Major modes - apel flim semi wanderlust + ;;apel flim semi wanderlust graphviz-dot-mode markdown-mode nginx-mode @@ -135,7 +136,7 @@ "Use spaces for alignment" (let ((indent-tabs-mode nil)) (apply orig-fun args))) -(advice-add 'align-regexp :around #'align-regexp--use-spaces) +;(advice-add 'align-regexp :around #'align-regexp--use-spaces) (defun sh-smie-sh-rules--fix (args) "Replace :after \"then\" with :after \"if\" because Emacs 24 @@ -143,7 +144,7 @@ sh-script.el is broken." (if (equal args (list :after "then")) (list :after "if") args)) -(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix) +;(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix) (require 'go-mode-load nil t) diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh index 2e0b42c..07cea90 100644 --- a/.config/login.d/01_xdg.sh +++ b/.config/login.d/01_xdg.sh @@ -20,16 +20,15 @@ fi 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" - readonly XDG_RUNTIME_DIR # 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_CACHE_HOME" ]]; then - local tmp="$(mktemp --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" + 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" + exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" fi if flock -sn 7; then trap _diy_xdg_runtime_logout EXIT |