desktop-ubuntu/oh-my-zsh/.zshrc

73 lines
1.6 KiB
Bash
Raw Permalink Normal View History

2023-06-18 15:34:39 +02:00
#!/usr/bin/zsh
source ~/.profile
ZSH="$HOME/.oh-my-zsh"
ZSH_THEME='lambda'
CASE_SENSITIVE='false'
DISABLE_LS_COLORS='true'
COMPLETION_WAITING_DOTS='true'
HIST_STAMPS='yyyy-mm-dd'
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt histignorealldups
plugins=( git )
source "$ZSH/oh-my-zsh.sh"
# oh-my-zsh newline after promt for the theme lambda
PROMPT='$fg[red]%n$reset_color@$fg[blue]%m$reset_color [`date "+%Y-%m-%d %a %H:%M:%S.%N"`] > %~ $(git_prompt_info)%{$reset_color%}
λ '
# aliases
2024-04-23 14:31:53 +02:00
unalias gm # norm='/usr/bin/gm'
unalias gl # dont need to git-pull that much
2023-06-18 15:34:39 +02:00
alias bc='bc -l'
2024-04-23 14:31:53 +02:00
alias l='exa -alhg --group-directories-first --color-scale -s ext'
2023-06-18 15:34:39 +02:00
alias md='mkdir'
alias ll='l -T'
alias ls='ls -alhgAF --group-directories-first'
alias d='du -ch --max-depth=1'
alias i='sudo apt-get install -y'
alias un='sudo apt-get remove -y'
2024-01-20 18:10:59 +01:00
alias subs='yt-dlp --write-auto-sub --sub-lang en'
2023-06-18 15:34:39 +02:00
alias x+='chmod +x'
alias x-='chmod -x'
alias rmlint='rdfind -dryrun true'
2023-08-06 23:02:26 +02:00
# keys
# [Ctrl-Backspace] - delete whole backward-word
bindkey -M emacs '^H' backward-kill-word
bindkey -M viins '^H' backward-kill-word
bindkey -M vicmd '^H' backward-kill-word
2023-06-18 15:34:39 +02:00
# functions
# split string=$2 using separator=$1
str_split() {
echo "$2" | sd "$1" '\n'
}
# display hex color
2023-08-06 23:02:26 +02:00
clr() {
2023-06-18 15:34:39 +02:00
printf '\e]4;1;%s\a\e[0;41m \n\e[m' "$1"
}
2024-04-23 14:31:53 +02:00
# bun completions
2023-08-06 23:02:26 +02:00
[ -s "/home/dym/.bun/_bun" ] && source "/home/dym/.bun/_bun"
if [ -e /home/dym/.nix-profile/etc/profile.d/nix.sh ]; then . /home/dym/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer