.profile (1950B)
1 # Standard options and environment variables 2 set -o vi 3 4 PATH="$HOME/scripts:$PATH" 5 PS1="[\h \W] \$ " 6 export LC_COLLATE="C" 7 8 export HISTCONTROL=ignoredups 9 export HISTFILE=$HOME/.sh_history 10 export HISTSIZE=10000 11 12 # Standard stuff and variables for my scripts 13 export EDITOR=vi 14 export VISUAL=vi 15 export NOTIFY=notify 16 export OPENER=open-file 17 export BROWSER=firefox 18 export XDG_CONFIG_HOME="$HOME/.config" 19 export XDG_DATA_HOME="$HOME/.local/share" 20 export XDG_CACHE_HOME="$HOME/.cache" 21 22 # Program-specific stuff 23 export FZF_DEFAULT_OPTS="-e -i -m --no-bold --no-color --layout=reverse-list" 24 export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg" 25 export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss" 26 export PYTHON_COLORS=0 27 28 # Aliases 29 alias o='open-file' 30 alias f='feed get && feed -m fzf menu' 31 32 alias bc='bc -q /home/sebastiano/box/bc.library' 33 alias rm='trash rm' 34 alias ls='ls --color=auto' 35 alias clip='clip -m fzf' 36 alias svi='vi "+so $HOME/.virc-spaces"' 37 38 # Network management 39 alias w='iwctl station wlan0 get-networks' 40 alias c='iwctl station wlan0 connect' 41 alias e='doas ip link set eth1 up && doas udhcpc -i eth1 -n' 42 alias d='iwctl station wlan0 disconnect' 43 wm() { 44 iwctl station wlan0 get-networks | \ 45 grep '^ ' | sed 's/^ //' | sed 's/ .*//' | grep -v '^$' | \ 46 fzf | xargs iwctl station wlan0 connect 47 } 48 49 # Email management (mblaze) 50 MAIL=$HOME/mail 51 msync() { mbsync -a; } 52 msc() { d=${1:-$MAIL/INBOX}; minc -q $d; mlist -t $d | mthread | mseq -S; mscan; } 53 mget() { mbsync -a; msc; } 54 mtt() { echo $MAIL/Trash | xargs mrefile $@; } 55 mta() { echo $MAIL/Archive | xargs mrefile $@; } 56 mpk() { f=$1; shift; mpick -t "$f =~~ \"$@\""; } 57 s() { mshow $@ | templess; } 58 sht() { mshow -A text/html $@; } 59 n() { mshow .+1 | templess; } 60 61 # nissy build options 62 #export NISSY_BUILD_SANITIZE="address,undefined" 63 64 # Session cookies are kept in .ssh 65 [ -f $HOME/.ssh/sessions ] && . $HOME/.ssh/sessions 66 67 # startx if in tty1 68 [ "$(tty)" = "/dev/tty1" ] && startx