Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### GENERAL
- ## Autostart Sway at login
- [ "$(tty)" = "/dev/tty1" ] && exec sway
- ## If not running interactively, don't do anything
- [[ $- != *i* ]] && return
- ## Enable colors and change prompt
- autoload -U colors && colors
- PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
- ### COMPINIT
- zstyle :compinstall filename '/home/alucard/.zshrc'
- autoload -Uz compinit
- zstyle ':completion:*' menu select
- zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
- compinit
- ### SETOPT
- ## histfile
- HISTFILE=~/.histfile
- HISTSIZE=10000
- SAVEHIST=10000
- setopt BANG_HIST # Treat the '!' character specially during expansion
- setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format
- setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits
- setopt SHARE_HISTORY # Share history between all sessions
- setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history
- setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again
- setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate
- setopt HIST_FIND_NO_DUPS # Do not display a line previously found
- setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space
- setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file
- setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry
- setopt HIST_VERIFY # Don't execute immediately upon history expansion
- setopt HIST_BEEP # Beep when accessing nonexistent history
- ## autocompletion
- setopt MENU_COMPLETE # Automatically highlight first element of completion menu
- setopt AUTO_LIST # Automatically list choices on ambiguous completion
- setopt COMPLETE_IN_WORD # Complete from both ends of a word
- ### PLUGINS
- source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
- source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- ### EXPORT
- export TERM="alacritty"
- export COLORTERM="truecolor"
- export EDITOR="micro"
- export VISUAL="micro"
- export MICRO_TRUECOLOR=1
- export HISTORY_IGNORE="(ls|cd|pwd|exit|mc|sudo mc|history|cd -|cd ..)"
- export XDG_SESSION_TYPE=wayland
- export XDG_CURRENT_DESKTOP=sway
- #export GDK_BACKEND=wayland
- export CLUTTER_BACKEND=wayland
- export SDL_VIDEODRIVER=wayland
- #export GTK_USE_PORTAL=0
- #export QT_QPA_PLATFORM=wayland-egl
- export QT_QPA_PLATFORMTHEME=qt6ct
- #export QT_WAYLAND_FORCE_DPI=physical
- #export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
- #export ECORE_EVAS_ENGINE=wayland_egl
- #export ELM_ENGINE=wayland_egl
- #export _JAVA_AWT_WM_NONREPARENTING=1
- ### ALIASES
- ## changing "ls" to "exa
- alias ls='exa -al --color=always --group-directories-first'
- alias la='exa -a --color=always --group-directories-first'
- alias ll='exa -l --color=always --group-directories-first'
- alias lt='exa -aT --color=always --group-directories-first'
- alias l.='exa -a | egrep "^\."'
- ## colorize grep output
- alias grep='grep --color=auto'
- alias egrep='egrep --color=auto'
- alias fgrep='fgrep --color=auto'
- ## pacman and yay
- alias pacs='sudo pacman -S'
- alias pacss='pacman -Ss'
- alias pacsi='pacman -Si'
- alias pacsl='pacman -Sl'
- alias pacqs='pacman -Qs'
- alias pacqi='pacman -Qi'
- alias pacql='pacman -Ql'
- alias pacqe='pacman -Qe'
- alias pacqet='pacman -Qet'
- alias pacqem='pacman -Qem'
- alias pacqen='pacman -Qen'
- alias pacqent='pacman -Qent'
- alias pacrn='sudo pacman -Rn'
- alias pacrns='sudo pacman -Rns'
- alias pacsyu='sudo pacman -Syyu'
- alias pacc='sudo pacman -Scc --noconfirm'
- alias yaysi='yay -Si'
- alias yaysl='yay -Sl'
- alias yayqi='yay -Qi'
- alias yayql='yay -Ql'
- alias yayrn='yay -Rn'
- alias yayrns='yay -Rns'
- alias yaysua='yay -Sua'
- alias yaysyu='yay -Syu'
- alias yayc='yay -Sc --noconfirm'
- alias unlock='sudo rm /var/lib/pacman/db.lck'
- ## ssh
- alias sshs='ssh -p 1098 alucard@server'
- #alias ssh git 'ssh git@gitlab.com'
- # shutdown & reboot
- alias shutdown='shutdown -h now'
- alias reboot='shutdown -r now'
- ## systemctl
- alias sctlss='systemctl status'
- alias sctlsp='sudo systemctl stop'
- alias sctlst='sudo systemctl start'
- alias sctlrt='sudo systemctl restart'
- alias sctlrd='sudo systemctl reload'
- alias sctlee='sudo systemctl enable'
- alias sctlde='sudo systemctl disable'
- alias sctlbl='systemctl reboot --boot-loader-entry=linux.conf'
- alias sctlbz='systemctl reboot --boot-loader-entry=zen.conf'
- #alias sctlba='systemctl reboot --boot-loader-entry=amd.conf'
- alias sctlbu='systemctl reboot --firmware-setup'
- ## journalctl
- #jctl
- ## imv
- alias imv='imv * -s full -u linear'
- ## HDSentinel
- alias hds='sudo hdsentinel'
- alias hdst='sudo hdsentinel | grep TB'
- ## bc
- alias bc='bc -q'
- ## newsboat
- alias rss='newsboat'
- ## git
- #alias addup='git add -u'
- #alias addall='git add .'
- #alias branch='git branch'
- #alias checkout='git checkout'
- #alias clone='git clone'
- #alias commit='git commit -m'
- #alias fetch='git fetch'
- #alias pull='git pull origin'
- #alias push='git push origin'
- #alias stat='git status'
- #alias tag='git tag'
- #alias newtag='git tag -a'
- ## confirm before overwriting something
- alias cp="cp -i"
- alias mv='mv -i'
- alias rm='rm -i'
- ### ARCHIVE EXTRACTION
- ex ()
- {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xjf $1 ;;
- *.tar.gz) tar xzf $1 ;;
- *.bz2) pbzip2 $1 ;;
- *.rar) unrar x $1 ;;
- *.gz) pigz $1 ;;
- *.tar) tar xf $1 ;;
- *.tbz2) tar xjf $1 ;;
- *.tgz) tar xzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1;;
- *.7z) 7z x $1 ;;
- *.deb) ar x $1 ;;
- *.tar.xz) tar xf $1 ;;
- *.tar.zst) unzstd $1 ;;
- *) echo "'$1' cannot be extracted via ex()" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
- }
Add Comment
Please, Sign In to add comment