diff --git a/dot_config/zsh/distroicon.zsh b/dot_config/zsh/distroicon.zsh index 2f5b177..31fa089 100644 --- a/dot_config/zsh/distroicon.zsh +++ b/dot_config/zsh/distroicon.zsh @@ -1,13 +1,13 @@ # find out which distribution we are running on -LFILE="/etc/*-release" -if [[ -f $LFILE ]]; then - _distro=$(awk '/^ID_LIKE=/' /etc/*-release | awk -F'=' '{ print tolower($2) }') +FILE="/etc/*-release" +if [[ -f $FILE ]]; then + _distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }') fi # set an icon based on the distro case $_distro in *kali*) ICON="ﴣ";; - *arch*) ICON="";; + *arch*|*endeavouros*) ICON="";; *debian*) ICON="";; *raspbian*) ICON="";; *ubuntu*) ICON="";; @@ -27,7 +27,6 @@ case $_distro in *devuan*) ICON="";; *manjaro*) ICON="";; *rhel*) ICON="";; - *macos*) ICON="";; *) ICON="";; esac diff --git a/dot_config/zsh/env.zsh b/dot_config/zsh/env.zsh index d666be4..5b39ee3 100644 --- a/dot_config/zsh/env.zsh +++ b/dot_config/zsh/env.zsh @@ -1,38 +1,52 @@ +# path +export PATH="$HOME"/.local/bin:"$PATH" + # xdg stuff -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_STATE_HOME="$HOME/.local/state" -export XDG_CACHE_HOME="$HOME/.cache" -export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_STATE_HOME="$HOME"/.local/state +export XDG_CACHE_HOME="$HOME"/.cache +export XDG_DATA_DIRS=/usr/local/share:/usr/share +export XDG_CONFIG_DIRS=/etc/xdg + +# moved from home folder +# cache stuff export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages -export NB_DIR="$XDG_DATA_HOME/nb" -export NBRC_PATH="$XDG_CONFIG_HOME/nbrc" -export ZSH_EVALCACHE_DIR="$HOME/.cache/evalcache" -export FZF_MARKS_FILE="$HOME/.config/fzfmarks" -export XCURSOR_PATH=/usr/share/icons:${XDG_DATA_HOME}/icons +export ZSH_EVALCACHE_DIR="$XDG_CACHE_HOME"/evalcache + +# config stuff +export NBRC_PATH="$XDG_CONFIG_HOME"/nbrc +export FZF_MARKS_FILE="$XDG_CONFIG_HOME"/fzfmarks +export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java + +# data stuff +export XCURSOR_PATH=/usr/share/icons:"$XDG_DATA_HOME"/icons export GOPATH="$XDG_DATA_HOME"/go export CARGO_HOME="$XDG_DATA_HOME"/cargo -export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker +export ASDF_DATA_DIR="$XDG_DATA_HOME"/asdf +export NB_DIR="$XDG_DATA_HOME"/nb # gpg -export GPG_TTY=$TTY +export GPG_TTY="$TTY" -# stuff +# man and less export MANPAGER="sh -c 'col -bx | bat -l man -p'" -export LESSHISTFILE="-" +export LESSHISTFILE="$XDG_STATE_HOME"/less/history # editor and visual export EDITOR=nvim export VISUAL=kate # sheldon -export SHELDON_CONFIG_DIR="$HOME/.config/sheldon" -export SHELDON_DATA_DIR="$HOME/.local/sheldon" -export SHELDON_CONFIG_FILE="$SHELDON_CONFIG_DIR/plugins.toml" -export SHELDON_LOCK_FILE="$SHELDON_CONFIG_DIR/plugins.lock" -export SHELDON_CLONE_DIR="$SHELDON_DATA_DIR/repos" -export SHELDON_DOWNLOAD_DIR="$SHELDON_DATA_DIR/downloads" +export SHELDON_CONFIG_DIR="$XDG_CONFIG_HOME"/sheldon +export SHELDON_DATA_DIR="$XDG_DATA_HOME"/sheldon +export SHELDON_CONFIG_FILE="$SHELDON_CONFIG_DIR"/plugins.toml +export SHELDON_LOCK_FILE="$SHELDON_CONFIG_DIR"/plugins.lock +export SHELDON_CLONE_DIR="$SHELDON_DATA_DIR"/repos +export SHELDON_DOWNLOAD_DIR="$SHELDON_DATA_DIR"/downloads # starship -export STARSHIP_CONFIG="$HOME/.config/starship/config.toml" +export STARSHIP_CONFIG_DIR="$XDG_CONFIG_HOME"/starship +export STARSHIP_CONFIG="$STARSHIP_CONFIG_DIR"/config.toml diff --git a/dot_config/zsh/rc.zsh b/dot_config/zsh/rc.zsh index 452ef1b..3dce65b 100644 --- a/dot_config/zsh/rc.zsh +++ b/dot_config/zsh/rc.zsh @@ -1,3 +1,8 @@ +#fastfetch +bofh; echo " - BOFH" +#source /usr/share/zsh/plugins/hq/hq.zsh +#colorscript random + # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. @@ -8,15 +13,17 @@ fi # To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh +# ensure zsh cache folder exists +mkdir -p "$XDG_CACHE_HOME/zsh" &>/dev/null + # compinit autoload -Uz compinit -compinit -d $XDG_CACHE_HOME/zsh/compdump +compinit -d "$XDG_CACHE_HOME"/zsh/compdump # autosuggestions source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh # history -mkdir -p "$XDG_CACHE_HOME/zsh" &>/dev/null export SAVEHIST=1048576 export HISTSIZE=1048576 export HISTFILE="$XDG_CACHE_HOME/zsh/history" @@ -26,15 +33,24 @@ setopt inc_append_history source /usr/share/ohmyzsh/lib/history.zsh source /usr/share/ohmyzsh/lib/completion.zsh source /usr/share/ohmyzsh/lib/directories.zsh +source /usr/share/ohmyzsh/lib/key-bindings.zsh -# plugins -plugins=(command-not-found systemd fzf) -for plugin ($plugins); do source "/usr/share/ohmyzsh/plugins/$plugin/$plugin.plugin.zsh"; done -plugins=(fzf-tab fzf-marks evalcache colorize titles thefuck forgit) -for plugin ($plugins); do source "/usr/share/zsh/plugins/$plugin/$plugin.zsh"; done -unset plugins - +# plugins (omz) +source /usr/share/ohmyzsh/plugins/systemd/systemd.plugin.zsh +source /usr/share/ohmyzsh/plugins/fzf/fzf.plugin.zsh +# plugins (own) +source /usr/share/doc/find-the-command/ftc.zsh +source /usr/share/zsh/plugins/fzf-tab/fzf-tab.zsh +source /usr/share/zsh/plugins/fzf-marks/fzf-marks.zsh +source /usr/share/zsh/plugins/evalcache/evalcache.zsh +source /usr/share/zsh/plugins/colorize/colorize.zsh +source /usr/share/zsh/plugins/titles/titles.zsh +source /usr/share/zsh/plugins/thefuck/thefuck.zsh +source /usr/share/zsh/plugins/forgit/forgit.zsh +source /usr/share/zsh/plugins/ysu/ysu.zsh +source /home/weger/.config/zsh/distroicon.zsh +source /home/weger/.config/zsh/transfer.zsh # eval stuff _evalcache zoxide init zsh @@ -46,7 +62,6 @@ source /opt/asdf-vm/asdf.sh eval "$(keychain --dir "$XDG_CACHE_HOME/keychain" --eval --quiet id_rsa)" #themes -source /home/weger/.config/zsh/distroicon.zsh source /usr/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme #_evalcache starship init zsh #_evalcache oh-my-posh init zsh @@ -69,6 +84,7 @@ alias tree='tree -a -I .git' alias https='http --default-scheme=https' alias termbin="nc termbin.com 9999" alias ktheme='kitty +kitten themes --reload-in=all' +alias wget='wget --hsts-file="$XDG_DATA_HOME"/wget-hsts' if (( ${+commands[nvim]} )); then alias vim="nvim"; fi # key bindings