From 4fe446437f94e999a180692c9ea69c7075c0f42c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 24 Feb 2021 22:17:06 +0100 Subject: Fixing everything with the new XDG directories --- config/zsh/.zprofile | 46 ----------------------------------------- config/zsh/.zshrc | 10 +++------ config/zsh/aliases.zsh | 20 ++++-------------- config/zsh/zprofile | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 69 deletions(-) delete mode 100755 config/zsh/.zprofile create mode 100755 config/zsh/zprofile (limited to 'config/zsh') diff --git a/config/zsh/.zprofile b/config/zsh/.zprofile deleted file mode 100755 index 91b0c0b..0000000 --- a/config/zsh/.zprofile +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$HOME/.local/bin" - -# applications -export EDITOR='vim' -export TERM='st-256color' -export TERMINAL='st' -export MAIL='me@cacharle.xyz' -export BROWSER='qutebrowser' -export BROWSERCLI='w3m' - -# XDG all the things -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_CACHE_HOME="$HOME/.cache" - -export ZDOTDIT="$XDG_CONFIG_HOME/zsh" - -export HISTFILE="$XDG_CACHE_HOME/histfile" - -# color in man (less pager) -export LESS_TERMCAP_mb=$'\e[1;32m' -export LESS_TERMCAP_md=$'\e[1;32m' -export LESS_TERMCAP_me=$'\e[0m' -export LESS_TERMCAP_se=$'\e[0m' -export LESS_TERMCAP_so=$'\e[01;33m' -export LESS_TERMCAP_ue=$'\e[0m' -export LESS_TERMCAP_us=$'\e[1;4;31m' -export LESS_TERMCAP_mr=$(tput rev) -export LESS_TERMCAP_mh=$(tput dim) -export LESS_TERMCAP_ZN=$(tput ssubm) -export LESS_TERMCAP_ZV=$(tput rsubm) -export LESS_TERMCAP_ZO=$(tput ssupm) -export LESS_TERMCAP_ZW=$(tput rsupm) - - -export MINIKUBE_IN_STYLE=false # disable cringe minikube emojies - -# school env -export MINISHELL_TEST_BONUS=yes -export MINISHELL_TEST_PAGER=vim -export MINISHELL_TEST_FLAGS=-DMINISHELL_TEST -export WEBSERV_FLAGS=-DWEBSERV_CACHARLE - -[ "$(tty)" = '/dev/tty1' ] && exec startx diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 9cd21b5..aef07dd 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -3,10 +3,8 @@ ############### -[ -z $DOTDIR ] && export DOTDIR=$HOME/git/dotfiles # FIXME have to change path manually if install elsewhere - # load aliases -source $DOTDIR/.zsh_aliases +source $XDG_CONFIG_HOME/zsh/aliases.zsh # prompt case `tty` in @@ -19,7 +17,7 @@ case `tty` in ;; *) # pure prompt - export FPATH="$FPATH:$HOME/.zsh/pure" + export FPATH="$FPATH:$XDG_DATA_HOME/zsh/pure" ZSH_THEME="pure" autoload -U promptinit promptinit @@ -64,8 +62,7 @@ function chpwd() { #source /etc/zsh_command_not_found -# ignore filetypes in autocomplete -fignore=(o hi) +fignore=(o hi) # ignore extensions in autocomplete # pluggins source $XDG_DATA_HOME/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # prompt syntax highlight @@ -76,5 +73,4 @@ source $XDG_DATA_HOME/zsh/zsh-you-should-use/you-should-use.plugin.zsh # alias # set tab to 4 spaces tabs 4 - export GPG_TTY=$(tty) # fixing gpg fatal error about tty diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 790692e..3d2cfa1 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -20,10 +20,10 @@ alias doas='doas ' # same for doas alias info='info --vi-keys' # ls -alias ls='ls --color=auto -F' -alias ll="ls -lh" -alias la="ls -a" -alias lla="ls -alh" +alias ls='ls --color=auto -Fh' +alias ll="ls -l" +alias la="ls -A" +alias lla="ls -Al" alias lss="ls -Ssh" # tree @@ -88,18 +88,6 @@ alias lpassp='lpass show --password --clip' # put password in clipboard alias dual='xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --mode 1280x1024' alias single='xrandr --output VGA1 --off' - -# edit config files -alias zshrc="vim $DOTDIR/.zshrc && source $DOTDIR/.zshrc" -alias zshaliasrc="vim $DOTDIR/.zsh_aliases && source $DOTDIR/.zshrc" -alias vimrc="vim $DOTDIR/.vimrc" -alias vimplugrc="vim $DOTDIR/.pluggins.vim" -alias xmonadrc="vim $DOTDIR/xmonad.hs" -alias muttrc="vim $DOTDIR/.muttrc" - -# other -#alias date="date -R" - # parent directory jump alias ..='cd ..' alias ...='cd ../..' diff --git a/config/zsh/zprofile b/config/zsh/zprofile new file mode 100755 index 0000000..bd9c23b --- /dev/null +++ b/config/zsh/zprofile @@ -0,0 +1,55 @@ +#!/bin/sh + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$HOME/.local/bin" + +# applications +export EDITOR='vim' +export TERM='st-256color' +export TERMINAL='st' +export MAIL='me@cacharle.xyz' +export BROWSER='qutebrowser' +export BROWSERCLI='w3m' + +# XDG all the things +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +# config +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" +export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' +# data +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export GOPATH="$XDG_DATA_HOME/go" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +# cache +export HISTFILE="$XDG_CACHE_HOME/history" +export LESSHISTFILE='-' # no ~/.lesshst +# runtime +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" + +# color in man (less pager) +export LESS_TERMCAP_mb=$'\e[1;32m' +export LESS_TERMCAP_md=$'\e[1;32m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[01;33m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;4;31m' +export LESS_TERMCAP_mr=$(tput rev) +export LESS_TERMCAP_mh=$(tput dim) +export LESS_TERMCAP_ZN=$(tput ssubm) +export LESS_TERMCAP_ZV=$(tput rsubm) +export LESS_TERMCAP_ZO=$(tput ssupm) +export LESS_TERMCAP_ZW=$(tput rsupm) + + +export MINIKUBE_IN_STYLE=false # disable cringe minikube emojies + +# school env +export MINISHELL_TEST_BONUS=yes +export MINISHELL_TEST_PAGER=vim +export MINISHELL_TEST_FLAGS=-DMINISHELL_TEST +export WEBSERV_FLAGS=-DWEBSERV_CACHARLE + +[ "$(tty)" = '/dev/tty1' ] && exec startx -- cgit