~jbauer/dotfiles

e726e554027f6acd8accf28ce5ac8b9ee7df2d64 — Jake Bauer 2 months ago 93ca46c
Add implementation of `watch` to .shrc
1 files changed, 4 insertions(+), 0 deletions(-)

M .config/shrc
M .config/shrc => .config/shrc +4 -0
@@ 26,3 26,7 @@ alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
alias config='git --git-dir="$HOME"/docs/proj/dotfiles --work-tree="$HOME"'
alias spawn='st > /dev/null 2>&1 &'
alias compose='setxkbmap -option compose:caps'

# Universal "watch" equivalent
# Invoke like "watch <seconds> <cmd>
watch() { interval="$1"; ([ -z "$interval" ] && shift;) || interval=1; while true; do clear; "$@"; sleep "$interval"; done; }