2021-10-17 10:23:29 +00:00
|
|
|
export DATA="$(test -d $HOME/data && echo $HOME/data || echo $HOME/daten)"
|
|
|
|
export MUSIC="$DATA/music"
|
2021-10-22 15:15:09 +00:00
|
|
|
export JOURNAL="$DATA/2-standards/notes/journal"
|
2021-10-17 10:23:29 +00:00
|
|
|
|
2020-06-26 21:27:38 +00:00
|
|
|
# xdg
|
|
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
2021-09-18 20:01:51 +00:00
|
|
|
export XDG_STATE_HOME="$HOME/.local/state"
|
|
|
|
export XDG_CACHE_HOME="$HOME/.local/cache"
|
2020-06-26 21:27:38 +00:00
|
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
2021-07-06 09:53:20 +00:00
|
|
|
export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin"
|
2020-09-04 10:09:08 +00:00
|
|
|
# adjust programs to use xdg
|
2020-12-25 12:51:42 +00:00
|
|
|
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
2021-04-13 15:20:24 +00:00
|
|
|
|
2020-12-23 12:45:13 +00:00
|
|
|
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
|
|
|
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
2021-09-18 20:01:51 +00:00
|
|
|
|
|
|
|
export KDEHOME="$XDG_STATE_HOME"/kdehome
|
|
|
|
export GOPATH="$XDG_STATE_HOME"/go
|
2021-09-24 18:20:29 +00:00
|
|
|
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
2021-10-08 11:05:58 +00:00
|
|
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
2021-04-13 15:20:24 +00:00
|
|
|
|
2020-12-23 12:45:13 +00:00
|
|
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
2021-09-18 20:01:51 +00:00
|
|
|
export RLWRAP_HOME="$XDG_STATE_HOME"/rlwrap
|
|
|
|
|
2021-04-13 15:20:24 +00:00
|
|
|
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
|
|
|
|
export CABAL_DIR="$XDG_CACHE_HOME"/cabal
|
2021-06-19 19:25:10 +00:00
|
|
|
|
|
|
|
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
|
|
|
|
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
|
2021-09-18 20:01:51 +00:00
|
|
|
export BUNDLE_USER_PLUGIN="$XDG_STATE_HOME"/bundle
|
|
|
|
|
|
|
|
export KSCRIPT_CACHE_DIR="$XDG_CACHE_HOME"/kscript
|
2021-06-19 19:25:10 +00:00
|
|
|
|
2020-12-23 12:45:13 +00:00
|
|
|
# Java & Android
|
2020-10-13 09:19:09 +00:00
|
|
|
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
|
2021-09-18 20:01:51 +00:00
|
|
|
export GRADLE_USER_HOME="$XDG_STATE_HOME"/gradle
|
2020-12-23 12:45:13 +00:00
|
|
|
export ANDROID_PREFS_ROOT="$XDG_CONFIG_HOME"/android
|
2021-09-18 20:01:51 +00:00
|
|
|
export ANDROID_EMULATOR_HOME="$XDG_STATE_HOME"/android/emulator
|
2021-10-08 11:05:58 +00:00
|
|
|
export ANDROID_SDK_ROOT="/opt/android-sdk"
|
|
|
|
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin"
|
2020-12-23 12:45:13 +00:00
|
|
|
# taskwarrior & timewarrior
|
2020-10-13 09:19:09 +00:00
|
|
|
export TIMEWARRIORDB="$XDG_DATA_HOME/timewarrior"
|
|
|
|
export TASKRC="$XDG_CONFIG_HOME/task/taskrc"
|
|
|
|
export TASKDATA="$XDG_DATA_HOME/task"
|
2020-09-04 10:09:08 +00:00
|
|
|
# zsh dirs
|
2020-06-26 21:27:38 +00:00
|
|
|
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
2021-09-18 20:01:51 +00:00
|
|
|
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
|
|
|
export ZSH="$XDG_STATE_HOME/zsh/oh-my-zsh"
|
2021-07-06 09:53:20 +00:00
|
|
|
export CONFIG_ZSH="$XDG_CONFIG_HOME/zsh"
|
|
|
|
export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell"
|
2020-09-04 10:09:08 +00:00
|
|
|
|
2020-06-26 21:27:38 +00:00
|
|
|
# environment
|
2021-07-06 09:53:20 +00:00
|
|
|
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
2021-09-21 20:51:19 +00:00
|
|
|
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
2021-10-22 15:15:09 +00:00
|
|
|
export IGNOREDIRS="-x dev -x .sync -x .stfolder -x .git -x .gradle -x .idea -x out -x *build -x dist_newstyle -x generated -x cache -x node_modules -x virtualenv"
|
2020-09-04 10:09:08 +00:00
|
|
|
# red stderr
|
2020-10-12 20:23:38 +00:00
|
|
|
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
2020-06-26 21:27:38 +00:00
|
|
|
# software config
|
2021-10-08 10:28:22 +00:00
|
|
|
export TEXMF=/usr/share/context
|
2021-09-18 20:01:51 +00:00
|
|
|
export KSCRIPT_IDEA_COMMAND=intellij-idea-ultimate-edition
|
2021-07-02 16:32:09 +00:00
|
|
|
## enable pass extensions
|
2020-09-19 07:34:47 +00:00
|
|
|
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
|
2021-07-02 16:32:09 +00:00
|
|
|
## man
|
|
|
|
export MANPAGER="less --squeeze-blank-lines +Gg"
|
|
|
|
export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold
|
|
|
|
export LESS_TERMCAP_md=$'\e[1;33m' # begin blink
|
|
|
|
export LESS_TERMCAP_so=$'\e[36m' # bottom blue
|
|
|
|
export LESS_TERMCAP_us=$'\e[01;37m' # begin underline
|
|
|
|
export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink
|
|
|
|
export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
|
|
|
|
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
|
|
|
|
export GROFF_NO_SGR=1 # for konsole and gnome-terminal
|
|
|
|
## fzf defaults
|
2021-06-13 13:51:25 +00:00
|
|
|
FZF_BINDINGS=$(echo '
|
|
|
|
change:top
|
|
|
|
alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {})
|
|
|
|
alt-bspace:execute(gio trash {})
|
|
|
|
double-click:execute(xdg-open {})
|
|
|
|
ctrl-a:select-all
|
2021-10-15 12:28:18 +00:00
|
|
|
ctrl-k:kill-line
|
2021-06-13 13:51:25 +00:00
|
|
|
alt-a:select-all
|
|
|
|
alt-c:yank
|
|
|
|
alt-w:toggle-preview-wrap
|
|
|
|
alt-j:preview-half-page-down,alt-k:preview-half-page-up
|
|
|
|
shift-down:preview-half-page-down,shift-up:preview-half-page-up
|
|
|
|
alt-shift-down:preview-down,alt-shift-up:preview-up
|
|
|
|
esc:close
|
|
|
|
' | xargs -I% echo -n "%," | head -c-1)
|
|
|
|
#alt-r:preview(bat {}),
|
2021-09-18 20:01:51 +00:00
|
|
|
export FZF_HISTDIR="$XDG_STATE_HOME/fzf"
|
|
|
|
mkdir -p "$XDG_STATE_HOME/fzf"
|
2021-06-13 13:51:25 +00:00
|
|
|
export FZF_DEFAULT_OPTS="--select-1 --ansi --marker=o
|
2021-09-18 20:01:51 +00:00
|
|
|
--tiebreak=end,length --history=$FZF_HISTDIR/history --bind='$FZF_BINDINGS'
|
2021-06-13 13:51:25 +00:00
|
|
|
--preview-window=60%,border-left"
|
2020-11-14 01:28:26 +00:00
|
|
|
FD_BASE="fd --hidden --color=always --no-ignore-vcs"
|
|
|
|
export FZF_DEFAULT_COMMAND="$FD_BASE --type file"
|
2020-11-30 21:13:43 +00:00
|
|
|
export FZF_CTRL_T_COMMAND="$FD_BASE -d 7"
|
2021-07-02 16:32:09 +00:00
|
|
|
## ctest
|
2020-09-04 10:09:08 +00:00
|
|
|
export CTEST_PROGRESS_OUTPUT=1
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
|
|
|
export CTEST_PARALLEL_LEVEL=3
|
2021-01-07 11:04:44 +00:00
|
|
|
|
2021-09-21 15:44:54 +00:00
|
|
|
if test -z "${DISPLAY}" && test "$XDG_VTNR" -eq 1 && test -d "$JOURNAL"; then
|
2021-01-07 11:04:44 +00:00
|
|
|
echo "What do you want to do?"
|
2021-06-13 13:51:25 +00:00
|
|
|
while test $(echo "$intention" | wc -c) -lt 6
|
|
|
|
do read intention
|
|
|
|
done
|
|
|
|
jrnl intentions "$intention"
|
2021-01-07 11:04:44 +00:00
|
|
|
exec startx
|
|
|
|
fi
|