]> git.armaanb.net Git - dotfiles.git/commitdiff
Import changes from laptop
authorArmaan Bhojwani <me@armaanb.net>
Sun, 21 Nov 2021 03:15:40 +0000 (22:15 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 21 Nov 2021 03:16:09 +0000 (22:16 -0500)
.cwmrc
.gitconfig
.kshrc
.profile [new file with mode: 0644]

diff --git a/.cwmrc b/.cwmrc
index 53b6872e76824769f2aa5e6177f3bc7a2c982580..42113a4a54d6e6ef50a82c50c79b08b30ad14604 100644 (file)
--- a/.cwmrc
+++ b/.cwmrc
@@ -4,7 +4,6 @@ color activeborder purple
 bind-mouse M-3 window-resize
 
 command firefox firefox-esr
-command cmus "xterm -e cmus"
 command xterm xterm
 
 ignore xclock
index ae26d6e96ca4f935e0bede441fcad7933a27ae38..5bd28d4981169a4578f9f664e239cafa43423c93 100644 (file)
@@ -1,11 +1,33 @@
-[color]        
-       ui = false
-       branch = false
-       diff = false
-       interactive = false
-       status = false
-       log = false
-
 [user]
        name = Armaan Bhojwani
        email = me@armaanb.net
+
+[init]
+       defaultBranch = main
+
+[sendemail]
+       smtpserver = smtp.mailbox.org
+       smtpuser = me@armaanb.net
+       smtpencryption = ssl
+       smtpserverport = 465
+       confirm = auto
+
+[submodule]
+       recurse = true
+
+[alias]
+       sclean = clean -dfX
+       quickfix = commit --amend --no-edit
+       subup = submodule update --remote
+       push-all = !git remote | xargs -L1 git push --all
+
+[commit]
+       verbose = true
+
+[add "interactive"]
+       usebuiltin = true
+
+[imap]
+       folder = Drafts
+       host = imaps://imap.mailbox.org
+       user = me@armaanb.net
diff --git a/.kshrc b/.kshrc
index d272cd6b29768c82e59b6be6202d017416781a13..87a08905a99e1dc599925b9d7ed71a3c49c2d145 100644 (file)
--- a/.kshrc
+++ b/.kshrc
@@ -1,29 +1,80 @@
+[ $(hostname) = "alcatraz.armaanb.net" ] && {
+       date
+       apm | head -n 1
+}
+
 set -o vi
-ulimit -c unlimited
-alias rsync="openrsync -rv"
-export CDPATH=:~
+
+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'
+
+alias rsync='openrsync -rv'
+
+ufile() {
+    [ "$(file -bi "$1")" = "text/plain" ] && ext="txt"
+    ext=$(printf "%s" "$1" | awk -F . '{print $NF}')
+    fname="$(basename ${2:-tmp$RANDOM.$ext})"
+    rsync "$1" "l.armaanb.net:/var/www/htdocs/l.armaanb.net/$fname"
+    printf "https://l.armaanb.net/%s\n" "$fname" | xclip && \
+       xclip -o
+}
+
+export GPG_TTY="$(tty)"
+export CDPATH=":~"
+
 alias ls="LC_COLLATE=C ls -lhF"
-alias rm="rm -iv"
+alias df="df -h"
+alias du="du -h"
 alias cp="cp -riv"
-alias mv="mv -iv"
-alias grep="grep -in"
-alias nl="nl -b all"
-alias rclone="rclone -P"
+alias rm='rm -iv'
+alias mv='mv -iv'
+alias ln='ln -v'
+alias grep='grep -in'
+alias mkdir='mkdir -p'
+alias nl='nl -b all'
+alias rclone='rclone -P'
+
+alias ytmusic="youtube-dl --add-metadata --extract-audio \
+       --audio-format vorbis --prefer-ffmpeg --restrict-filenames \
+       -o '%(title)s.%(ext)s'"
 alias mosh="env LC_CTYPE=en_US.UTF-8 mosh"
-alias ytmusic="youtube-dl --add-metadata --extract-audio --audio-format vorbis --restrict-filenames -o '%(title)s.%(ext)s'"
+alias serve="python3 -m http.server"
+alias wttr='curl wttr.in?format="%l+%T\n%C+%t\nSunrise:+%S,+Sunset+%s\n"'
+alias nv="nvim"
+alias dotgit="git --git-dir=~/.local/share/dotfiles --work-tree=~"
 
-stty dsusp undef
+pass() {
+       printf "Master password: "
+       stty -echo
+       read masterpass
+       stty echo
+       sqlcipher .passwords.db -column -cmd "PRAGMA key = \"$masterpass\"" "$1"
+}
+
+plike() {
+       pass "SELECT * FROM p WHERE name LIKE \"%$1%\";"
+}
+
+pget() {
+       pass "SELECT * FROM p WHERE name = \"$1\";"
+}
 
-alias mspdf="groff -Tpdf -M ~/var/docs -ms -macheam"
+pinsert() {
+       printf "New password: "
+       stty -echo
+       read newpass
+       stty echo
+       pass "INSERT INTO p VALUES (\"$1\", \"$2\", \"$newpass\");"
+}
 
-rpdf() {
-       tmp=/tmp/rpdf${RANDOM}.pdf
-       mspdf $1 > $tmp
-       zathura $tmp &
-       fwa $1 | while read; do mspdf $1 > $tmp; done
-       rm -f $tmp
+pgen() {
+       tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/urandom \
+               | fold -w 20 \
+               | head -n 1
 }
 
+
 dosa() {
        echo "Dosa! Yum yum yum"
        doas $@
@@ -35,6 +86,4 @@ watch() {
        fwa $inp | while read; do $@; done
 }
 
-alias wttr='curl wttr.in?format="%l+%T\n%C+%t\nSunrise:+%S,+Sunset+%s\n"'
-alias nv="nvim"
-alias dotgit="git --git-dir=~/.local/share/dotfiles --work-tree=~"
+stty dsusp undef
diff --git a/.profile b/.profile
new file mode 100644 (file)
index 0000000..f13b29d
--- /dev/null
+++ b/.profile
@@ -0,0 +1,5 @@
+PATH=$HOME/src/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
+ENV="$HOME/.kshrc"
+CFLAGS="-W -Wall -Wextra -g"
+MAKEFLAGS="-j4"
+export PATH HOME TERM ENV CFLAGS MAKEFLAGS