#!/bin/sh # # Profile of Surdeus. # reload-profile(){ . $PROFILE } sctl(){ systemctl $@ } jctl(){ journalctl $@ } export_loop(){ # Chore, because I'm lazy to type "export" so many times. # Standard "export" command takes arguments # from variables from the start, but I want to # use other variables in definition for next of them. while test -n "$1" ; do # Doing until we have arguments. value="$(eval echo $2)" name="$1" export "$name"="$value" shift 2 done } if test "$OS" != "Windows_NT" ; then PATH="$HOME/exe:$HOME/.local/bin:$PATH" fi # Standard variables. export_loop \ ETC '$HOME/etc' \ ENV '$HOME/.shrc' \ PROMPT '"; "' \ PS1 '"$PROMPT"' \ SUDO_PROMPT '"# "' \ EDITOR '`bb which vim vi ed`' \ VISUAL 'bb which nvim-qt $EDITOR' \ GIT_EDITOR '$VISUAL' \ PAGER '`bb which less more`' \ MANPAGER '$PAGER' \ \ CDHIST '$ETC/cds' \ CDHISTMAX '50' \ \ CMDHIST '$ETC/cmds' \ CMDHISTMAX '100' \ PROFILE '$HOME/.profile' \ ENVDIR '$HOME/env' \ SETENV '$ETCsetenv/sh' \ LOGIN '$ETC/login/sh' \ INDENT '" "'\ \ GOPATH '$HOME/app/go' \ GOBIN '$HOME/exe'\ XDG_UTILS_DEBUG_LEVEL '3'\ XDG_CONFIG_HOME '$HOME/.config' \ GIT 'https://surdeus.su' \ PERSONAL_SHELL 'sh' \ VIMRC '$HOME/.vimrc'\ XKB_DEFAULT_OPTIONS 'caps:escape' \ \ XCOMPOSER 'river' \ XTERMINAL 'wayst' \ XRUNNER 'fuzzel' \ XBAR 'waybar' \ XBLUETOOTH_MANAGER 'blueman-manager' \ XOUTPUT_DAEMON 'kanshi' \ XSOUND_CONTROL 'pavucontrol' \ XFILE_MANAGER 'thunar' \ XRESOURCE_MONITOR '$XTERMINAL -e htop' \ XCALENDAR '$XTERMINAL -e calcurse' \ SSH_ASKPASS ''\ test -r $SETENV && . "$SETENV" && setenv profile test -r $HOME/lib/script/lf.sh && . $HOME/lib/script/lf.sh # Visual editor. if which bb ; then ve() { `bb which nvim vim vi` $@ } fi export GPG_TTY=$(tty) export SSH_TTY=$(tty)