~armaan/dotfiles

ref: 5ff6261f4e713665d4318c2263a1c9adf70ad97a dotfiles/.config/sh/shrc -rw-r--r-- 4.0 KiB
5ff6261fArmaan Bhojwani sh: kiss: use xz and doas a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
set -o vi

finger() {
    user=$(echo "$1" | cut -f 1 -d '@')
    host=$(echo "$1" | cut -f 2 -d '@')
    echo $user | nc "$host" 79
}

_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)
    xsel >> "$tmp"
    basetmp=$(echo "$tmp" | tail -c +5)
    _uup "$tmp" "$basetmp"
    _uprint "$basetmp"
    rm -f "$tmp"
}

export EDITOR="vis"
export VISUAL="$EDITOR"
export TERM=dvtm-256color

export GPG_TTY="$(tty)"

export GNUPGHOME="$HOME/.local/share/gnupg"
export GOPATH="$HOME/.local/share/go"
export JUPYTER_CONFIG_DIR="$HOME/.config/jupyter"
export IPYTHON_DIR="$HOME/.local/share/ipython"
export DISTCC_DIR="$HOME/.local/state/distcc"
export SFEED_URL_FILE="$HOME/.local/state/sfeed/read"

export PAGER='less'
export GTK_USE_PORTAL=1
export CDPATH=:~
export LESSHISTFILE=/dev/null

export PASH_KEYID=me@armaanb.net
export PASH_LENGTH=20
export PASH_CLIP=xsel

[ -z "$DISPLAY" ] && {
    export PATH="/home/armaa/src/bin:$PATH"
    export PATH="/home/armaa/src/bin/bin:$PATH"
    export PATH="/home/armaa/.local/bin:$PATH"
    export PATH="/usr/lib/ccache/bin:$PATH"
}

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
export TZ="America/New_York"

export KISS_PATH=""
export KISS_PATH="$KISS_PATH:$HOME/repos/asd/core"
export KISS_PATH="$KISS_PATH:$HOME/repos/asd/extra"
export KISS_PATH="$KISS_PATH:$HOME/repos/asd/xorg"

export KISS_COMPRESS=xz
export KISS_HOOK="$HOME/src/bin/kiss-hook"
export KISS_SU=doas

export CC=clang
export CFLAGS="-O3 -pipe -march=native"
export CXX=clang++
export CXXFLAGS="$CFLAGS -stdlib=libc++"

export MAKEFLAGS="-j$(nproc)"
export CMAKE_GENERATOR="Ninja"

export XDG_DESKTOP_DIR="/dev/null"
export XDG_DOCUMENTS_DIR="$HOME/documents"
export XDG_DOWNLOAD_DIR="$HOME/downloads"
export XDG_MUSIC_DIR="$HOME/music"
export XDG_PICTURES_DIR="$HOME/pictures"
export XDG_VIDEOS_DIR="$HOME/videos"

alias poki='ssh armaanb.net'
alias irc='ssh root@armaanb.net -t abduco -A irc catgirl freenode'
alias union='ssh 192.168.1.18'
alias mine='ssh -p 23 root@pickupserver.cc'
alias tcf='ssh root@204.48.23.68'
alias ngmun='ssh root@157.245.89.25'
alias prox='ssh root@192.168.1.224'
alias ncq='ssh root@143.198.123.17'
alias envs='ssh acheam@envs.net'

alias ls='LC_COLLATE=C ls -lh --group-directories-first'
alias la='ls -A'
alias df='df -h / /boot'
alias du='du -h'
alias free='free -m'
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 kmake='gmake LLVM=1 LLVM_IAS=1 YACC=byacc'

alias crontab='crontab-argh'
alias sudo='doas'
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'
alias gps='gpg --keyserver keyserver.ubuntu.com --search-keys'
alias gpp='gpg --keyserver keyserver.ubuntu.com --recv-key'
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"'

alias cwindows='qemu-system-x86_64 \
  -smp 3 \
  -cpu host \
  -enable-kvm \
  -m 3G \
  -device VGA,vgamem_mb=64 \
  -device intel-hda \
  -device hda-duplex \
  -net nic \
  -net user,smb=/home/armaa/public \
  -drive format=qcow2,file=/home/armaa/virtual/windows.qcow2'

alias words='gen-shell -c "words"'
alias words-e='gen-shell -c "words ~E"'

alias bigrandomfile='dd if=/dev/urandom of=1GB-urandom bs=1M count=1024 \
  iflag=fullblock'
alias bigboringfile='dd if=/dev/zero of=1GB-zero bs=1M count=1024 \
  iflag=fullblock'
alias ytmusic="youtube-dl -x --add-metadata  --audio-format aac \
  --restrict-filenames -o '%(title)s.%(ext)s'"
alias bc='bc -l'