summaryrefslogtreecommitdiff
path: root/shrc
diff options
context:
space:
mode:
Diffstat (limited to 'shrc')
-rw-r--r--shrc40
1 files changed, 33 insertions, 7 deletions
diff --git a/shrc b/shrc
index 2632b06..876f8d4 100644
--- a/shrc
+++ b/shrc
@@ -1,4 +1,4 @@
-# # be paranoid
+ # be paranoid
alias rm='rm -i'
alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build"
@@ -6,19 +6,30 @@ alias e="$EDITOR"
alias g="git"
alias grep="ugrep"
alias tldr="NO_COLOR=1 tldr"
-alias fd="find . -name $1*"
alias dedoc="dedoc --color off"
alias doc="dedoc --color off search"
alias kill-sessions="tmux kill-session -a"
+alias restart-wifi="doas /usr/sbin/service netif restart"
+alias de='. ./.envrc'
-kill-unattached() {
+optimizeimg() {
+ convert -strip -quality 85% $1 $2
+}
+
+
+killunattached() {
tmux list-sessions -F '#{session_attached} #{session_id}' | \
awk '/^0/{print $2}' | \
xargs -n 1 tmux kill-session -t
}
refs() {
- recsel -q $1 ~/refs.rec
+ recsel -q $1 ~/personal-db/refs.rec
+}
+
+# Remove trailing newlines
+cleartrail() {
+ cat $1 | tr -d '\n'
}
addref() {
@@ -26,16 +37,31 @@ addref() {
cat /tmp/description | xargs -I {} recins refs.rec -f Title -v $1 -f Tags -v $2 -f Text -v {}
}
+isrootprompt() {
+ CURR="$(id -u)"
+ case "$CURR" in
+ "0") echo "#"
+ ;;
+ *) echo "$"
+ ;;
+ esac
+}
+
notes() {
grep -i "$1" --format='%f%~' ~/notes/ | xargs -I {} cat {}
}
-#eval "$(opam env)"
echo "BAT: $(apm -l), $(apm -b)"
set -o vi
-export PS1='\W \$ '
+eval "$(direnv hook bash)"
+
+PS1='${PWD##*/} $(isrootprompt) '
eval "$(zoxide init posix --hook prompt)"
-#[[ $TERM != "tmux-256color" ]] && exec tmux
+
+
+
+
+[ $(tty) == "/dev/ttyv0" ] && exec startx