From 89b0bf196d73a8ee53a4d608d95c470fcdae2ca8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 3 Apr 2014 22:51:16 -0400 Subject: Add changes from the Purdue branch --- .config/X11/clientrc | 1 - .config/bash/rc.sh | 5 +++-- .config/irbrc | 3 ++- .config/login.sh | 18 +++++++++--------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.config/X11/clientrc b/.config/X11/clientrc index d1e1725..c261324 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -23,5 +23,4 @@ fi # exec startkde # exec startxfce4 # ...or the Window Manager of your choice -#export WMII_CONFPATH="$XDG_CONFIG_HOME/wmii" exec wmii diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index 2bf60bc..ab690cf 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -13,7 +13,8 @@ shopt -s checkhash ################################################################################ # History settings -HISTCONTROL=ignoredups +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups HISTFILE=${XDG_CACHE_HOME}/bash/history HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' HISTSIZE=5000 @@ -66,7 +67,7 @@ unset make_prompt ################################################################################ -# Load my alaises +# Load my aliases if [[ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]]; then . ${XDG_CONFIG_HOME}/bash/aliases.sh fi diff --git a/.config/irbrc b/.config/irbrc index 27cce66..cda5ada 100644 --- a/.config/irbrc +++ b/.config/irbrc @@ -1,4 +1,5 @@ +# -*- mode: Ruby -*- require 'rubygems' unless defined? Gem # only needed in 1.8 require 'irb/ext/save-history' IRB.conf[:SAVE_HISTORY] = 5000 -IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history" \ No newline at end of file +IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history" diff --git a/.config/login.sh b/.config/login.sh index 2687a8e..1fd9505 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -1,6 +1,7 @@ #!/bin/bash # ~/.profile: executed by the command interpreter for login shells. -# Should be whether logging in graphically or not. +# I like that graphical login scripts be configured to load this, so +# it always runs, graphical or not. # # This file should be executable by /bin/sh, but I'm going to assume bash(1) # @@ -27,6 +28,7 @@ export TMPDIR="$HOME/tmp" # XDG ################################################################ . "$HOME/.local/lib/xdg.sh" +mkdir -p -- "$XDG_RUNTIME_DIR/sessions" ln -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions # Settings ########################################################### @@ -50,15 +52,14 @@ if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi -if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then +if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && type gpg-agent &>/dev/null; then echo 'login: Starting gpg-agent' - mkdir -p "${XDG_RUNTIME_DIR}/sessions" - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null + gpg-agent --daemon --write-env-file ~/.sessions/gpg >/dev/null fi -if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then +if [[ -f ~/.sessions/gpg ]]; then echo 'login: Setting gpg-agent info:' - cat "${XDG_RUNTIME_DIR}/sessions/gpg" - . "${XDG_RUNTIME_DIR}/sessions/gpg" + cat ~/.sessions/gpg + . ~/.sessions/gpg export GPG_AGENT_INFO #export SSH_AUTH_SOCK fi @@ -76,8 +77,7 @@ export _JAVA_OPTIONS # X11 if [[ -z $XAUTHORITY ]]; then #export XAUTHORITY="$HOME/.Xauthority" - mkdir -p "${XDG_RUNTIME_DIR}/sessions" - export XAUTHORITY="${XDG_RUNTIME_DIR}/sessions/Xauthority" + export XAUTHORITY=$HOME/.sessions/Xauthority fi # D-Bus -- cgit v1.1-4-g5e80 From c3a6b5911e6d7b5a0e7520d6961fb106a628001d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Apr 2014 13:12:14 -0400 Subject: move the daemon stuff to use a systemd user instance --- .config/login.sh | 6 +----- .config/systemd/user/default.target.wants/batterymon.service | 9 +++++++++ .config/systemd/user/default.target.wants/emacs-daemon.service | 9 +++++++++ .config/systemd/user/default.target.wants/gpg-agent.service | 9 +++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .config/systemd/user/default.target.wants/batterymon.service create mode 100644 .config/systemd/user/default.target.wants/emacs-daemon.service create mode 100644 .config/systemd/user/default.target.wants/gpg-agent.service diff --git a/.config/login.sh b/.config/login.sh index 1fd9505..3c29c99 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -29,7 +29,7 @@ export TMPDIR="$HOME/tmp" . "$HOME/.local/lib/xdg.sh" mkdir -p -- "$XDG_RUNTIME_DIR/sessions" -ln -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions +ln -sfT -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions # Settings ########################################################### @@ -52,10 +52,6 @@ if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi -if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && type gpg-agent &>/dev/null; then - echo 'login: Starting gpg-agent' - gpg-agent --daemon --write-env-file ~/.sessions/gpg >/dev/null -fi if [[ -f ~/.sessions/gpg ]]; then echo 'login: Setting gpg-agent info:' cat ~/.sessions/gpg diff --git a/.config/systemd/user/default.target.wants/batterymon.service b/.config/systemd/user/default.target.wants/batterymon.service new file mode 100644 index 0000000..c8abc0d --- /dev/null +++ b/.config/systemd/user/default.target.wants/batterymon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Battery monitor + +[Service] +Type=simple +ExecStart=/usr/bin/batterymon 20 "amixer sset Master unmute 100%; espeak 'PLUG ME IN'; sleep 7;" + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service new file mode 100644 index 0000000..ef8f65f --- /dev/null +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Emacs deamon + +[Service] +Type=forking +ExecStart=/bin/bash -l -c 'emacs --daemon' + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service new file mode 100644 index 0000000..a9de9b2 --- /dev/null +++ b/.config/systemd/user/default.target.wants/gpg-agent.service @@ -0,0 +1,9 @@ +[Unit] +Description="GnuPG agent daemon" + +[Service] +Type=forking +ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${HOME}/.sessions/gpg + +[Install] +WantedBy=default.target -- cgit v1.1-4-g5e80 From 3749ee128fecdcc218effbbb88ddd02c2ff8b7a7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Apr 2014 13:12:41 -0400 Subject: fix X11/clientrc's xinitrc.d loading --- .config/X11/clientrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/X11/clientrc b/.config/X11/clientrc index c261324..e9a8215 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -8,7 +8,7 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then echo ' ==> Running scripts in Entering xinitrc.d/*' for f in /etc/X11/xinit/xinitrc.d/*; do echo " -> $f" - [ -x "$f" ] && "$f" & + [ -x "$f" ] && . "$f" done unset f echo ' -> done' -- cgit v1.1-4-g5e80 From b4007df2243cb0a2a7c9c0d6533be36b7de4305c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Apr 2014 13:13:02 -0400 Subject: X11/clientrc: dissable xinitrc.d --- .config/X11/clientrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/X11/clientrc b/.config/X11/clientrc index e9a8215..26455d3 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -4,7 +4,7 @@ # # Executed by startx (run your window manager from here) -if [ -d /etc/X11/xinit/xinitrc.d ]; then +if false && [ -d /etc/X11/xinit/xinitrc.d ]; then echo ' ==> Running scripts in Entering xinitrc.d/*' for f in /etc/X11/xinit/xinitrc.d/*; do echo " -> $f" -- cgit v1.1-4-g5e80 From 9d06c1f66cfba869204f64fc4be72fe5f36e3df1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Apr 2014 13:13:59 -0400 Subject: use cronic for cron/make-config --- .config/cron/make-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/cron/make-config b/.config/cron/make-config index 448475b..6e0fca9 100644 --- a/.config/cron/make-config +++ b/.config/cron/make-config @@ -1,2 +1,2 @@ # m h dom mon dow command -*/5 * * * * . $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME +*/5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME' -- cgit v1.1-4-g5e80 From 7000ec189d6aecca3cbee5c68fe877f11cf0784e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 16 Apr 2014 10:40:04 -0400 Subject: remove obsolete call to `make` from bash/logout.sh --- .config/bash/logout.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/bash/logout.sh b/.config/bash/logout.sh index a8b88c1..de4f5f7 100644 --- a/.config/bash/logout.sh +++ b/.config/bash/logout.sh @@ -5,5 +5,3 @@ if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q fi - -make -C "$HOME" -- cgit v1.1-4-g5e80