diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 777ee92a..873c02f0 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -25,7 +25,7 @@ export LESS_TERMCAP_se="$(printf '%b' '')" export LESS_TERMCAP_us="$(printf '%b' '')" export LESS_TERMCAP_ue="$(printf '%b' '')" export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null" -export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible +export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible export DOTS_PACKAGE="dots" # Color palette for console dialogs in tools such as nmtui and whiptail diff --git a/.config/zsh/configs/aliases b/.config/zsh/configs/aliases index 84fa8703..704f263d 100644 --- a/.config/zsh/configs/aliases +++ b/.config/zsh/configs/aliases @@ -2,51 +2,53 @@ # shellcheck disable=SC2142 # sudo not required for some system commands for command in mount umount xbps-install xbps-remove updatedb su shutdown poweroff reboot; do - # shellcheck disable=SC2139 - command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command" + # shellcheck disable=SC2139 + command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command" done unset command # Colorization alias \ - ls="ls --color=auto --group-directories-first" \ - grep="grep --color=auto" \ - diff="diff --color=auto" \ - ccat="highlight --out-format=ansi" \ - grep="grep --color=auto" \ - diff="diff --color=auto" \ - ip="ip -color=auto" + ls="ls --color=auto --group-directories-first" \ + grep="grep --color=auto" \ + diff="diff --color=auto" \ + ccat="highlight --out-format=ansi" \ + grep="grep --color=auto" \ + diff="diff --color=auto" \ + ip="ip -color=auto" # Common flags alias \ - vim="nvim" \ - cp="cp -iv" \ - mv="mv -iv" \ - rm="rm -vI" \ - bc="bc -ql" \ - mkd="mkdir -pv" \ - tldr="tldr -s" \ - ffmpeg="ffmpeg -hide_banner" \ - nvidia-settings="nvidia-settings --config=\$XDG_CONFIG_HOME/nvidia/settings" + vim="nvim" \ + cp="cp -iv" \ + mv="mv -iv" \ + rm="rm -vI" \ + bc="bc -ql" \ + mkd="mkdir -pv" \ + tldr="tldr -s" \ + ffmpeg="ffmpeg -hide_banner" \ + nvidia-settings="nvidia-settings --config=\$XDG_CONFIG_HOME/nvidia/settings" # Shortening alias \ - ka="killall" \ - ll="ls -lhpAN --color=auto --group-directories-first" + ka="killall" \ + ll="ls -lhpAN --color=auto --group-directories-first" # Quasi functions alias \ - xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \ - whed='() { $EDITOR $(which "$1") }' \ - xpick="xprop | awk ' + xgetkeys="xev | sed -ne '/^KeyPress/,/^$/p'" \ + whed='() { $EDITOR $(which "$1") }' \ + xpick="xprop | awk ' /^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print} /^WM_NAME/{sub(/.* =/, \"title:\"); print}'" -# xbps package manager aliases +# Void specific aliases +# shellcheck disable=SC2139 alias \ - x="xbps-install" \ - xr="xbps-remove" \ - xsi="xpkg -a |\ + x="xbps-install" \ + xr="xbps-remove" \ + usv="SVDIR=\"${HOME}/.local/sv\" sv" \ + xsi="xpkg -a |\ fzf -m --preview 'xq {1} | \\grep -e pkgver -e license -e short_desc -e installed_size -e maintainer -e repository -e homepage' --preview-window=right:66%:wrap |\ xargs -ro xi" diff --git a/.config/zsh/configs/widgets b/.config/zsh/configs/widgets index ca2ce772..dcf17041 100644 --- a/.config/zsh/configs/widgets +++ b/.config/zsh/configs/widgets @@ -1,7 +1,7 @@ # vim: set ft=sh: venv_prompt() { - [[ -n ${VIRTUAL_ENV} ]] || return - echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}" + [[ -n ${VIRTUAL_ENV} ]] || return + echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}" } function write_title_cmd() {