Update .config/zsh/distroicon.zsh
Update .config/zsh/env.zsh Update .config/zsh/rc.zsh
This commit is contained in:
parent
9957ffda07
commit
8275f2918c
3 changed files with 65 additions and 36 deletions
|
@ -1,13 +1,13 @@
|
||||||
# find out which distribution we are running on
|
# find out which distribution we are running on
|
||||||
LFILE="/etc/*-release"
|
FILE="/etc/*-release"
|
||||||
if [[ -f $LFILE ]]; then
|
if [[ -f $FILE ]]; then
|
||||||
_distro=$(awk '/^ID_LIKE=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
|
_distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set an icon based on the distro
|
# set an icon based on the distro
|
||||||
case $_distro in
|
case $_distro in
|
||||||
*kali*) ICON="ﴣ";;
|
*kali*) ICON="ﴣ";;
|
||||||
*arch*) ICON="";;
|
*arch*|*endeavouros*) ICON="";;
|
||||||
*debian*) ICON="";;
|
*debian*) ICON="";;
|
||||||
*raspbian*) ICON="";;
|
*raspbian*) ICON="";;
|
||||||
*ubuntu*) ICON="";;
|
*ubuntu*) ICON="";;
|
||||||
|
@ -27,7 +27,6 @@ case $_distro in
|
||||||
*devuan*) ICON="";;
|
*devuan*) ICON="";;
|
||||||
*manjaro*) ICON="";;
|
*manjaro*) ICON="";;
|
||||||
*rhel*) ICON="";;
|
*rhel*) ICON="";;
|
||||||
*macos*) ICON="";;
|
|
||||||
*) ICON="";;
|
*) ICON="";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,52 @@
|
||||||
|
# path
|
||||||
|
export PATH="$HOME"/.local/bin:"$PATH"
|
||||||
|
|
||||||
# xdg stuff
|
# xdg stuff
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME"/.local/share
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME"/.config
|
||||||
export XDG_STATE_HOME="$HOME/.local/state"
|
export XDG_STATE_HOME="$HOME"/.local/state
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
export XDG_CACHE_HOME="$HOME"/.cache
|
||||||
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
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 NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
|
||||||
export NB_DIR="$XDG_DATA_HOME/nb"
|
export ZSH_EVALCACHE_DIR="$XDG_CACHE_HOME"/evalcache
|
||||||
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
|
|
||||||
export ZSH_EVALCACHE_DIR="$HOME/.cache/evalcache"
|
# config stuff
|
||||||
export FZF_MARKS_FILE="$HOME/.config/fzfmarks"
|
export NBRC_PATH="$XDG_CONFIG_HOME"/nbrc
|
||||||
export XCURSOR_PATH=/usr/share/icons:${XDG_DATA_HOME}/icons
|
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 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 GOPATH="$XDG_DATA_HOME"/go
|
||||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
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
|
# gpg
|
||||||
export GPG_TTY=$TTY
|
export GPG_TTY="$TTY"
|
||||||
|
|
||||||
# stuff
|
# man and less
|
||||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
export LESSHISTFILE="-"
|
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
|
||||||
|
|
||||||
# editor and visual
|
# editor and visual
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export VISUAL=kate
|
export VISUAL=kate
|
||||||
|
|
||||||
# sheldon
|
# sheldon
|
||||||
export SHELDON_CONFIG_DIR="$HOME/.config/sheldon"
|
export SHELDON_CONFIG_DIR="$XDG_CONFIG_HOME"/sheldon
|
||||||
export SHELDON_DATA_DIR="$HOME/.local/sheldon"
|
export SHELDON_DATA_DIR="$XDG_DATA_HOME"/sheldon
|
||||||
export SHELDON_CONFIG_FILE="$SHELDON_CONFIG_DIR/plugins.toml"
|
export SHELDON_CONFIG_FILE="$SHELDON_CONFIG_DIR"/plugins.toml
|
||||||
export SHELDON_LOCK_FILE="$SHELDON_CONFIG_DIR/plugins.lock"
|
export SHELDON_LOCK_FILE="$SHELDON_CONFIG_DIR"/plugins.lock
|
||||||
export SHELDON_CLONE_DIR="$SHELDON_DATA_DIR/repos"
|
export SHELDON_CLONE_DIR="$SHELDON_DATA_DIR"/repos
|
||||||
export SHELDON_DOWNLOAD_DIR="$SHELDON_DATA_DIR/downloads"
|
export SHELDON_DOWNLOAD_DIR="$SHELDON_DATA_DIR"/downloads
|
||||||
|
|
||||||
# starship
|
# 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
|
||||||
|
|
|
@ -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.
|
# 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]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# 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.
|
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.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
|
# compinit
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit -d $XDG_CACHE_HOME/zsh/compdump
|
compinit -d "$XDG_CACHE_HOME"/zsh/compdump
|
||||||
|
|
||||||
# autosuggestions
|
# autosuggestions
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
|
||||||
# history
|
# history
|
||||||
mkdir -p "$XDG_CACHE_HOME/zsh" &>/dev/null
|
|
||||||
export SAVEHIST=1048576
|
export SAVEHIST=1048576
|
||||||
export HISTSIZE=1048576
|
export HISTSIZE=1048576
|
||||||
export HISTFILE="$XDG_CACHE_HOME/zsh/history"
|
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/history.zsh
|
||||||
source /usr/share/ohmyzsh/lib/completion.zsh
|
source /usr/share/ohmyzsh/lib/completion.zsh
|
||||||
source /usr/share/ohmyzsh/lib/directories.zsh
|
source /usr/share/ohmyzsh/lib/directories.zsh
|
||||||
|
source /usr/share/ohmyzsh/lib/key-bindings.zsh
|
||||||
|
|
||||||
# plugins
|
# plugins (omz)
|
||||||
plugins=(command-not-found systemd fzf)
|
source /usr/share/ohmyzsh/plugins/systemd/systemd.plugin.zsh
|
||||||
for plugin ($plugins); do source "/usr/share/ohmyzsh/plugins/$plugin/$plugin.plugin.zsh"; done
|
source /usr/share/ohmyzsh/plugins/fzf/fzf.plugin.zsh
|
||||||
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 (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
|
# eval stuff
|
||||||
_evalcache zoxide init zsh
|
_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)"
|
eval "$(keychain --dir "$XDG_CACHE_HOME/keychain" --eval --quiet id_rsa)"
|
||||||
|
|
||||||
#themes
|
#themes
|
||||||
source /home/weger/.config/zsh/distroicon.zsh
|
|
||||||
source /usr/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
source /usr/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
#_evalcache starship init zsh
|
#_evalcache starship init zsh
|
||||||
#_evalcache oh-my-posh 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 https='http --default-scheme=https'
|
||||||
alias termbin="nc termbin.com 9999"
|
alias termbin="nc termbin.com 9999"
|
||||||
alias ktheme='kitty +kitten themes --reload-in=all'
|
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
|
if (( ${+commands[nvim]} )); then alias vim="nvim"; fi
|
||||||
|
|
||||||
# key bindings
|
# key bindings
|
||||||
|
|
Loading…
Add table
Reference in a new issue