~armaan/dotfiles

bac3f4ed2d45e5a6348534fcefb7e9948d03c426 — Armaan Bhojwani 3 months ago 5c17388 main
Migrate to OpenBSD
5 files changed, 103 insertions(+), 7 deletions(-)

A .Xdefaults
M .config/xmodmap
A .cshrc
A .kshrc
A .xsession
A .Xdefaults => .Xdefaults +4 -0
@@ 0,0 1,4 @@
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm*loginShell:true
xterm*font: -misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1
*visualBell: True

M .config/xmodmap => .config/xmodmap +1 -7
@@ 1,10 1,3 @@
! Unmap left super
clear mod4

! Turn right alt into super
remove mod1 = Alt_R
add mod4 = Alt_R

! Swap caps and control
remove Lock = Caps_Lock
remove Control = Control_L


@@ 14,3 7,4 @@ keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L


A .cshrc => .cshrc +32 -0
@@ 0,0 1,32 @@
# $OpenBSD: dot.cshrc,v 1.10 2020/01/24 02:09:51 okan Exp $
#
# csh initialization

alias df	df -k
alias du	du -k
alias f		finger
alias h		'history -r | more'
alias j		jobs -l
alias la	ls -a
alias lf	ls -FA
alias ll	ls -lsA
alias tset	'set noglob histchars=""; eval `\tset -s \!*`; unset noglob histchars'
alias z		suspend

set path = (~/bin /bin /sbin /usr/{bin,sbin,X11R6/bin,local/bin,local/sbin,games})

if ($?prompt) then
	# An interactive shell -- set some stuff up
	set filec
	set history = 1000
	set ignoreeof
	set mail = (/var/mail/$USER)
	set mch = `hostname -s`
	alias prompt 'set prompt = "$mch:q"":$cwd:t {\!} "'
	alias cd 'cd \!*; prompt'
	alias chdir 'cd \!*; prompt'
	alias popd 'popd \!*; prompt'
	alias pushd 'pushd \!*; prompt'
	cd .
	umask 22
endif

A .kshrc => .kshrc +60 -0
@@ 0,0 1,60 @@
date
apm | head -n 1
set -o vi

alias pman='man -M /usr/local/share/doc/posix/man'
alias papropos='apropos -M /usr/local/share/doc/posix/man'
alias pwhatis='whatis -M /usr/local/share/doc/posix/man'


_uprint() {
    echo "https://l.armaanb.net/$(basename "$1")" | xsel && xsel -o
}

_uup() {
    rsync "$1" "armaa@armaanb.net:/srv/ftp/pub/$2" --chmod 644 --progress
}

ufile() {
    _uup "$1" "$2"
    _uprint "$1"
}

uclip() {
    tmp=$(mktemp)
    xclip -sel c -o >> "$tmp"
    basetmp=$(echo "$tmp" | tail -c +5)
    _uup "$tmp" "$basetmp"
    _uprint "$basetmp"
    rm -f "$tmp"
}

alias plan='T=$(mktemp) && \
        rsync armaanb.net:/home/armaa/plan.txt "$T" && \
        TT=$(mktemp) && \
        head -n -2 $T > $TT && \
        vi $TT && \
        echo >> "$TT" && \
        echo "Last updated: $(date -R)" >> "$TT" && \
        fold -sw 72 "$TT" > "$T"| \
        rsync "$T" armaanb.net:/home/armaa/plan.txt && \
        rm -f "$T"'

export GPG_TTY="$(tty)"
export CDPATH=:~

alias ls="LC_COLLATE=C ls -lh"
alias df="df -h"
alias du="du -h"
alias cp="cp -riv"
alias rm='rm -iv'
alias mv='mv -iv'
alias ln='ln -v'
alias grep='grep -in'
alias mkdir='mkdir -pv'
alias nl='nl -b all'

alias dotgit="git --git-dir=$HOME/.local/share/dotfile-repo --work-tree=$HOME"
alias etcgit="git --git-dir=$HOME/.local/share/etc-repo --work-tree=/"

alias ping='ping -c 10'

A .xsession => .xsession +6 -0
@@ 0,0 1,6 @@
xset +fp /usr/local/share/fonts/spleen/
sct 4500
xset -b
xmodmap $HOME/.config/xmodmap
xcape
cwm