summaryrefslogtreecommitdiff
path: root/shrc
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-09-20 19:11:00 +0300
committerMarc Coquand <marc@mccd.space>2024-09-20 19:11:00 +0300
commitb2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab (patch)
treeace0ee0d7acf2af94839e893d8a3a7e514e185c9 /shrc
parente233e7f028366ce8f5d58fe1cc8a88210664ddb3 (diff)
downloadbsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.tar.gz
bsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.tar.bz2
bsd-b2f56a06a9b6d3c2fdc09b33fbbd568b651d5eab.zip
Diffstat (limited to 'shrc')
-rw-r--r--shrc26
1 files changed, 8 insertions, 18 deletions
diff --git a/shrc b/shrc
index 876f8d4..4d0134c 100644
--- a/shrc
+++ b/shrc
@@ -11,9 +11,12 @@ 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'
+alias logdate='date +"%Y-%m-%d"'
+alias snapshothome='doas zfs snapshot zroot/home@$(logdate)'
+alias commit-all="git add . && git commit -m '.' && git push"
optimizeimg() {
- convert -strip -quality 85% $1 $2
+ magick -strip -quality 85% $1 $2
}
@@ -27,7 +30,6 @@ refs() {
recsel -q $1 ~/personal-db/refs.rec
}
-# Remove trailing newlines
cleartrail() {
cat $1 | tr -d '\n'
}
@@ -37,31 +39,19 @@ 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 {}
}
+ . /home/mccd/.nix-profile/etc/profile.d/nix.sh
-echo "BAT: $(apm -l), $(apm -b)"
+echo "BAT: $(cat /sys/class/power_supply/BAT0/capacity), $(cat /sys/class/power_supply/BAT0/status)"
set -o vi
-eval "$(direnv hook bash)"
+PS1='\W \$ '
-PS1='${PWD##*/} $(isrootprompt) '
eval "$(zoxide init posix --hook prompt)"
-
-
-[ $(tty) == "/dev/ttyv0" ] && exec startx
+[ "$(tty)" == "/dev/tty1" ] && exec startx