diff --git a/add.sh b/add.sh new file mode 100755 index 0000000..65a4eb6 --- /dev/null +++ b/add.sh @@ -0,0 +1,20 @@ +#!/bin/sh -e + +test -d files/ || { + >&2 echo "Not in dotfiles root" + exit 1 +} + +for arg in $@; do + arg="$(realpath "$arg")" + file="${arg#"$HOME"}" + + test "$arg" != "$file" || { + >&2 echo "$f is not in $HOME" + continue + } + + cp -v "$arg" "${arg}.bak" + mv -iv "$arg" "files/$file" + ln -vfs "files/$file" "$arg" +done diff --git a/files/.local/bin/journal b/files/.local/bin/journal index ec0adba..4c6940e 100755 --- a/files/.local/bin/journal +++ b/files/.local/bin/journal @@ -4,8 +4,8 @@ JOURNAL="$HOME/nfs/idk" tmp="$(mktemp /tmp/journal.XXXXXX)" d="$(date -I)" -grep "$d" "$JOURNAL" || printf "\n%s\n" "$d" > "$tmp" +grep "$d" "$JOURNAL" || printf "%s\n" "$d" > "$tmp" nvi "$tmp" -(cat "$tmp" | tee -a "$JOURNAL") && rm "$tmp" +(echo; cat "$tmp" | tee -a "$JOURNAL") && rm "$tmp" tail "$JOURNAL" diff --git a/files/.local/bin/yt-dlp_musllinux b/files/.local/bin/yt-dlp_musllinux new file mode 100755 index 0000000..291f302 Binary files /dev/null and b/files/.local/bin/yt-dlp_musllinux differ diff --git a/files/.zshrc b/files/.zshrc new file mode 100644 index 0000000..a67cbf7 --- /dev/null +++ b/files/.zshrc @@ -0,0 +1,19 @@ +# minimal usable .zshrc, 05feb2013 +leah+ +setopt emacs nobeep nonomatch shnullcmd extendedglob \ + bashautolist noautomenu noalwayslastprompt +autoload -Uz compinit && compinit +WORDCHARS='*?_-.[]~&;$%^+' +# prompt tweaks, 20jul2017 +leah+ +PS1='%B%m%(?.. %??)%(1j. %j&.)%b %2~%B%#%b ' +# minimal usable history, 12nov2015 +leah+ +setopt histignoredups histignorespace incappendhistory extendedhistory +SAVEHIST=9000 HISTSIZE=9000 HISTFILE=~/.zsh_history +# minimal functions, 08sep2017 +leah+ +g() { LC_ALL=C grep --exclude "*~" -r -P ${@:?regexp missing} } +l() { find ${2:-.} ! -type d | sed 's:^\./::' | egrep "$1" } +sprunge() { cat $@ | curl -sF 'sprunge=<-' http://sprunge.us } + +alias xi='xi -y' +alias xr='doas xbps-remove -y' + +printf 'BAT %s%%\n' "$(cat /sys/class/power_supply/BAT0/capacity)"