about summary refs log tree commit diff stats
path: root/config/ksh/kshrc
diff options
context:
space:
mode:
authorEnsa <psychoticfervor@tuta.io>2020-03-07 07:08:38 -0800
committerEnsa <psychoticfervor@tuta.io>2020-03-07 07:08:38 -0800
commitc4632455cff4a5097a3a35ad9d0531388776d028 (patch)
treed31eb3b660ef94decb06c407057d1cdb2532cd25 /config/ksh/kshrc
parent8fa69fc68072910f855958b3b79360ede1a32682 (diff)
downloadcfg-c4632455cff4a5097a3a35ad9d0531388776d028.tar.gz
ksh config update
synopsis: now utilizes FPATH instead of one functions file, relocated
more into kshrc, fancy prompt

prompt.ksh
	formerly zz-prompt.ksh, now doesn't need a weird name because
	i'm not using loops to load in config files.
	prompt.ksh provides a different appearance than the previous
	PS1, and has a section for displaying the git repo branch if PWD
	is a git repo.
	it also now uses a (commented out) reference table for ANSI
	escape codes because variable names were too long.
kshrc
	now simply loads shrc from ~/.config instead of setting up the
	XDG vars in advance
	uses FPATH pointing to config/ksh/functions
	poured in exports.ksh, changed one export to a normal variable
	because it wasn't needed
	checks for /usr/X11R6 to see if MANPATH should be what works on
	openbsd
	now uses checkloads for all config files instead of for file in
funcions/
	WIP zone, a lot of this isn't named properly yet but
	everything's contents should be self-explanatory
Diffstat (limited to 'config/ksh/kshrc')
-rw-r--r--config/ksh/kshrc23
1 files changed, 16 insertions, 7 deletions
diff --git a/config/ksh/kshrc b/config/ksh/kshrc
index abf9bf0..bd8f48b 100644
--- a/config/ksh/kshrc
+++ b/config/ksh/kshrc
@@ -1,22 +1,31 @@
 #!/bin/ksh
-export XDG_CACHE_HOME=${XDG_CACHE_HOME:=~/.cache}
-export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=~/.config}
-export XDG_DATA_HOME=${XDG_DATA_HOME:=~/.local/share}
-. $XDG_CONFIG_HOME/shrc
+. $HOME/.config/shrc
 KSHCONFIG="$XDG_CONFIG_HOME/ksh"
 if ! echo "$PATH"|grep -q ".local/bin"; then
   export PATH="$HOME/.local/bin:$PATH"
 fi
+FPATH=$XDG_CONFIG_HOME/ksh/functions
 
 HISTFILE=$XDG_DATA_HOME/ksh/histfile
 HISTSIZE=5000
 HISTCONTROL="ignoredups"
 TMPDIR=$XDG_CACHE_HOME/ksh
+# shortcut for cloning
+GITHUB="https://github.com"
+# make pfetch show what i want
+export PF_INFO="ascii title os host shell editor wm pkgs uptime palette"
+# fix manpath so local man pages work
+# crude *bsd detection
+if [[ -d /usr/X11R6 ]]; then
+export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$XDG_DATA_HOME/man"
+else
+export MANPATH="/usr/share/man:/usr/local/share/man:$XDG_DATA_HOME/man"
+fi
+set -o vi
 
 #load ksh external configs
-for file in $KSHCONFIG/*.ksh; do
-	. "$file"
-done
 . $XDG_CONFIG_HOME/lf/lfcd.sh
 [[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases"
 [[ -f "$XDG_CONFIG_HOME/aliasrc" ]] && . "$XDG_CONFIG_HOME/aliasrc"
+[[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh"
+[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh"