Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).
Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)
Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
#
|
|
|
|
# Set global environment variables
|
|
|
|
|
|
|
|
# Load XDG specifications
|
|
|
|
# shellcheck source=xdg
|
|
|
|
[ -f ~/.config/sh/xdg ] && . ~/.config/sh/xdg
|
|
|
|
|
|
|
|
###############################
|
|
|
|
## BEGIN GLOBAL ENV VARS ##
|
|
|
|
###############################
|
|
|
|
|
|
|
|
# will be picked up by many programs as notes directory
|
|
|
|
export WIKIROOT="${WIKIROOT:-$HOME/documents/notes}"
|
|
|
|
# will be picked up by many programs as library root directory
|
|
|
|
export LIBRARYROOT="${LIBRARYROOT:-$HOME/documents/library}"
|
|
|
|
# the default bibtex file to work on
|
|
|
|
# will change over time as primary projects change
|
|
|
|
# basically functions as 'default library' variable
|
2023-02-11 10:39:51 +00:00
|
|
|
export BIBFILE="${BIBFILE:-$LIBRARYROOT/library.bib}"
|
Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).
Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)
Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00
|
|
|
|
|
|
|
# these are my personal 'important' application settings
|
2022-12-20 22:03:35 +00:00
|
|
|
if exist nvim; then
|
2024-06-13 08:19:20 +00:00
|
|
|
export EDITOR="nvim"
|
2022-12-20 22:03:35 +00:00
|
|
|
elif exist vim; then
|
2024-06-13 08:19:20 +00:00
|
|
|
export EDITOR="vim"
|
2022-12-20 22:03:35 +00:00
|
|
|
elif exist vi; then
|
2024-06-13 08:19:20 +00:00
|
|
|
export EDITOR="vi"
|
2022-12-20 22:03:35 +00:00
|
|
|
elif exist micro; then
|
2024-06-13 08:19:20 +00:00
|
|
|
export EDITOR="micro"
|
2022-12-20 22:03:35 +00:00
|
|
|
else
|
2024-06-13 08:19:20 +00:00
|
|
|
export EDITOR="nano"
|
2022-12-20 22:03:35 +00:00
|
|
|
fi
|
2020-05-28 08:30:58 +00:00
|
|
|
export BROWSER="qutebrowser"
|
2022-11-15 17:36:41 +00:00
|
|
|
export TERMINAL="wezterm"
|
2023-10-05 16:25:57 +00:00
|
|
|
export PAGER="less -FRX"
|
Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).
Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)
Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00
|
|
|
|
2023-10-02 12:08:04 +00:00
|
|
|
export FILEREADER="sioyek"
|
Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).
Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)
Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00
|
|
|
export FILEMANAGER="vifm"
|
|
|
|
|
|
|
|
## gopath
|
2023-01-31 09:15:10 +00:00
|
|
|
export GOPATH="$HOME/.cache/gopath"
|
Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).
Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)
Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00
|
|
|
export PATH="$PATH:$GOPATH/bin"
|
|
|
|
|
|
|
|
## LANG LOCALE UTF-8
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
export LANG="en_US.UTF-8"
|
2020-05-28 12:22:31 +00:00
|
|
|
|
|
|
|
# if we forgot to set it treat bash as default
|
2023-07-21 18:17:22 +00:00
|
|
|
export SHELL="${SHELL:-/bin/bash}"
|
2020-05-28 12:22:31 +00:00
|
|
|
|
2021-02-19 15:12:06 +00:00
|
|
|
export TERM=xterm-256color
|
2023-10-03 10:59:07 +00:00
|
|
|
# set env var to current shell background luminosity (used by vifm)
|
|
|
|
. dark_bg
|
2020-10-08 09:09:13 +00:00
|
|
|
|
|
|
|
if exist fzf; then
|
2024-06-13 08:19:20 +00:00
|
|
|
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --bind 'tab:toggle+down,shift-tab:toggle+up,ctrl-g:top,ctrl-t:toggle-preview,ctrl-d:preview-half-page-down,ctrl-u:preview-half-page-up' -1 -m --delimiter :"
|
2020-10-08 09:09:13 +00:00
|
|
|
fi
|