diff --git a/.bin/brave-launcher b/.bin/brave-launcher index b91bfd1..748e2c2 100755 --- a/.bin/brave-launcher +++ b/.bin/brave-launcher @@ -3,7 +3,7 @@ XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" BRAVE_USER_FLAGS_FILE="$XDG_CONFIG_HOME/brave-flags.conf" if [[ -f $BRAVE_USER_FLAGS_FILE ]]; then - USER_FLAGS="$(cat $BRAVE_USER_FLAGS_FILE | sed 's/#.*//')" + USER_FLAGS="$(sed 's/#.*//' < "$BRAVE_USER_FLAGS_FILE")" fi -/usr/bin/brave $@ $USER_FLAGS +/usr/bin/brave "$@" "$USER_FLAGS" diff --git a/.bin/save-vimwiki b/.bin/save-vimwiki index 8fea0f5..8d2d211 100755 --- a/.bin/save-vimwiki +++ b/.bin/save-vimwiki @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cd $HOME/.vimwiki -git a $HOME/.vimwiki -git cm 'Update' +cd "$HOME/.vimwiki" || echo "No .vimwiki directory found" +git a "$HOME/.vimwiki" +git cm 'Update' git push diff --git a/.bin/tidalcycles b/.bin/tidalcycles index 7db6d3d..615c700 100755 --- a/.bin/tidalcycles +++ b/.bin/tidalcycles @@ -11,14 +11,14 @@ SESSION=${SESSION:-"tidal"} TIDAL_BOOT_PATH=${TIDAL_BOOT_PATH:-""} GHCI=${GHCI:-""} -args=${@:-$FILE} +args=${*:-$FILE} # attach if session else create -$TMUX attach-session -t $SESSION || $TMUX new-session -s $SESSION \; \ - split-window -h -t $SESSION \; \ +$TMUX attach-session -t "$SESSION" || $TMUX new-session -s "$SESSION" \; \ + split-window -h -t "$SESSION" \; \ send-keys -t 0 "$VIM $args" C-m \; \ send-keys -t 1 "TIDAL_BOOT_PATH=$TIDAL_BOOT_PATH GHCI=$GHCI tidal" C-m \; \ - new-window -t $SESSION:2 -n SuperDirt \; \ + new-window -t "$SESSION":2 -n SuperDirt \; \ send-keys -t 0 "cadence-session-start -s && sclang ~/dev/live/tidal/superdirt_startup.scd" C-m \; \ select-window -t 1 \; \ resize-pane -t 1 -x 100 \; \