etc/dot/file/profile

137 lines
3 KiB
Text
Raw Normal View History

2020-11-04 02:03:20 +03:00
#!/bin/sh
2024-02-21 15:47:10 +03:00
#
# Profile of Surdeus.
2024-07-11 10:28:52 +03:00
#
reload-profile(){
. $PROFILE
}
2020-11-04 02:03:20 +03:00
2024-07-12 18:54:58 +03:00
no-output() {
$@ &> /dev/null
}
sctl(){
systemctl $@
}
jctl(){
journalctl $@
}
2024-07-12 18:40:54 +03:00
export-loop(){
2020-11-04 02:03:20 +03:00
# 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.
2024-04-06 17:43:22 +03:00
while test -n "$1" ; do
2020-11-04 02:03:20 +03:00
# Doing until we have arguments.
value="$(eval echo $2)"
name="$1"
export "$name"="$value"
shift 2
done
}
2024-07-12 18:40:54 +03:00
source-if-exist() {
for i in $@ ; do
if test -r "$i" ; then
. "$i"
fi
done
}
2024-04-06 17:43:22 +03:00
if test "$OS" != "Windows_NT" ; then
2023-08-30 11:13:45 +03:00
PATH="$HOME/exe:$HOME/.local/bin:$PATH"
fi
2024-07-18 18:01:51 +03:00
# Custom.
export APP="$HOME/app"
export BIN="$HOME/bin"
export LOAD="$HOME/load"
export ETC="$HOME/etc"
export PATH="$PATH:$BIN"
export GIT="https://surdeus.su"
export DEV="$HOME/dev"
2024-07-18 18:01:51 +03:00
# CLI.
export ENV="$HOME/.shrc"
export PROMPT="; "
export PS1="$PROMPT"
export SUDO_PROMPT="# "
export EDITOR=`bb which nvim vim vi ed`
export VISUAL="$EDITOR"
export GIT_EDITOR="$VISUAL"
export PAGER=`bb which less more`
export MANPAGER="$PAGER"
export CMDHIST="$ETC/cmds"
export CMDHISTMAX="100"
export PROFILE="$HOME/.profile"
export ENVDIR="$HOME/env"
export SETENV="$ETCsetenv/sh"
export LOGIN="$ETC/login/sh"
export INDENT=" "
# XDG.
export XDG_UTILS_DEBUG_LEVEL='3'
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/dat"
export PERSONAL_SHELL="sh"
export VIMRC="$HOME/.vimrc"
export XKB_DEFAULT_OPTIONS="caps:escape"
export SSH_ASKPASS=''
# Golang.
export GOPATH="$APP/go"
export GOBIN="$BIN"
export PATH="$PATH:$GOBIN"
# X/Wayland stuff.
export XCOMPOSER='river'
export XTERMINAL='wayst'
export XRUNNER='fuzzel'
export XDMENU='fuzzel -d'
export XBAR='waybar'
export XBLUETOOTH_MANAGER='blueman-manager'
export XOUTPUT_DAEMON='kanshi'
export XSOUND_CONTROL='pavucontrol'
export XFILE_MANAGER='thunar'
export XRESOURCE_MONITOR="$XTERMINAL -e htop"
export XCALENDAR="$XTERMINAL -e calcurse"
export XPUSH_NOTIFICATION_DAEMON='dunst'
export XNOTIFY='dunstify'
export XLOCKER='swaylock'
export XSUSPEND='systemctl suspend'
export XCLIPBOARD_MANAGER='clipman store'
export XEDITOR="`bb which nvim-qt`"
export XCLIPBOARD_TOOL="clipman pick --tool=CUSTOM --tool-args='$XDMENU'"
export XDISPLAY_REGION="slurp"
export XDISPLAY_SCREENSHOT="grim"
export XDISPLAY_REGION_SCREENSHOT='slurp | grim -g - - | wl-copy'
2024-07-26 01:31:29 +03:00
export XVIDEO_PLAYER='mpv'
export XLINK_VIDEO_PLAYER='mpv'
2024-07-18 18:01:51 +03:00
# Android.
export ANDROID_HOME="$HOME/app/android/Sdk"
#export ANDROID_SDK_HOME="$HOME/app/android-sdk"
export ANDROID_USER_HOME=$XDG_CONFIG_HOME/android
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools"
#export PATH="$PATH:$ANDROID_SDK_HOME/cmdline-tools/*/bin"
2024-07-15 21:40:20 +03:00
2024-07-12 18:40:54 +03:00
source-if-exist "$ETC/script/lf.sh"
test -r $SETENV && . "$SETENV" && setenv profile
2020-11-04 02:03:20 +03:00
2024-06-23 14:45:24 +03:00
# Visual editor.
2024-07-12 18:54:58 +03:00
if no-output which bb ; then
2024-06-23 14:45:24 +03:00
ve() {
2024-03-03 23:02:04 +03:00
`bb which nvim vim vi` $@
}
fi
2024-07-18 18:01:51 +03:00
2022-09-05 18:07:23 +03:00
export GPG_TTY=$(tty)
2022-09-06 19:17:21 +03:00
export SSH_TTY=$(tty)
2022-09-05 18:07:23 +03:00