feat: env vars for cleaner home ~

This commit is contained in:
Flinner 2022-03-13 13:37:07 +03:00
parent c85fff65ca
commit 1a6848ee00
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
2 changed files with 21 additions and 15 deletions

View File

@ -2023,7 +2023,7 @@ I wrote that, neat isn't it? :P
(defun my/elfeed/toggle-search-to_read () (interactive) (my/elfeed/toggle-search-tag "to_read"))
#+end_src
** Visual and binds
** Visual, binds, directory
#+begin_src emacs-lisp
(use-package elfeed
:defer t
@ -2042,7 +2042,8 @@ I wrote that, neat isn't it? :P
;"tr" 'my/elfeed/toggle-read
"tr" 'my/elfeed/toggle-search-unread
"tt" 'my/elfeed/toggle-search-to_read)
:custom
(elfeed-db-directory "~/.local/share/elfeed")
:hook ;(elfeed-show-mode . my/elfeed/visual)
(elfeed-show-mode . olivetti-mode))

View File

@ -2,16 +2,25 @@
# INIT #
########
#===============================================================================================
declare -A ZINIT
# zinit, don't pollute my home!
ZINIT[BIN_DIR]="$HOME/.local/share/zinit/zinit.git"
ZINIT[HOME_DIR]="$HOME/.local/share/zinit"
ZINIT[MAN_DIR]="$HOME/.local/share/zinit/man"
ZINIT[ZCOMPDUMP_PATH]="$HOME/.cache/zinit/.zcompdump"
ZDOTDIR="$HOME/.cache/zsh/"
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
if [[ ! -f "${ZINIT[BIN_DIR]}/zinit.zsh" ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
command mkdir -p $ZINIT[HOME_DIR] && command chmod g-rwX $ZINIT[HOME_DIR]
command git clone https://github.com/zdharma-continuum/zinit $ZINIT[BIN_DIR] && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
source "${ZINIT[BIN_DIR]}/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
@ -74,6 +83,11 @@ setopt HIST_SAVE_NO_DUPS # do not save duplicated command
setopt HIST_REDUCE_BLANKS # remove unnecessary blanks
setopt INC_APPEND_HISTORY_TIME # append command to history file immediately after execution
setopt EXTENDED_HISTORY # record command start time
setopt CORRECT # Correct spelling of commands
setopt CORRECT_ALL # Correct spelling of arguments
SAVEHIST=1000
HISTSIZE=1000
HISTFILE="$HOME/.local/share/zsh/zsh_history"
#===============================================================================================
############
@ -117,11 +131,6 @@ select-word-style bash
SAVEHIST=1000
HISTSIZE=1000
HISTFILE=~/.zsh_history
setopt CORRECT
setopt CORRECT_ALL
#zle -N zle-line-init
#zle -N zle-line-finish
#zle -N zle-keymap-select
@ -214,8 +223,6 @@ export YARN_PATH="$HOME/.yarn/bin"
export PATH="$DOOM_PATH:$HOME/.local/bin:$HOME/bin:$CARGO_HOME/bin:$YARN_PATH:$GOPATH:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
@ -270,7 +277,5 @@ RPS1=" "
eval "$(starship init zsh)"
[ -f "/home/user/.ghcup/env" ] && source "/home/user/.ghcup/env" # ghcup-env
# eval "$(rbenv init - zsh)"
#~/bin/dennis
#cutefetch 2> /dev/null