diff options
author | Ensa <@> | 2020-05-01 17:39:45 -0700 |
---|---|---|
committer | Ensa <@> | 2020-05-01 17:39:45 -0700 |
commit | 2b52ba86897ed947976d560fc1a1eb1a8499c451 (patch) | |
tree | d1a0d2d82a7907d308b99bbd3fc827cfad20f981 /config/ksh | |
parent | c4632455cff4a5097a3a35ad9d0531388776d028 (diff) | |
download | cfg-2b52ba86897ed947976d560fc1a1eb1a8499c451.tar.gz |
cwm added, general updates, etc
bother made the WM detection and X startup file detection more robust comm-sel replaced 6cord with cordless made the default case do nothing so it's less annoying lh removed ipc-server garbage changed the audio group to allow for streaming audio to mpv (this works with livestream audio files) mbsync-cron moved config file to $XDG_CONFIG_HOME/mbsync/mbsyncrc made error exits actually error (helps with crontab -n) renamed old popmail touch file to something more nominally appropriate same with notify-send --app-name cwmrc reading it, DEPENDENCIES.md, and `man cwmrc` will more than explain everything in here. except the commented binds, these are behaviours cwm does not have. completions.ksh self-explanatory. read it. diraliases added ~bin for user binaries dir added ~ksh for ksh config dir added ~pass for password database kshrc added safeguards for ensuring used directories exist switched lfcd source to a test and source prompt.ksh better sep symbols git branch occupies less space lfrc added auto-upload to ttm.sh, bound to t init.vim switched colourscheme to zellner removed syntastic checker specifiers, now uses aggregate checks. syntastic_c_compiler set to cc, symlink your preferred compiler to ~bin/cc switched ectags to ctags enabled folds shrc ALTSCR: terminal you want to use for programs that already have scrollback. set to "$TERMINAL" if you don't have one. fiddled with LESS, hopefully better now $TODO is the file todo(1) uses. ENV: file ksh sources on startup. 6cord.toml removed because it's abandoned now. colors-wal-dwm.h removed because i don't use dwm anymore. dunstrc, zathurarc now uses cozette font
Diffstat (limited to 'config/ksh')
-rw-r--r-- | config/ksh/completions.ksh | 44 | ||||
-rw-r--r-- | config/ksh/diraliases | 4 | ||||
-rw-r--r-- | config/ksh/kshrc | 8 | ||||
-rw-r--r-- | config/ksh/prompt.ksh | 6 |
4 files changed, 57 insertions, 5 deletions
diff --git a/config/ksh/completions.ksh b/config/ksh/completions.ksh new file mode 100644 index 0000000..d241be8 --- /dev/null +++ b/config/ksh/completions.ksh @@ -0,0 +1,44 @@ +#!/bin/ksh + +COMPLETIONFILES="$XDG_CACHE_HOME/ksh/precompletions" +if ! [[ -d $COMPLETIONFILES ]]; then + mkdir -p $COMPLETIONFILES; +fi +#pkg_* completions {{{1 +if ! [[ -e $COMPLETIONFILES/packages ]]; then + update_completion_packages +fi + +#set -A complete_pa -- $(<$COMPLETIONFILES/packages) +set -A complete_pd -- $(ls -1 /var/db/pkg) +#set -A complete_pi -- $complete_pa + +# }}} + +#man completions {{{2 +if ! [[ -e $COMPLETIONFILES/manpages ]]; then + update_completion_manpages +fi + +#set -A complete_man -- $(<$COMPLETIONFILES/manpages) + + +# }}} + +# pip completions {{{3 + +set -A complete_pip_1 -- install download uninstall freeze list show check config search wheel hash help +set -A complete_pip_2 -- --user +set -A complete_pip_3 -- --upgrade + +# pass completions +update_complete_pass() { + pass_list=$(pass ls) + set -A complete_pass_1 -- init passphrase add import show export ls + set -A complete_pass_2 -- $pass_list +} +update_complete_pass +pass_export() { pass export "$1" && update_complete_pass; } +pass_show() { pass show "$1" && update_complete_pass; } + +# }}} diff --git a/config/ksh/diraliases b/config/ksh/diraliases index f4546a5..99f710d 100644 --- a/config/ksh/diraliases +++ b/config/ksh/diraliases @@ -7,4 +7,6 @@ alias -d "src=$HOME/src"\ "data=$XDG_DATA_HOME"\ "write=$HOME/doc/writing"\ "crit=$HOME/doc/writing/critique"\ - "bin=$HOME/.local/bin" + "bin=$HOME/.local/bin"\ + "ksh=$HOME/.config/ksh"\ + "pass=$HOME/.local/share/pass" diff --git a/config/ksh/kshrc b/config/ksh/kshrc index bd8f48b..36350d0 100644 --- a/config/ksh/kshrc +++ b/config/ksh/kshrc @@ -7,9 +7,15 @@ fi FPATH=$XDG_CONFIG_HOME/ksh/functions HISTFILE=$XDG_DATA_HOME/ksh/histfile +if ! [[ -d $HISTFILE ]]; then + mkdir -p $HISTFILE; +fi HISTSIZE=5000 HISTCONTROL="ignoredups" TMPDIR=$XDG_CACHE_HOME/ksh +if ! [[ -d $TMPDIR ]]; then + mkdir -p $TMPDIR; +fi # shortcut for cloning GITHUB="https://github.com" # make pfetch show what i want @@ -24,7 +30,7 @@ fi set -o vi #load ksh external configs -. $XDG_CONFIG_HOME/lf/lfcd.sh +[[ -f "$XDG_CONFIG_HOME/lf/lfcd.sh" ]] && . "$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" diff --git a/config/ksh/prompt.ksh b/config/ksh/prompt.ksh index e5dfaf5..c56d441 100644 --- a/config/ksh/prompt.ksh +++ b/config/ksh/prompt.ksh @@ -1,6 +1,6 @@ #!/bin/ksh -SEP="" -RSEP="" +SEP="" +RSEP="" #_PS1='\[\033['; #_END='m\]'; #_CLEAR=0; _FG_BLACK=30; _BG_BLACK=40 @@ -14,7 +14,7 @@ RSEP="" vcs() { if git status >/dev/null 2>&1; then _GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')" - printf ' %s\n' "$_GIT_BRANCH" + printf ' %s' "$_GIT_BRANCH" fi } PS1='\[\033[7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A$RSEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[7;36m\]$SEP\[\033[7m\]\w$RSEP\[\033[0;32m\]$(vcs)\n\[\033[0;32m\]\$\[\033[0m\] ' |