dotfiles/.zshrc
2025-10-03 21:55:25 +02:00

50 lines
1.7 KiB
Bash

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Created by Zap installer
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
plug "zsh-users/zsh-autosuggestions"
plug "zap-zsh/supercharge"
plug "zap-zsh/completions"
plug "zsh-users/zsh-syntax-highlighting"
plug "wintermi/zsh-lsd"
plug "romkatv/powerlevel10k"
# plug "zap-zsh/nvm"
# Load and initialise completion system
autoload -Uz compinit
fpath+=~/.zfunc
compinit
# # nvm initialization
# source /usr/share/nvm/init-nvm.sh
alias v="nvim"
# alias conservation-on="sudo ectool chargecontrol normal 80 80"
# alias conservation-off="sudo ectool chargecontrol normal"
# # alias orphans="sudo pacman -Qtdq | sudo pacman -Rns -"
#
# # Define variables for monitor names
# LAPTOP_MONITOR="eDP-1"
# EXTERNAL_MONITOR="DP-2"
#
# # Alias to disable laptop screen (only if external is connected)
# alias laptop-screen-off='if xrandr | grep "$EXTERNAL_MONITOR connected"; then swaymsg output $LAPTOP_MONITOR disable; echo "Laptop screen disabled."; else echo "External monitor not connected. Keeping laptop screen on."; fi'
#
# # Alias to enable laptop screen
# alias laptop-screen-on='swaymsg output $LAPTOP_MONITOR enable; echo "Laptop screen enabled."'
alias space="du -hsx * | sort -rh | head -10"
# Enable GPG support
export GPG_TTY=$(tty)
export EDITOR="nvim"
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh