we do a little dotfiling
This commit is contained in:
parent
76f3753922
commit
d7d78c49f9
2 changed files with 41 additions and 33 deletions
7
dotfiles/.zprofile
Normal file
7
dotfiles/.zprofile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#---------------------------------------------------------------------------------#
|
||||||
|
### Fixes
|
||||||
|
export PLASMA_USE_QT_SCALING=1 # Make Plasma work properly with high DPI scaling on X11
|
||||||
|
export MOZ_USE_XINPUT2=1 # Use pixel-by-pixel touchpad scrolling in Firefox
|
||||||
|
export MOZ_ENABLE_WAYLAND=1 # Use experimental native Wayland support for Firefox and Thunderbird
|
||||||
|
export GTK_USE_PORTAL=1 # Try to use native file pickers in GTK programs
|
||||||
|
#---------------------------------------------------------------------------------#
|
|
@ -10,6 +10,7 @@ fi
|
||||||
### Add things to PATH
|
### Add things to PATH
|
||||||
path+=("$HOME/.pyenv/bin")
|
path+=("$HOME/.pyenv/bin")
|
||||||
path+=("$HOME/.local/bin")
|
path+=("$HOME/.local/bin")
|
||||||
|
path+=("$HOME/Android/Sdk/platform-tools")
|
||||||
export PATH
|
export PATH
|
||||||
#--------------------------------------------------------------------------------#
|
#--------------------------------------------------------------------------------#
|
||||||
### Zsh config
|
### Zsh config
|
||||||
|
@ -19,33 +20,6 @@ HISTSIZE=1000 # Sets lines to save history for
|
||||||
SAVEHIST=1000 # Sets lines to save history for
|
SAVEHIST=1000 # Sets lines to save history for
|
||||||
# Configure emacs keys
|
# Configure emacs keys
|
||||||
bindkey -e
|
bindkey -e
|
||||||
# Configure completion settings
|
|
||||||
autoload -Uz compinit
|
|
||||||
compinit
|
|
||||||
|
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
|
||||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle ':completion:*' menu select=2
|
|
||||||
eval "$(dircolors -b)"
|
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
|
||||||
zstyle ':completion:*' menu select=long
|
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
|
||||||
zstyle ':completion:*' use-compctl false
|
|
||||||
zstyle ':completion:*' verbose true
|
|
||||||
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|
||||||
#---------------------------------------------------------------------------------#
|
|
||||||
### Powerlevel10k theme
|
|
||||||
source ~/powerlevel10k/powerlevel10k.zsh-theme # Load theme
|
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh # Load zsh config
|
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Load nvm (node version manager)
|
### Load nvm (node version manager)
|
||||||
if ls "$HOME/.nvm" &> /dev/null; then
|
if ls "$HOME/.nvm" &> /dev/null; then
|
||||||
|
@ -60,14 +34,41 @@ if ls "$HOME/.pyenv" &> /dev/null; then
|
||||||
eval "$(pyenv virtualenv-init -)"
|
eval "$(pyenv virtualenv-init -)"
|
||||||
fi
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Make everything colorful
|
### Aliases
|
||||||
alias ls="ls --color" # `ls` colors
|
alias ls="ls --color" # `ls` colors
|
||||||
# Find syntax highlighting location and start it (apt and pacman are different)
|
alias sudo="doas" # doas instead of sudo
|
||||||
if ls "/usr/share/zsh/plugins/zsh-syntax-highlighting/" &> /dev/null; then
|
#---------------------------------------------------------------------------------#
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
### Setup zinit
|
||||||
elif ls "/usr/share/zsh-syntax-highlighting" &> /dev/null; then
|
# Added by Zinit's installer
|
||||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
|
||||||
|
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
|
||||||
|
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
|
||||||
|
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
|
||||||
|
print -P "%F{33} %F{34}Installation successful.%f%b" || \
|
||||||
|
print -P "%F{160} The clone has failed.%f%b"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
||||||
|
autoload -Uz _zinit
|
||||||
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||||
|
|
||||||
|
# Load a few important annexes, without Turbo
|
||||||
|
# (this is currently required for annexes)
|
||||||
|
zinit light-mode for \
|
||||||
|
zdharma-continuum/zinit-annex-as-monitor \
|
||||||
|
zdharma-continuum/zinit-annex-bin-gem-node \
|
||||||
|
zdharma-continuum/zinit-annex-patch-dl \
|
||||||
|
zdharma-continuum/zinit-annex-rust
|
||||||
|
|
||||||
|
# End of Zinit's installer chunk
|
||||||
|
#---------------------------------------------------------------------------------#
|
||||||
|
### Zinit plugins
|
||||||
|
zinit ice depth=1; zinit light romkatv/powerlevel10k # Powerlevel10k
|
||||||
|
zinit light zsh-users/zsh-autosuggestions # Autosuggestions
|
||||||
|
zinit light zsh-users/zsh-syntax-highlighting # Syntax highlighting
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Fixes
|
### Fixes
|
||||||
export GPG_TTY=$(tty) # Fix gpg signing
|
export GPG_TTY=$(tty) # Fix gpg signing
|
||||||
|
|
Reference in a new issue