From 90cfa75ad0a18c601d71c73aac001d770a9038ca Mon Sep 17 00:00:00 2001 From: _N0x Date: Sun, 31 Jan 2021 03:52:53 +0100 Subject: [PATCH] Cleaned up zshrc --- zsh/.zshrc | 51 ++++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index ae08f1f..66ecd88 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,40 +1,32 @@ -# 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 [ "$TMUX" = "" ]; then tmux; fi - - -# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH -# then export ~/bin to your $PATH. +# export path stuff if [[ $UID -ge 1000 && -d $HOME/.local/bin && -z $(echo $PATH | grep -o $HOME/.local/bin) ]] then - export PATH="${PATH}:$HOME/.local/bin" + export PATH="$HOME/.local/bin:${PATH}" + export PATH="$HOME/.local/bin/dwmscript:${PATH}" fi +# start x -> starts dwm within .xinitrc if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then startx fi -pfetch +# Alias +alias nv="nvim" +alias vim="nvim" +alias sc="maim -s ~/Pictures/$(date +%s).png" - -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 - - -EDITOR=nvim - -# Path to your oh-my-zsh installation. +# exporty +export EDITOR=nvim export ZSH="/home/n0x/.oh-my-zsh" - export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 +export LIBVIRT_DEFAULT_URI="qemu:///system" -export PATH=$PATH:~/.local/bin - +# call pfetch for new terminal +pfetch +# Theming and plugins ZSH_THEME="powerlevel10k/powerlevel10k" HIST_STAMPS="yyyy-mm-dd" @@ -47,17 +39,14 @@ plugins=( ) #ZSH_TMUX_AUTOSTART=true + +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 + source $ZSH/oh-my-zsh.sh -alias nv="nvim" -alias vim="nvim" -alias sc="maim -s ~/Pictures/$(date +%s).png" - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [ -f ~/.config/lf/icons ] && source ~/.config/lf/icons -#eval $(thefuck --alias) - -# To customize prompt, run `p10k configure` or edit ~/dotfiles/zsh/.p10k.zsh. -[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh +#[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh