about summary refs log tree commit diff stats
path: root/config/ksh
diff options
context:
space:
mode:
Diffstat (limited to 'config/ksh')
-rw-r--r--config/ksh/completions.ksh46
-rw-r--r--config/ksh/diraliases17
-rw-r--r--config/ksh/functions/l.10
-rw-r--r--config/ksh/functions/man_complete4
-rw-r--r--config/ksh/functions/mc4
-rw-r--r--config/ksh/functions/mpvpin4
-rw-r--r--config/ksh/functions/pcl8
-rw-r--r--config/ksh/functions/pct8
-rw-r--r--config/ksh/functions/pkg_complete5
-rw-r--r--config/ksh/functions/update_completion_manpages8
-rw-r--r--config/ksh/functions/update_completion_packages_obsd8
-rw-r--r--config/ksh/functions/update_completion_pkg_inst_obsd4
-rw-r--r--config/ksh/functions/update_completions6
-rw-r--r--config/ksh/kshrc36
-rw-r--r--config/ksh/prompt.ksh20
15 files changed, 0 insertions, 188 deletions
diff --git a/config/ksh/completions.ksh b/config/ksh/completions.ksh
deleted file mode 100644
index d186615..0000000
--- a/config/ksh/completions.ksh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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
-	set -A complete_pcl_1 -- $pass_list
-	set -A complete_pct_1 -- $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
deleted file mode 100644
index 4b469d6..0000000
--- a/config/ksh/diraliases
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/ksh
-alias -d src=~/src
-alias -d git=~src/vcs
-alias -d vcs=~/local/src
-alias -d conf=$XDG_CONFIG_HOME
-alias -d data=$XDG_DATA_HOME
-alias -d cache=$XDG_CACHE_HOME
-alias -d vis=~conf/vis
-alias -d ksh=~conf/ksh
-alias -d xdg=~/share/xdg
-alias -d doc=~xdg/doc
-alias -d pic=~xdg/pic
-alias -d mus=~xdg/mus
-alias -d vid=~xdg/vid
-alias -d dl=~xdg/dl
-alias -d bin=~/bin
-alias -d pass=~data/pass
diff --git a/config/ksh/functions/l. b/config/ksh/functions/l.
deleted file mode 100644
index e4a759e..0000000
--- a/config/ksh/functions/l.
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/ksh
-function l. {
-	if [[ -n "$1" ]]; then
-		( cd "$1" 2>/dev/null ||\
-			{ echo "$0: $1 - No such directory" >&2 ; exit; }
-		ls -d .* )
-	else
-		ls -d .*
-	fi
-}
diff --git a/config/ksh/functions/man_complete b/config/ksh/functions/man_complete
deleted file mode 100644
index bab26dd..0000000
--- a/config/ksh/functions/man_complete
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/ksh
-man_complete() {
-	set -A complete_man -- $(<~cache/ksh/precompletions/manpages)
-}
diff --git a/config/ksh/functions/mc b/config/ksh/functions/mc
deleted file mode 100644
index db8a46f..0000000
--- a/config/ksh/functions/mc
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/ksh
-mc() {
-	mkdir "$1" && cd "$1";
-}
diff --git a/config/ksh/functions/mpvpin b/config/ksh/functions/mpvpin
deleted file mode 100644
index 7fabc6c..0000000
--- a/config/ksh/functions/mpvpin
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/ksh
-mpvpin() {
-	mpv --no-terminal --title "PIN" "$1" >/dev/null 2>&1 &
-}
diff --git a/config/ksh/functions/pcl b/config/ksh/functions/pcl
deleted file mode 100644
index 42ad224..0000000
--- a/config/ksh/functions/pcl
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/ksh
-function pcl {
-	if [ -z "$2" ]; then
-		pass show "$1"|head -1|xclip -l 1 -r
-	else
-		pass show "$1"|head -1|xclip -sel c -l 1 -r
-	fi
-}
diff --git a/config/ksh/functions/pct b/config/ksh/functions/pct
deleted file mode 100644
index b80abff..0000000
--- a/config/ksh/functions/pct
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/ksh
-function pct {
-	if [ -z "$2" ]; then
-		pass show "$1"|tail -1|xclip -l 1 -r
-	else
-		pass show "$1"|tail -1|xclip -sel c -l 1 -r
-	fi
-}
diff --git a/config/ksh/functions/pkg_complete b/config/ksh/functions/pkg_complete
deleted file mode 100644
index 2664527..0000000
--- a/config/ksh/functions/pkg_complete
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/ksh
-pkg_complete() {
-	set -A complete_pa -- $(<~cache/ksh/precompletions/packages)
-	set -A complete_pi -- $complete_pa
-}
diff --git a/config/ksh/functions/update_completion_manpages b/config/ksh/functions/update_completion_manpages
deleted file mode 100644
index dc4e77a..0000000
--- a/config/ksh/functions/update_completion_manpages
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/ksh
-update_completion_manpages() {
-	rm $XDG_CACHE_HOME/ksh/precompletions/manpages
-	for manpage in $(man -kw Nm~.);
-	do
-		basename $manpage|sed 's/\..*//'>>$XDG_CACHE_HOME/ksh/precompletions/manpages
-	done
-}
diff --git a/config/ksh/functions/update_completion_packages_obsd b/config/ksh/functions/update_completion_packages_obsd
deleted file mode 100644
index 2de477f..0000000
--- a/config/ksh/functions/update_completion_packages_obsd
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/ksh
-update_completion_packages() {
-	if [[ -e /usr/local/share/ports-INDEX ]]; then
-		sed 's/|.*$//' /usr/local/share/ports-INDEX>$XDG_CACHE_HOME/ksh/precompletions/packages
-	else
-		echo "install portslist if you want the completions for pkg_add and pkg_info" > /dev/stderr
-	fi
-}
diff --git a/config/ksh/functions/update_completion_pkg_inst_obsd b/config/ksh/functions/update_completion_pkg_inst_obsd
deleted file mode 100644
index 0442a77..0000000
--- a/config/ksh/functions/update_completion_pkg_inst_obsd
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/ksh
-update_completion_pkg_inst() {
-	ls -1 /var/db/pkg>$XDG_CACHE_HOME/ksh/precompletions/pkg_inst
-}
diff --git a/config/ksh/functions/update_completions b/config/ksh/functions/update_completions
deleted file mode 100644
index cc1e82b..0000000
--- a/config/ksh/functions/update_completions
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/ksh
-update_completions() {
-	update_completion_packages&
-	update_completion_pkg_inst&
-	update_completion_manpages&
-}
diff --git a/config/ksh/kshrc b/config/ksh/kshrc
deleted file mode 100644
index a5b48e0..0000000
--- a/config/ksh/kshrc
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/ksh
-. $HOME/etc/shrc
-KSHCONFIG="$XDG_CONFIG_HOME/ksh"
-FPATH=$XDG_CONFIG_HOME/ksh/functions
-alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'"
-
-HISTFILE=$XDG_DATA_HOME/ksh/histfile
-if ! [[ -d $(dirname $HISTFILE) ]]; then
-	mkdir -p $(dirname $HISTFILE);
-fi
-HISTSIZE=5000
-HISTCONTROL="ignoredups"
-FCEDIT="$EDITOR"
-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
-export PF_INFO="ascii title os host shell editor wm pkgs 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
-[[ -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"
-[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh"
diff --git a/config/ksh/prompt.ksh b/config/ksh/prompt.ksh
deleted file mode 100644
index 80de942..0000000
--- a/config/ksh/prompt.ksh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/ksh
-SEP="▍"
-RSEP="▐"
-#_PS1='\[\033[';
-#_END='m\]';
-#_CLEAR=0;	_FG_BLACK=30;	_BG_BLACK=40
-#_BRIGHT=1;	_FG_RED=31;	_BG_RED=41
-#_DIM=2;	_FG_GREEN=32;	_BG_GREEN=42
-#_UNDER=4;	_FG_YELLOW=33;	_BG_YELLOW=43
-#_BLINK=5;	_FG_BLUE=34;	_BG_BLUE=44
-#_REVERSE=7;	_FG_MAGENTA=35;	_BG_MAGENTA=45
-#_HIDDEN=8;	_FG_CYAN=36;	_BG_CYAN=46
-#		_FG_WHITE=37;	_BG_WHITE=47
-vcs() {
-	if git status >/dev/null 2>&1; then
-		_GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')"
-		printf ' %s' "$_GIT_BRANCH"
-	fi
-}
-PS1='\[\033[0;7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A\[\033[0;35m\]$SEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[0;36m\]$RSEP\[\033[7m\]\w\[\033[0;36m\]$SEP\[\033[0;32m\]$(vcs)\n\$\[\033[0m\] '