summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-08-02 15:13:36 -0500
committerMarc Coquand <marc@mccd.space>2024-08-02 15:13:36 -0500
commit8bbc8c21c9f79fad95f225f2cec47f4bf59660f2 (patch)
tree842dc5e168b60e9ef82ef702d203d43ad4533518
parent2379dad5972f6cb825d2dc3ac5db99d4b4af3ccf (diff)
downloadbsd-8bbc8c21c9f79fad95f225f2cec47f4bf59660f2.tar.gz
bsd-8bbc8c21c9f79fad95f225f2cec47f4bf59660f2.tar.bz2
bsd-8bbc8c21c9f79fad95f225f2cec47f4bf59660f2.zip
shrc update
-rw-r--r--profile17
-rw-r--r--shrc41
2 files changed, 33 insertions, 25 deletions
diff --git a/profile b/profile
index dfb7e23..0f3b6fc 100644
--- a/profile
+++ b/profile
@@ -1,28 +1,21 @@
-PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin
+# Let sh(1) know it's at home, despite /home being a symlink.
+if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
-PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
-PATH=${PATH}:/home/mccd/go/bin:/home/mccd/.local/bin
-XCURSOR_PATH="/usr/pkg/share/icons"
+# Query terminal size; useful for serial lines.
+if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
-export PATH HOME TERM
-export LANG="en_US.UTF-8"
-export XTERM_LOCALE=en_US.UTF-8
-export LC_ALL=en_US.UTF-8
-export XDG_CONFIG_HOME=/home/mccd/.config
+PATH=${PATH}:/home/mccd/go/bin:/home/mccd/.local/bin:/home/mccd/.cargo/bin
export EDITOR="vim"
export GDK_DPI_SCALE="1.5"
export GDK_SCALE="1.5"
export XCURSOR_SIZE="32"
-export XCURSOR_PATH="/usr/pkg/share/icons"
# So when you hover the desktop, it still uses Adwaita
export XCURSOR_THEME="Adwaita"
export PF_INFO="ascii title os editor shell wm"
export PF_ALIGN="5"
export PF_COLOR="0"
export MOZ_ACCELERATED=1
-export GSETTINGS_SCHEMA_DIR=/usr/pkg/share/glib-2.0/schemas
-
#test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
export XDG_DATA_DIRS=${XDG_DATA_DIRS}:~/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/pkg/share:/usr/local/share
diff --git a/shrc b/shrc
index f4e9f11..af7ee47 100644
--- a/shrc
+++ b/shrc
@@ -1,23 +1,38 @@
-#export HISTFILE="$HOME/.history"
-#alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build"
+# # be paranoid
+# alias cp='cp -ip'
+# alias mv='mv -i'
+ alias rm='rm -i'
+
+# # csh like history on arrow up and down
+bind ^[[A ed-search-prev-history
+bind ^[[B ed-search-next-history
+
+# # ctrl+arrow allow to jump from words to words
+bind "\\e[1;5C" em-next-word
+bind "\\e[1;5D" ed-prev-word
+alias history='fc -l'
+
+# Fix home/del for mobaxterm
+bind ^[[5~ ed-move-to-beg
+bind ^[[6~ ed-move-to-end
+
+alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build"
alias e="$EDITOR"
alias g="git"
alias grep="ugrep"
alias tldr="NO_COLOR=1 tldr"
-alias fd="NO_COLOR=1 fdfind"
-alias de='eval "$(direnv export bash)"'
+alias fd="find . -name $1"
alias f-commit="fossil commit && fossil git export"
alias jrnl='stitch -t :journal:'
-bat()
-{
- BAT=$(envstat -d acpibat0 | grep 'charge:' | awk '{print $6}')
- echo $BAT
-}
+eval "$(opam env)"
-set -o emacs
-set -o promptcmds
-set -o tabcomplete
-PS1='$(id -u) ${PWD##*/} '
+echo "BAT: $(apm -l), $(apm -b)"
+
+set -o vi
eval "$(zoxide init posix --hook prompt)"
+
+PS1='\W \$ '
+
+