diff options
| -rw-r--r-- | .zshrc | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -17,6 +17,8 @@ export XDG_MUSIC_DIR="${HOME}/music" export XDG_PICTURES_DIR="${HOME}/pictures" export XDG_VIDEOS_DIR="${HOME}/videos" +export PATH="$PATH:$HOME/.cargo/bin" + export EDITOR="nvim" export HISTFILE="${HOME}/.zsh_history" @@ -55,24 +57,23 @@ function cut() { end_time="$2" input_file="$3" - usage=$(printf "Usage: %s <start> <end> <input file>\n" "$0") - if [[ "$end_time" == "" ]]; then ffmpeg -ss "$start_time" \ -i "$input_file" \ -c copy "$(date +"%Y%m%d_%H%M ")$input_file" \ - || "$usage" + || printf "Usage: %s <start> <end> <input file>\n" "$0" elif [[ "$end_time" != "" ]]; then ffmpeg -ss "$start_time" -to "$end_time" \ -i "$input_file" \ -c copy "$(date +"%Y%m%d_%H%M ")$input_file" \ - || "$usage" + || printf "Usage: %s <start> <end> <input file>\n" "$0" fi } # make an executable file w/ one line function tx(){ file="$1" + [[ "$file" == "" ]] && echo -e "Usage: $0 <file name>\n" if [ -f "$file" ]; then echo "$file already exists. Making it executable." chmod +x "$file" @@ -88,8 +89,12 @@ function droid(){ waydroid session stop ;; restart) - waydroid session stop \ - && waydroid session start & + if [ pgrep -a waydroid != "" ]; then + waydroid session stop + setsid -f waydroid session start + else + setsid -f waydroid session start + fi ;; *) printf "Usage: %s {start|stop}\n" "$0" @@ -138,6 +143,11 @@ bindkey '^[[B' history-beginning-search-forward # Down arrow: search history bindkey '^[[1;3C' forward-word # Alt + Right bindkey '^[[1;3D' backward-word # Alt + Left +# cd into a directory with fzf +source <(fzf --zsh) + +bindkey -s '^F' '~/.local/bin/tmux-sessionizer\n' + # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ Alias ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ |
