From 1b52ecaaa02695f0b6d5e437377e9da3d6101948 Mon Sep 17 00:00:00 2001 From: ryukamish Date: Wed, 17 Jun 2026 14:53:05 +0530 Subject: functions and paths addition --- .zshrc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index 9ad93ab..2173b19 100644 --- a/.zshrc +++ b/.zshrc @@ -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 \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 \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 \n" "$0" fi } # make an executable file w/ one line function tx(){ file="$1" + [[ "$file" == "" ]] && echo -e "Usage: $0 \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 ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ -- cgit v1.3