From 8f0048fde624e304203552d5ebef92ca6f30d618 Mon Sep 17 00:00:00 2001 From: Naz Date: Fri, 5 Sep 2025 22:39:18 +0100 Subject: =?UTF-8?q?=E2=9C=A8feat:=20add=20shells=20configuration=20files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shells/.config/bash/bashrc | 18 +++++++++++++++++ shells/.config/shells/aliases | 39 +++++++++++++++++++++++++++++++++++ shells/.config/shells/functions | 8 ++++++++ shells/.config/shells/shellsrc | 10 +++++++++ shells/.config/zsh/zshrc | 45 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 shells/.config/bash/bashrc create mode 100644 shells/.config/shells/aliases create mode 100644 shells/.config/shells/functions create mode 100644 shells/.config/shells/shellsrc create mode 100644 shells/.config/zsh/zshrc (limited to 'shells/.config') diff --git a/shells/.config/bash/bashrc b/shells/.config/bash/bashrc new file mode 100644 index 0000000..a38ac14 --- /dev/null +++ b/shells/.config/bash/bashrc @@ -0,0 +1,18 @@ +# Common configs +source $HOME/.config/shells/shellsrc + +# Completion +[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ + . /usr/share/bash-completion/bash_completion + +# Vi mode +set -o vi + +# Eval Zoxide +eval "$(zoxide init bash)" + +# Eval FZF +eval "$(fzf --bash)" + +# Prompt +PS1='\[\e[91;1m\][\[\e[93m\]\u\[\e[92m\]@\[\e[94m\]\h \[\e[0;95m\]\W\[\e[91;1m\]]\[\e[0m\]\\$ ' diff --git a/shells/.config/shells/aliases b/shells/.config/shells/aliases new file mode 100644 index 0000000..10b26b7 --- /dev/null +++ b/shells/.config/shells/aliases @@ -0,0 +1,39 @@ +# Basic Aliases +alias cp='cp -iv' +alias mv='mv -iv' +alias rm='rm -vI' +alias cd='z' +alias ls='eza --icons=always --group-directories-first' +alias ll='ls -la --git' +alias dir='ll ./*' +alias tree='ls -Ta -I ".git|target"' +alias cls='clear' +alias v='nvim' +alias rv='command sudo -E nvim' +alias code='codium' +alias dl='wget -cq --show-progress' +alias ip='ip -c' +alias ping='ping -c 3' +alias py='python' + +# XBPS Aliases +alias xi='doas xbps-install -S' +alias xq='doas xbps-query -Rs' +alias xr='doas xbps-remove -R' +alias xo='xr -Oo' +alias xu='xi && doas xbps-install -uy xbps && doas xbps-install -uy && xo && pkill -RTMIN+14 dwmblocks' +alias xf="xq '' | cut -d' ' -f2 | fzf --multi --preview 'xbps-query -R {1}' --preview-window=down:75% | xargs -ro xi" + +# Cargo Aliases +alias cargo-update='cargo install-update -a' + +# Python Aliases + + +# YouTube Aliases +alias yt480="mpv --save-position-on-quit '--ytdl-format=bv*[height<=480]+ba'" +alias yt720="mpv --save-position-on-quit '--ytdl-format=bv*[height<=720]+ba'" +alias yt1080="mpv --save-position-on-quit '--ytdl-format=bv*[height<=1080]+ba'" + +# Use doas +alias sudo='echo "use doas idiot" ||' diff --git a/shells/.config/shells/functions b/shells/.config/shells/functions new file mode 100644 index 0000000..16f320b --- /dev/null +++ b/shells/.config/shells/functions @@ -0,0 +1,8 @@ +# LF Functions +LFCD="$HOME/.local/bin/lfcd" +if [ -f "$LFCD" ]; then + source "$LFCD" +fi + +# MD Function +function md { mkdir -pv "$1" && cd "$1"; } diff --git a/shells/.config/shells/shellsrc b/shells/.config/shells/shellsrc new file mode 100644 index 0000000..81a288d --- /dev/null +++ b/shells/.config/shells/shellsrc @@ -0,0 +1,10 @@ +# History settings +HISTFILE=$HOME/.config/shells/history +HISTSIZE=50000 +SAVEHIST=50000 + +# Aliases +source $HOME/.config/shells/aliases + +# Functions +source $HOME/.config/shells/functions diff --git a/shells/.config/zsh/zshrc b/shells/.config/zsh/zshrc new file mode 100644 index 0000000..833aadf --- /dev/null +++ b/shells/.config/zsh/zshrc @@ -0,0 +1,45 @@ +# Common configs +source $HOME/.config/shells/shellsrc + +# Syntax highlighting +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +# Colors settings +autoload -U colors && colors + +# Completion +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) + +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# Vi mode +bindkey -v + +# Key bindings +bindkey -s '^o' 'lf\n' +bindkey -s '^v' 'v\n' + +# Fix Cursor Shape After Using Neovim +zle-line-init() { + echo -e -n "\x1b[\x34 q" +} +zle -N zle-line-init +echo -e -n "\x1b[\x34 q" +preexec() { echo -e -n "\x1b[\x34 q" ;} + +# Eval Zoxide +eval "$(zoxide init zsh)" + +# Eval FZF +source <(fzf --zsh) + +# Prompt +eval "$(starship init zsh)" -- cgit v1.2.3