dotfiles

dotfiles - ryukamish edition
Log | Files | Refs | README

commit 33945f84c8362ee0ad7044b9d6f59fb42274594e
parent a056431f0898ff14df45982b0d7dcbec9ce0337e
Author: ryukamish <[email protected]>
Date:   Wed, 10 Jun 2026 22:23:57 +0530

add: juice for zsh shell

Diffstat:
M.zshrc | 105++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 83 insertions(+), 22 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -6,42 +6,103 @@ export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" export XDG_DOWNLOAD_DIR="${HOME}/downloads" +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_CACHE_HOME="${HOME}/.cache" +export XDG_DATA_HOME="${HOME}/.local/share" +export XDG_DESKTOP_DIR="${HOME}/desktop" +export XDG_TEMPLATES_DIR="${HOME}/temp" +export XDG_PUBLICSHARE_DIR="${HOME}/public" +export XDG_DOCUMENTS_DIR="${HOME}/documents" +export XDG_MUSIC_DIR="${HOME}/music" +export XDG_PICTURES_DIR="${HOME}/pictures" +export XDG_VIDEOS_DIR="${HOME}/videos" export EDITOR="nvim" -export PATH="${PATH}:${HOME}/.local/bin" -export PATH="${PATH}:${HOME}/.cargo/bin" -export ZDOTDIR="${ZDOTDIR:-$HOME/.config/zsh}" - -export QT_QPA_PLATFORM="wayland-egl" -export QT_QPA_PLATFORMTHEME="qt5ct" -export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" - -# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -# ┃ General ┃ -# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ - export HISTFILE="${HOME}/.zsh_history" export HISTCONTROL="ignoredups:ignorespace" export HISTSIZE="100000" export HISTFILESIZE="200000" export SAVEHIST="${HISTSIZE}" -setopt HIST_IGNORE_ALL_DUPS -setopt HIST_IGNORE_SPACE -setopt EXTENDED_HISTORY -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_IGNORE_DUPS -setopt HIST_VERIFY -setopt SHARE_HISTORY -export TERM="xterm-256color" -export COLUMNS="80" +# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +# ┃ Functions ┃ +# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +# === Media === +function video-to-gif() { + fps="$3" + if [[ "$3" == "" ]]; + then + fps="10" + fi + + ffmpeg \ + -i "$1" \ + -filter_complex \ + $(printf "%s%s%s%s" \ + "[0:v]setpts=0.5*PTS,fps=" \ + $fps \ + ",scale=800:-1:flags=lanczos,split[s0][s1];" \ + "[s0]palettegen[p];[s1][p]paletteuse") \ + -filter:a 'atempo=1,atempo=1' \ + -loop 0 \ + "$2" +} + +function cut() { + start_time="$1" + 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" + 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" + fi +} + +# make an executable file w/ one line +function tx(){ + file="$1" + if [ -f "$file" ]; then + echo "$file already exists. Making it executable." + chmod +x "$file" + else + touch "$file" && chmod +x "$file" + fi +} + +# Waydroid +function droid(){ + case "$1" in + stop) + waydroid session stop + ;; + restart) + waydroid session stop \ + && waydroid session start & + ;; + *) + printf "Usage: %s {start|stop}\n" "$0" + exit 1 + esac +} # ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃ ZSH Plugins ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ -ZSH_CUSTOM="$ZDOTDIR/plugins" + +ZSH_CUSTOM="$HOME/.config/zsh/plugins" plugins=( zsh-autosuggestions