dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit a4919aeb26053b7c7f625238c538ab6069ac6b94
parent 8050a4909f388b1b47d101444d12096594af4e88
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri,  5 Jan 2018 19:27:55 -0500

Minor logic and compatibility corrections

Diffstat:
M.bashrc | 5-----
M.config/cron/photosync.sh | 6+++---
M.config/cron/vdirsyncer.sh | 6+++---
M.lessfilter | 2+-
M.newsboat/bookmark-pinboard.sh | 2+-
M.profile | 8++++----
M.shrc | 15++++++++++-----
7 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -43,8 +43,3 @@ if [[ "$OSTYPE" == "darwin"* ]] then alias jackd="jackd -d coreaudio > /dev/null 2>&1 &" fi - -if command -v archey3 > /dev/null 2>&1 && [ -z "$TMUX" ] -then - archey3 -fi diff --git a/.config/cron/photosync.sh b/.config/cron/photosync.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/bin/sh -echo "Beginning photo sync at $(date)" +echo "Beginning photo sync at `date`" # Only do the following if nextcloud.danielmoch.com is reachable if ping -c 1 nextcloud.danielmoch.com > /dev/null 2>&1 @@ -30,4 +30,4 @@ else exit -2 fi -echo "Completed photo sync at $(date)" +echo "Completed photo sync at `date`" diff --git a/.config/cron/vdirsyncer.sh b/.config/cron/vdirsyncer.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash -echo "Beginning sync on $(date)" +#!/bin/sh +echo "Beginning sync on `date`" vdirsyncer sync -echo "Completed sync on $(date)" +echo "Completed sync on `date`" diff --git a/.lessfilter b/.lessfilter @@ -41,7 +41,7 @@ else if [ "$?" -eq "0" ]; then __pygmentize "$1" "sh" else - exit 1 + fail=1 fi esac fi diff --git a/.newsboat/bookmark-pinboard.sh b/.newsboat/bookmark-pinboard.sh @@ -4,7 +4,7 @@ # documentation: https://pinboard.in/api username="djmoch" -password="$(secret-tool lookup account djmoch service in.pinboard)" +password="`secret-tool lookup account djmoch service in.pinboard`" # You can enter up to 100 tags here, space delimited, or leave blank for no tag tags="via:newsbeuter" diff --git a/.profile b/.profile @@ -8,7 +8,7 @@ then ENV="$HOME/.shrc"; export ENV fi -if which vim > /dev/null 2>&1 +if type -p vim > /dev/null 2>&1 then EDITOR=vim else @@ -20,12 +20,12 @@ PAGER=less LESS="-FMRqX#10" export EDITOR VISUAL PAGER LESS -if which lesskey > /dev/null 2>&1 && [ -r "$HOME/.lesskey" ] +if type -p lesskey > /dev/null 2>&1 && [ -r "$HOME/.lesskey" ] then [ -r "$HOME/.less" ] || lesskey fi -if which lesspipe > /dev/null 2>&1 +if type -p lesspipe > /dev/null 2>&1 then eval `lesspipe` else @@ -34,7 +34,7 @@ else fi # Keep the go folder hidden -if which go > /dev/null 2>&1 +if type -p go > /dev/null 2>&1 then GOPATH="$HOME/.go" export GOPATH diff --git a/.shrc b/.shrc @@ -17,7 +17,7 @@ fi export PS1 # Turn on ls colors -if which dircolors > /dev/null 2>&1 +if type -p dircolors > /dev/null 2>&1 then if [ -n "$SOURCE_DIRCOLORS" ] then @@ -35,14 +35,14 @@ fi COLORIZE_CMDS="pacman grep egrep fgrep" for cmd in $COLORIZE_CMDS do - if which $cmd > /dev/null 2>&1 + if type -p $cmd > /dev/null 2>&1 then alias $cmd="$cmd --color=auto" fi done # Handy Tmux aliases -if which tmux > /dev/null 2>&1 +if type -p tmux > /dev/null 2>&1 then alias tas=tmux\ attach-session\ -t alias tns=tmux\ new-session\ -s @@ -52,14 +52,14 @@ fi alias export="export -p" # Configure GPG and start the agent if it isn't already running -if which gpg-connect-agent > /dev/null 2>&1 +if type -p gpg-connect-agent > /dev/null 2>&1 then export GPG_TTY=`tty` gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1 # Configure GPG as an SSH key provider # Assume SSH agent is forwarded if we're in an SSH session - if [ -z "$SSH_TTY" ] && which gpgconf > /dev/null 2>&1 + if [ -z "$SSH_TTY" ] && type -p gpgconf > /dev/null 2>&1 then unset SSH_AGENT_PID if [ "`gpgconf --list-dirs agent-ssh-socket | wc -l`" -eq 1 ] @@ -73,3 +73,8 @@ if [ "$VISUAL" == "vi" ] then alias vim=vi fi + +if type -p fortune > /dev/null 2>&1 && [ "$SHLVL" -le 1 -o \( -n "$DISPLAY" -a "$SHLVL" -le 2 \) ] +then + fortune +fi