summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorryukamish <[email protected]>2026-06-17 14:53:05 +0530
committerryukamish <[email protected]>2026-06-17 14:53:05 +0530
commit1b52ecaaa02695f0b6d5e437377e9da3d6101948 (patch)
treecf612e0e556ae2bb0856acdb7cad1afa87a3e3f4 /.zshrc
parentd089fcfaddfc7d055fd330e2454c0206b92395d0 (diff)
functions and paths addition
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc22
1 files 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 <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 ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛