From dc41e975667fbf468f913a23eadf81b9b193ea9a Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 29 Aug 2023 21:44:42 +0200 Subject: Update paths and stuffs --- .zprofile | 60 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 24 deletions(-) (limited to '.zprofile') diff --git a/.zprofile b/.zprofile index 301b5e6..6fa492f 100644 --- a/.zprofile +++ b/.zprofile @@ -1,15 +1,13 @@ #!/usr/bin/env zsh -# Configuration -export PATH=$PATH:$HOME/.local/bin - export BROWSER="firefox-developer-edition" export EDITOR="vim" export PAGER="less" export READER="zathura" -export TERMINAL="st" +#export TERMINAL="st" +export TERMINAL="foot" export TERM="$TERMINAL" -export VISUAL="vim" +export VISUAL="nvim" export SHELL="zsh" # XDG~ @@ -18,11 +16,14 @@ export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_DESKTOP_DIR="$HOME" -# X11-stuff +# X11-stuff, most goes into the ~/.config/x folder export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" -export XDEFAULTS="$HOME/.config/x/defaults" -export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x/xinitrc" -export XRESOURCES="$HOME/.config/x/resources" +export XDEFAULTS="${XDG_CONFIG_HOME:-$HOME/.config}/x/defaults" +export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x/initrc" +export XRESOURCES="${XDG_CONFIG_HOME:-$HOME/.config}/x/resources" + +# Wayland-stuff, most goes into the ~/.config/w folder +export WINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/w/initrc" # More utils / Preferences export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg" @@ -39,24 +40,15 @@ export FZF_DEFAULT_OPTS=' --color=info:#323437,prompt:#36c692,pointer:#ae81ff --color=marker:#d183e8,spinner:#e3c78a,header:#ff5189' -# Pager stuffs -export LESS_TERMCAP_md=$'\e[01;38;5;147m' -export LESS_TERMCAP_me=$'\e[0m' -export LESS_TERMCAP_se=$'\e[0m' -export LESS_TERMCAP_so=$'\e[48;5;235;01;38;5;250m' -export LESS_TERMCAP_ue=$'\e[0m' -export LESS_TERMCAP_us=$'\e[38;5;104m' # Vim stuffs -export MYVIMRC="${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc" -export VIMINIT="source $MYVIMRC" +#export MYVIMRC="${XDG_CONFIG_HOME:-$HOME/.config}/vim/vimrc" +#export VIMINIT="source $MYVIMRC" # Zsh stuffs export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh" export ZSH_COMPDUMP=$XDG_CACHE_HOME/zcompdump-$ZSH_VERSION -# dialogrc path -export DIALOGRC="${XDG_CONFIG_HOME:-$HOME/.config}/dialogrc" # # Developer thingies # @@ -64,20 +56,40 @@ export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" export AWS_CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/aws/config" export AWS_SHARED_CREDENTIALS_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/aws/credentials" export KUBECONFIG="${XDG_CACHE_HOME:-$HOME/.cache}/kube/config" +export DIALOGRC="${XDG_CONFIG_HOME:-$HOME/.config}/dialogrc" # Self explanatory export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export IPYTHONDIR="${XDG_CACHE_HOME:-$HOME/.cache}/ipython" +export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/pythonrc" # Ruby export GEM_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/gem" # Rust +#export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export CARGO_HOME="${XDG_CACHE_HOME:-$HOME/.cache}/cargo" -export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export RUSTUP_HOME="${XDG_CACHE_HOME:-$HOME/.cache}/rustup" -# Build bat cache if necessary -$(which bat >/dev/null) && ! [ -f "${XDG_CACHE_HOME}/bat/themes.bin" ] && bat cache --build >/dev/null || true +# Path Configuration +export PATH=$GEM_PATH/bin:$PATH +export PATH=$HOME/.ghcup/bin:$PATH +export PATH=$HOME/.cabal/bin:$PATH +export PATH=$HOME/.local/bin:$PATH + +# Only after midnight +man() { + LESS_TERMCAP_md=$'\e[01;38;5;147m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[48;5;235;01;38;5;250m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[38;5;104m' \ + command man "$@" +} -[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx "$XINITRC" +if [ "$(tty)" = "/dev/tty1" ] && ! (pidof Xorg 2>&1 >/dev/null); then + exec startx "$XINITRC" +elif [ "$(tty)" = "/dev/tty2" ]; then + exec sh $WINITRC +fi -- cgit v1.3