dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit c798cd6e2c4b7bd503d2b8963708948b74035f8f
parent 9de96a1877090ae4f049ba6710d226e5a50a29ed
Author: hhvn <dev@hhvn.uk>
Date:   Fri, 15 Apr 2022 11:56:59 +0100

Remove old ksh configs

Diffstat:
D.config/ksh/alias | 92-------------------------------------------------------------------------------
D.config/ksh/kshrc | 33---------------------------------
D.config/ksh/less | 9---------
D.config/ksh/ls | 3---
D.config/ksh/man | 8--------
D.config/ksh/prompt | 61-------------------------------------------------------------
6 files changed, 0 insertions(+), 206 deletions(-)

diff --git a/.config/ksh/alias b/.config/ksh/alias @@ -1,92 +0,0 @@ -#!/bin/ksh - -alias less="\less -R" -mkcd(){ - mkdir -p $1 - cd $1 -} -uncd(){ - cd $OLDPWD -} -irclog(){ - [ -z $1 ] && ls $HOME/.cache/irclogs && return - [ -f $HOME/.irssi/log2ansi.pl ] && log2ansi=$HOME/.irssi/log2ansi.pl\ --clear - [ -f $HOME/.config/irssi/log2ansi.pl ] && log2ansi=$HOME/.config/irssi/log2ansi.pl\ --clear - echo "$1" | grep '/' >/dev/null && dir=$1 || dir=$HOME/.cache/irclogs/$1 - cat $(find $dir | sed -E 's/(..)-(..)-(..)/\3-\2-\1/g' | sort | sed -E 's/(..)-(..)-(..)/\3-\2-\1/g') | ${log2ansi:-cat}| less -} -alias q="exit" -alias duf="duf -style ascii" -alias g="git" -alias vsplit="vim -O" -alias split="vim -o" -alias b="git branch" -alias l="\ls --color=auto -Fh" -alias ls="\ls --color=auto" -alias d="\ls --color=auto -FCash" -alias la="\ls --color=auto -FAh" -alias ll="\ls --color=auto -Flh" -alias lla="\ls --color=auto -FlAh" -alias r="\rm" -alias rr="\rm -rf" -alias v="nvim" -alias c="\clear" -alias f="\find" -alias xi="doas xbps-install" -alias xiu="doas xbps-install -S; doas xbps-install -yu xbps; doas xbps-install -yu; doas xbps-remove -Ooy; rm -rf ~/.cache ~/.mozilla ~/.local/share/webkitgtk ~/.viminfo ~/.wget-hsts ~/.lesshst ~/.sh_history ~/.python_history ~/.*history ~/.*hst* ~/.dbus ~/.w3m ~/.config/vimb/cookies.db; doas vkpurge rm all" -alias xq="doas xbps-query" -alias xr="doas xbps-remove" -alias wget="\wget --hsts-file="/dev/null"" -alias pipes="\pipes -R -r 10000 -c 10 -c 11 -c 12 -c 13 -c 14 -c 15 -s 15" -alias clock="tty-clock -s -c -C 7" -alias ytdl="youtube-dl --add-metadata -ic" -alias ytdla="youtube-dl --add-metadata -xic" -alias map="telnet mapscii.me" -alias irssi="\irssi --home ~/.config/irssi/" -alias zsleep="doas zzz" -alias hibernate="doas ZZZ" -alias rmst="bash ~/.scripts/random/gnulinux.sh" -alias vimb="\vimb --no-maximize" -alias mkconfall="mkmailpass; mkalias" -alias nm="export ESCDELAY=5; neomutt" -alias maic="doas make install clean" -alias homesync="rsync --port 22 --delete -azPe 'ssh -p 222' --exclude=general --exclude=.cache --exclude=.local/cache $HOME/ void@192.168.1.20:/home/void/homedir/" -alias tmux="\tmux -f $HOME/.config/tmux/config" -alias notes="vim ~/.local/notes" -alias fwknop="fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full" -alias edconf="nvim ~/.config/zsh/.zshrc" -alias gnu.matrix="fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full -sn gnu.matrix && ssh gnu.matrix" -alias rss="sfeed_update $XDG_CONFIG_HOME/sfeed/config && . $XDG_CONFIG_HOME/sfeed/config && sfeed_curses $HOME/.local/sfeed/*" -alias irc="(sleep 1 && xdotool type 'tmux a' && xdotool key Return) & ssh local" -alias gpg="\gpg --armour" -alias sloccount="mkdir -p $HOME/.local/sloccount; \sloccount --datadir $HOME/.local/sloccount" -alias sloccountd="mkdir -p $HOME/.local/sloccount; \sloccount --details --datadir $HOME/.local/sloccount" -alias ~d="cd ~/general/downloads; ls" -alias ~do="cd ~/general/documents; ls" -alias ~iw="cd ~/images/wallpapers; ls" -alias ~i="cd ~/images; ls" -alias ~v="cd ~/videos; ls" -alias ~m="cd ~/music; ls" -alias ~w="cd ~/work; ls" -alias ~c="cd ~/.config; ls" -alias ~s="cd ~/.scripts; ls" -alias ~sb="cd ~/.scripts/bin; ls" -alias ~sbdi="cd ~/.scripts/bin/display; ls" -alias ~sbdm="cd ~/.scripts/bin/dmenu; ls" -alias ~sbi="cd ~/.scripts/bin/i3; ls" -alias ~sbm="cd ~/.scripts/bin/misc; ls" -alias ~="cd" -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias .....="cd ../../../.." -alias ......="cd ../../../../.." -alias .......="cd ../../../../../.." -alias ........="cd ../../../../../../.." -alias .........="cd ../../../../../../../.." -alias ..........="cd ../../../../../../../../.." -alias ...........="cd ../../../../../../../../../.." -alias ............="cd ../../../../../../../../../../.." -alias bbs="printf '\n%s\n%s\n\n' 'hhvn' \"$(dpass bbs.hlirc.net)\" | cat - /dev/tty | nc bbs.hlirc.net 23" -alias camerasync="rsync -azP /mnt/DCIM/* ~/general/images/byme" -alias wtf="\wtf -o" diff --git a/.config/ksh/kshrc b/.config/ksh/kshrc @@ -1,33 +0,0 @@ -#!/bin/ksh - -[ -z $ENV ] && export ENV=$HOME/.profile - -seteditor(){ - command -v $1 >/dev/null && export EDITOR=$1 - set vi -} - - -seteditor vi -seteditor vis -seteditor vim -seteditor nvim - -settitle(){ - # set terminal's title - printf "\[\033]0;%s\007\]" "$@" -} - -PS1="\$(__ksh_prompt \$? | __prompt_strip)\$(settitle ksh | __prompt_strip)" -PS2="$(tput setaf 7):; $(tput sgr0)" -PS3="$(tput setaf 7):; $(tput sgr0)$(tput el) " -PS4="$(tput setaf 7):; $(tput sgr0)" - -export PS1 PS2 PS3 PS4 - -export PATH="$HOME/.scripts:$PATH" - -for f in $HOME/.config/ksh/* -do - [ "$(basename "$f")" != "kshrc" ] && . $f -done diff --git a/.config/ksh/less b/.config/ksh/less @@ -1,9 +0,0 @@ -#!/bin/ksh - -export LESS_TERMCAP_mb=$(printf '\033[1;31m') -export LESS_TERMCAP_md=$(printf '\033[1;35m') -export LESS_TERMCAP_me=$(printf '\033[0m') -export LESS_TERMCAP_so=$(printf '\033[92m') -export LESS_TERMCAP_se=$(printf '\033[0m') -export LESS_TERMCAP_us=$(printf '\033[1;32m') -export LESS_TERMCAP_ue=$(printf '\033[0m') diff --git a/.config/ksh/ls b/.config/ksh/ls @@ -1,3 +0,0 @@ -#!/bin/ksh - -export LS_COLORS=$(tr -d ' ' <$HOME/.config/ls | tr '\n' ':' | tr -s ':') diff --git a/.config/ksh/man b/.config/ksh/man @@ -1,8 +0,0 @@ -#!/bin/ksh - -mantmp(){ - sed "s~HOME~$HOME~g" < $HOME/.config/man.conf > /tmp/man.conf -} - -alias man="mantmp; \man -C /tmp/man.conf" -alias apropos="mantmp; \apropos -C /tmp/man.conf" diff --git a/.config/ksh/prompt b/.config/ksh/prompt @@ -1,61 +0,0 @@ -#!/bin/ksh - -# Fuck GNU -# For some reason I can't get grep to ignore "binary" files with POSIXLY_CORRECT -grep --version 2>/dev/null | grep 'GNU' >/dev/null && __ksh_prompt_gnu_binary="a" - -# use \[..\] to prevent counting -__prompt_col(){ - printf '\[%s\]' "$(tput setaf $1)" -} - -__prompt_strip(){ - echo "$0" | grep -v ksh >/dev/null && { - sed 's/\\\[//g;s/\\\]//g' - } || cat -} - -__ksh_prompt(){ - __prompt_col 14 - printf "\[%%%$(echo "$(tput cols) - 1" | bc)s\r\]" - - __ksh_prompt_errorcode=$1 - # tput setaf 10 >/dev/null - [ $__ksh_prompt_errorcode -eq 0 ] && __prompt_col 15 || __prompt_col 10 - printf '%s ' "$__ksh_prompt_errorcode" - __prompt_col 5 - printf "%s " "$(whoami)" - [ "$_PROMPT_GIT" = "y" ] && { - __prompt_col 3 - printf "%s" $(git branch 2>/dev/null | grep '^*' | awk '{print $2 "|"}') - __ksh_prompt_diff=$(git diff 2>/dev/null) - [ $? -eq 0 ] && { - echo "$__ksh_prompt_diff" | grep '.' >/dev/null && __prompt_col 8 || __prompt_col 15 - printf "%s+" $(echo "$__ksh_prompt_diff" 2>/dev/null | grep -${__ksh_prompt_gnu_binary}E '^(\+\+\+|---)' | sed -E 's~^[^a]*a/|^[^b]*b/~~' \ - | grep -v /dev/null | uniq | wc -l | tr -d '\n' | grep '.' || printf 0) - __ksh_prompt_log=$(git log --pretty=format:"commit %h%d") - printf '%s\n' "$__ksh_prompt_log2" | head -n 1 | grep -v '.*\/.*' >/dev/null && __prompt_col 14 && { - printf '%s\n' "$__ksh_prompt_log" | awk -v "c=0" ' - /^commit/ { - if ($0 ~ /\//) { - printf("%d", c) - exit - } else c += 1 - }' - printf '^' - } - printf ' ' - } - } - __prompt_col 7 - printf "%s " "$(pwd | sed "s-$HOME-~-")" - echo "$0" | grep -v ksh >/dev/null && { - printf "($(basename $0))" - } - printf "$\[ \]" # uncount an additional char - printf '\[%s\]' "$(tput sgr0)" -} - -export _PROMPT_GIT=y -alias hide_git="export _PROMPT_GIT=n" -alias show_git="export _PROMPT_GIT=y"