From 34a6c23f99988a75729b04880824b8d79d1391a2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 10 Oct 2012 01:20:24 -0400 Subject: Use XDG for bash, remove alsa, clean up bash & profile, add CACHEDIR.TAG .profile: fix up --- .bash.d/emacs.sh | 8 --- .bash_aliases | 66 ------------------------- .bash_login | 1 + .bash_logout | 10 +--- .bashrc | 121 +-------------------------------------------- .config/bash/aliases.sh | 59 ++++++++++++++++++++++ .config/bash/login.sh | 9 ++++ .config/bash/logout.sh | 9 ++++ .config/bash/rc.d/emacs.sh | 8 +++ .config/bash/rc.sh | 80 ++++++++++++++++++++++++++++++ .git.info.exclude | 107 --------------------------------------- .git.info.exclude.in | 108 ++++++++++++++++++++++++++++++++++++++++ .login-daemons | 10 ---- .profile | 74 ++++++++++++++------------- Makefile | 9 ++-- 15 files changed, 319 insertions(+), 360 deletions(-) delete mode 100644 .bash.d/emacs.sh delete mode 100644 .bash_aliases create mode 120000 .bash_login mode change 100644 => 120000 .bash_logout mode change 100644 => 120000 .bashrc create mode 100644 .config/bash/aliases.sh create mode 100644 .config/bash/login.sh create mode 100644 .config/bash/logout.sh create mode 100644 .config/bash/rc.d/emacs.sh create mode 100644 .config/bash/rc.sh delete mode 100644 .git.info.exclude create mode 100644 .git.info.exclude.in delete mode 100644 .login-daemons diff --git a/.bash.d/emacs.sh b/.bash.d/emacs.sh deleted file mode 100644 index f484bbb..0000000 --- a/.bash.d/emacs.sh +++ /dev/null @@ -1,8 +0,0 @@ -case "$TERM" in - eterm*) - SELECTED_EDITOR='emacsclient' - EDITOR=$SELECTED_EDITOR - VISUAL=$SELECTED_EDITOR - export SELECTED_EDITOR EDITOR VISUAL - :;; -esac diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index de1a321..0000000 --- a/.bash_aliases +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# The above line probably should never be *used* in this file, but it -# lets text editors know that this is BASH syntax. - -###################################################################### -# Set up colors and settings for ls/dir/vdir # -###################################################################### -if [ -x "`which dircolors`" ]; then - eval "`dircolors -b`" - alias ls='ls -1v --color=auto' - alias dir='dir -v --color=auto' - alias vdir='vdir -v--color=auto' - - for xgrep in ${PATH//:/\/*grep }/*grep; do - if [ -f "$xgrep" ]; then - xgrep=`basename "$xgrep"` - if [ "$xgrep" != pgrep ]; then - alias $xgrep="$xgrep --color=auto" - fi - fi - done -else - alias ls='ls -1v' - alias dir='dir -v' - alias vdir='vdir -v' -fi - -###################################################################### -# Set up the standard aliases for ls # -###################################################################### -alias ll='ls -l' -alias la='ls -a' -alias l='ls -CF' - -###################################################################### -# Some preferences for miscellaneous stuff # -###################################################################### -#alias rm='gvfs-trash' -alias ssh='ssh -XC' -alias sed='sed --follow-symlinks' -alias tree='tree --charset utf8' -alias cd=pushd -alias gitk='gitk --all --date-order' - -###################################################################### -# Remember lat/long for redshift # -###################################################################### -redshift='redshift -l39.9030:85.9979' -alias gtk-redshift="gtk-$redshift" -alias redshift="$redshift" - -###################################################################### -# Some almost-function aliases # -###################################################################### -#alias serva='ssh luke@servb.ath.cx -p3440' -#alias phpdoctor='php /usr/gnu/www/0-other/phpdoctor-head/phpdoc.php' -function xterm-title () { echo "];$@"; } # Oh, wait this one *is* a function -alias lock="clear; away -C 'This terminal is locked'" -alias plock="xterm-title Terminal Locked;lock" - -###################################################################### -# Other # -###################################################################### -case "$TERM" in - eterm*) alias editor='editor -n';; -esac diff --git a/.bash_login b/.bash_login new file mode 120000 index 0000000..31231da --- /dev/null +++ b/.bash_login @@ -0,0 +1 @@ +.config/bash/login.sh \ No newline at end of file diff --git a/.bash_logout b/.bash_logout deleted file mode 100644 index a8b88c1..0000000 --- a/.bash_logout +++ /dev/null @@ -1,9 +0,0 @@ -# ~/.bash_logout: executed 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 - -make -C "$HOME" diff --git a/.bash_logout b/.bash_logout new file mode 120000 index 0000000..d8117ff --- /dev/null +++ b/.bash_logout @@ -0,0 +1 @@ +.config/bash/logout.sh \ No newline at end of file diff --git a/.bashrc b/.bashrc deleted file mode 100644 index ff11c5b..0000000 --- a/.bashrc +++ /dev/null @@ -1,120 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# I include this file for all interactive invocations of bash(1), whether -# they are login shells or not. - -# If not running interactively, don't do anything -[ -z "$PS1" ] && return - -# don't put duplicate lines in the history. See bash(1) for more options -# don't overwrite GNU Midnight Commander's setting of `ignorespace'. -export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups -# ... or force ignoredups and ignorespace -export HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# Let ** recursively scan directories -shopt -s globstar - -# Why is this not on by default? -# "We have a cached value, but it isn't valid anymore. Should we trash it?" -shopt -s checkhash - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -case "$TERM" in - xterm) export TERM=xterm-256color;; -esac - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - linux) color_prompt=yes;; - *-*color*) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# Include modular config files -if [ -d ~/.bash.d ]; then - for file in ~/.bash.d/*.sh; do - . $file; - done -fi - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - -if [ -f "$HOME/.login-daemons" ]; then - . "$HOME/.login-daemons" -fi - -if [ -f "${HOME}/.gnupg/agent-info" ]; then - . "${HOME}/.gnupg/agent-info" - export GPG_AGENT_INFO - #export SSH_AUTH_SOCK -fi - -export PERL_LOCAL_LIB_ROOT="/home/luke/perl5"; -export PERL_MB_OPT="--install_base /home/luke/perl5"; -export PERL_MM_OPT="INSTALL_BASE=/home/luke/perl5"; -export PERL5LIB="/home/luke/perl5/lib/perl5/i686-linux-thread-multi:/home/luke/perl5/lib/perl5"; -export PATH="/home/luke/perl5/bin:$PATH"; diff --git a/.bashrc b/.bashrc new file mode 120000 index 0000000..18faac1 --- /dev/null +++ b/.bashrc @@ -0,0 +1 @@ +.config/bash/rc.sh \ No newline at end of file diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh new file mode 100644 index 0000000..8241b95 --- /dev/null +++ b/.config/bash/aliases.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# The above line probably should never be *used* in this file, but it +# lets text editors know that this is BASH syntax. + +###################################################################### +# Set up colors and settings for ls/dir/vdir # +###################################################################### +if [ -x "`which dircolors`" ]; then + eval "`dircolors -b`" + alias ls='ls -1v --color=auto' + alias dir='dir -v --color=auto' + alias vdir='vdir -v--color=auto' + + for xgrep in ${PATH//:/\/*grep }/*grep; do + if [ -f "$xgrep" ]; then + xgrep=`basename "$xgrep"` + if [ "$xgrep" != pgrep ]; then + alias $xgrep="$xgrep --color=auto" + fi + fi + done +else + alias ls='ls -1v' + alias dir='dir -v' + alias vdir='vdir -v' +fi + +###################################################################### +# Set up the standard aliases for ls # +###################################################################### +alias ll='ls -l' +alias la='ls -a' +alias l='ls -CF' + +###################################################################### +# Some preferences for miscellaneous stuff # +###################################################################### +#alias rm='gvfs-trash' +alias ssh='ssh -XC' +alias sed='sed --follow-symlinks' +alias tree='tree --charset utf8' +alias cd=pushd +alias gitk='gitk --all --date-order' + +###################################################################### +# Remember lat/long for redshift # +###################################################################### +redshift='redshift -l39.9030:85.9979' +alias gtk-redshift="gtk-$redshift" +alias redshift="$redshift" +unset redshift + +###################################################################### +# Some almost-function aliases # +###################################################################### +xterm-title() { echo "];$@"; } # Oh, wait this one *is* a function +alias lock="clear; away -C 'This terminal is locked'" +alias plock="xterm-title Terminal Locked;lock" +mvln() { mv $1 $2; ln -s $2 $1; } diff --git a/.config/bash/login.sh b/.config/bash/login.sh new file mode 100644 index 0000000..1269a03 --- /dev/null +++ b/.config/bash/login.sh @@ -0,0 +1,9 @@ +# ~/.bash_login: executed by bash(1) when login shell starts. + +# I think this is sane default behavior + +# Load user settings +. "$HOME/.profile" + +# Load bash settings (automatic for non-login shells) +. "$HOME/.bashrc" diff --git a/.config/bash/logout.sh b/.config/bash/logout.sh new file mode 100644 index 0000000..a8b88c1 --- /dev/null +++ b/.config/bash/logout.sh @@ -0,0 +1,9 @@ +# ~/.bash_logout: executed 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 + +make -C "$HOME" diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh new file mode 100644 index 0000000..f484bbb --- /dev/null +++ b/.config/bash/rc.d/emacs.sh @@ -0,0 +1,8 @@ +case "$TERM" in + eterm*) + SELECTED_EDITOR='emacsclient' + EDITOR=$SELECTED_EDITOR + VISUAL=$SELECTED_EDITOR + export SELECTED_EDITOR EDITOR VISUAL + :;; +esac diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh new file mode 100644 index 0000000..ed55f75 --- /dev/null +++ b/.config/bash/rc.sh @@ -0,0 +1,80 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# I include this file for all interactive invocations of bash(1), whether +# they are login shells or not. + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +export HISTCONTROL=ignoredups +export HISTFILE=${XDG_CACHE_HOME}/bash/history +export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' +shopt -s histappend # append to the history file, don't overwrite it + +shopt -s checkwinsize # update the values of LINES and COLUMNS +shopt -s globstar # Let ** recursively scan directories + +# Why is this not on by default? +# "We have a cached value, but it isn't valid anymore. Should we trash it?" +shopt -s checkhash + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x "`which lesspipe 2>/dev/null`" ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +make_prompt() { + local RESET='' + local BOLD='' + local GREEN='' + local BLUE='' + if $1; then + RESET="$(tput sgr0)" + BOLD="$(tput bold)" + GREEN="$(tput setaf 2)" + BLUE="$(tput setaf 4)" + fi + local CHROOT='${debian_chroot:+($debian_chroot)}' + echo "${RESET}${BOLD}${CHROOT}${GREEN}"'\u@\h'"${RESET}:${BOLD}${BLUE}"'\w'"${RESET}" +} + +if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + PS1="$(make_prompt true )"'\n\$ ' +else + PS1="$(make_prompt false)"'\n\$ ' +fi + +# If this is an xterm set the title to user@host:dir +case "$TERM" in + xterm*|rxvt*) + PS1="\[\e]0;$(make_prompt false)\a\]$PS1";; +esac + +unset make_prompt + +# Include modular config files +if [ -d "${XDG_CONFIG_HOME}/rc.d" ]; then + for file in "${XDG_CONFIG_HOME}/rc.d"/*.sh; do + . "$file" + done +fi + +if [ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]; then + . ${XDG_CONFIG_HOME}/bash/aliases.sh +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi diff --git a/.git.info.exclude b/.git.info.exclude deleted file mode 100644 index 871ebf6..0000000 --- a/.git.info.exclude +++ /dev/null @@ -1,107 +0,0 @@ -# Defualt to ignoring all files -/* - -# Except dotfiles -!.* - -# Or Makefile -!Makefile - -# Ignore these for privacy -.ssh/* -!.ssh/config -.gnupg/* -!.gnupg/gpg.conf -.netrc - -# Ignore temp/log/history files -*.log -log* - -*.tmp -*.tmp.* -tmp.* -tmp-* -tmp - -*_history -*_hist -history.* -history - -*.lock -.~lock.*# -lock - -*.state -*.cookie -*.bak - -*authority -*cache* - -# Ignore files left by editors -*~ -.#* -\#*# - - -# Ignore these special-purpose cache/temp files -.camel_certs -.compiz/session/* -.config/chromium/Default/History\ Index* -.current.asound -.dbus/session-bus/* -.ddd/sessions -.dvdcss -.esd_auth -.evolution/.* -.gconfd/saved_state -.gnash-media -.gnash/SharedObjects/* -.kde/share/apps/RecentDocuments/* -.kde/socket-* -.kde4/share/apps/RecentDocuments/* -.kde4/share/apps/okular/docdata/* -.kde4/socket-* -.lesshst -.link*/*.his -.local/share/Trash/* -.local/share/gvfs-metadata/* -.local/share/icons/* -.local/share/recently-used.xbel -.pki -.pulse -.pulse-cookie -.recently-used -.recently-used.xbel* -.setroubleshoot -.shotwell/thumbs/* -.sudo_as_admin_successful -.thumbnails/* -.wireshark/recent* -.xsession-errors* - -# Ignore files that are autogenerated -.folders -.nanorc -.config/libretools/blacklist.txt - -# Ignore these files for no good reason -.bogofilter -.config/Trolltech.conf -.config/vlc -.gem -.offlineimap -.prefix -.prefix.* -.terminfo -.wine* - -# Ignore these files that if I tracked them, would be a separate repo -.config/chromium -.config/libreoffice -.config/transmission -.eclipse -.mozilla -.netbeans diff --git a/.git.info.exclude.in b/.git.info.exclude.in new file mode 100644 index 0000000..37c1ee4 --- /dev/null +++ b/.git.info.exclude.in @@ -0,0 +1,108 @@ +# Defualt to ignoring all files +/* + +# Except dotfiles +!.* + +# Or Makefile +!Makefile + +# Ignore these for privacy +.ssh/* +!.ssh/config +.gnupg/* +!.gnupg/gpg.conf +.netrc + +# Ignore temp/log/history files +*.log +log.* + +*.tmp +*.tmp.* +tmp.* +tmp-* +tmp + +*_history +*_hist +history.* +history + +*.lock +.~lock.*# +lock + +*.state +*.cookie +*.bak + +*authority +*cache* + +# Ignore files left by editors +*~ +.#* +\#*# + + +# Ignore these special-purpose cache/temp files +.camel_certs +.compiz/session/* +.config/chromium/Default/History\ Index* +.current.asound +.dbus/session-bus/* +.ddd/sessions +.dvdcss +.esd_auth +.evolution/.* +.gconfd/saved_state +.gnash-media +.gnash/SharedObjects/* +.kde/share/apps/RecentDocuments/* +.kde/socket-* +.kde4/share/apps/RecentDocuments/* +.kde4/share/apps/okular/docdata/* +.kde4/socket-* +.lesshst +.link*/*.his +.local/share/Trash/* +.local/share/gvfs-metadata/* +.local/share/icons/* +.local/share/recently-used.xbel +.pki +.pulse +.pulse-cookie +.recently-used +.recently-used.xbel* +.setroubleshoot +.shotwell/thumbs/* +.sudo_as_admin_successful +.thumbnails/* +.wireshark/recent* +.xsession-errors* + +# Ignore files that are autogenerated +.config/libretools/blacklist.txt +.folders +.git.info.exclude +.nanorc + +# Ignore these files for no good reason +.bogofilter +.config/Trolltech.conf +.config/vlc +.gem +.offlineimap +.prefix +.prefix.* +.terminfo +.wine* + +# Ignore these files that if I tracked them, would be a separate repo +.config/chromium +.config/libreoffice +.config/transmission +.eclipse +.mozilla +.netbeans diff --git a/.login-daemons b/.login-daemons deleted file mode 100644 index bf8cf21..0000000 --- a/.login-daemons +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ -x "`which daemon`" ]; then - daemon maildirproc - daemon gpg-agent --daemon --write-env-file "${HOME}/.gnupg/agent-info" - daemon batterymon 20 " - alsactl restore --file $HOME/.full.asound; - espeak 'PLUG ME IN'; - sleep .2;" -fi diff --git a/.profile b/.profile index 2e2e1d0..a6c4d91 100644 --- a/.profile +++ b/.profile @@ -1,4 +1,8 @@ # ~/.profile: executed by the command interpreter for login shells. +# Should be whether logging in graphically or not. +# +# This file should be executable by /bin/sh, but I'm going to assume bash(1) +# # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. @@ -9,33 +13,44 @@ umask 022 ## Paths ############################################################# # Unix -bins=$(echo $HOME/bin $HOME/.local.`uname -m`/bin $HOME/.local/bin $HOME/.prefix.`uname -m`/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin) -for dir in $bins; do - if [ -d "$dir" ]; then - export PATH="$dir:$PATH" - fi +bins=($HOME/bin $HOME/.local.`uname -m`/bin $HOME/.local/bin $HOME/.prefix.`uname -m`/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin) +for dir in "${bins[@]}"; do + if [ -d "$dir" ]; then + export PATH="$dir:$PATH" + fi done # Ruby for dir in $HOME/.prefix/lib; do - if [ -d "$dir" ]; then - export RUBYLIB="$dir" - fi + if [ -d "$dir" ]; then + export RUBYLIB="$dir" + fi done # Settings ########################################################### # Text editor if [ -f "$HOME/.selected_editor" ]; then - . "$HOME/.selected_editor" - export SELECTED_EDITOR - export ALTERNATE_EDITOR - export EDITOR="${EDITOR:-$SELECTED_EDITOR}" - export VISUAL="${VISUAL:-$SELECTED_EDITOR}" + . "$HOME/.selected_editor" + export SELECTED_EDITOR + export ALTERNATE_EDITOR + export EDITOR="${EDITOR:-$SELECTED_EDITOR}" + export VISUAL="${VISUAL:-$SELECTED_EDITOR}" fi # GPG -export GPGKEY=D4FFBFC9 +if [ -z "$GPGKEY" ] && [ -f "${HOME}/.gnupg/gpg.conf" ]; then + export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` +fi +if [ -z "$(pgrep -u `whoami` gpg-agent)" ]; then + mkdir -p ${XDG_RUNTIME_DIR}/sessions/gpg + gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" +fi +if [ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]; then + . "${XDG_RUNTIME_DIR}/sessions/gpg" + export GPG_AGENT_INFO + #export SSH_AUTH_SOCK +fi # Java _JAVA_OPTIONS='' @@ -43,36 +58,27 @@ _JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on' _JAVA_OPTIONS+=' -Dswing.aatext=true' _JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' if [ -n "$TMPDIR" ]; then - _JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR" + _JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR" fi export _JAVA_OPTIONS -# ALSA -if [ -x "`which alsactl 2>/dev/null`" ]; then - alsactl restore "$HOME/.current.asound" &> /dev/null || true -fi - # X11 if [ -z "$XAUTHORITY" ]; then - export XAUTHORITY=$HOME/.Xauthority + export XAUTHORITY=$HOME/.Xauthority fi # D-Bus if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then - eval `dbus-launch` - export DBUS_SESSION_BUS_ADDRESS - export DBUS_SESSION_BUS_PID -fi + # I want a separate instance for each login + #dbus-launch > "${HOME}/.cache/sessions/dbus" + #. "${HOME}/.cache/sessions/dbus" + eval `dbus-launch` -# Start background programs ########################################## -if [ -f "$HOME/.login-daemons" ]; then - . "$HOME/.login-daemons" + export DBUS_SESSION_BUS_ADDRESS + export DBUS_SESSION_BUS_PID fi -# BASH ############################################################### -if [ -n "$BASH_VERSION" ]; then - # include .bashrc if it exists - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi +# Load any box-specific stuff +if [ -f "$HOME/.profile.local" ]; then + . "$HOME/.profile.local" fi diff --git a/Makefile b/Makefile index 3cecf33..160a64c 100644 --- a/Makefile +++ b/Makefile @@ -4,22 +4,19 @@ NANO_BIN_PREFIX = $(patsubst %/bin/nano,%,$(shell which nano)) NANO_CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:$(NANO_BIN_PREFIX) NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(NANO_CHECK))))) -ALSACTL=$(firstword $(shell . $(HOME)/.profile &>/dev/null; which alsactl) echo) - -targets=.nanorc .folders .crontab.cookie .current.asound +targets=.nanorc .folders .crontab.cookie .git.info.exclude all: $(targets) clean: rm -f $(targets) -%.asound: FORCE - $(ALSACTL) store --file '$@' - .nanorc: .nanorc.in $(NANO_SHARE) cat '$<' > '$@' for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@' .folders: Maildir ( echo '..'; find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' +.git.info.exclude: .git.info.exclude.in . + ( cat $<; find . -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ .crontab.cookie: .crontab .crontab.local -(cat $^; echo) | crontab - 2>/dev/null -- cgit v1.2.3