# Opciones del Sistema {{{
export EDITOR="nvim"
#export EXINIT="set ai ic nu sm smd sw=4 ts=4 ruler para=BlBdPpIt sect=ShSs | map gg 1G"
export EXINIT=":so $XDG_CONFIG_HOME/exrc"
export VISUAL="$EDITOR"
export GIT_EDITOR="$EDITOR"
export TERMINAL="alacritty"
export COLORTERM="truecolor"
export BROWSER="firefox"
export OPENER="xdg-open"
export PAGER="less"
export FILE="lf"
export GREP_COLORS="mt=0;32"
export TIME_STYLE="long-iso"
export BLOCK_SIZE="'1"
export QUOTING_STYLE=literal

export XAUTHORITY="${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xauthority"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/X11/xinitrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"

export GPG_TTY=$(tty)
# }}}
# Programas {{{
export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pass"
eval $(keychain --dir ~/.local/share/keychain --quiet --eval --noask --clear --agents ssh,gpg id_ed25519)
export MOSH_TITLE_NOPREFIX=1

export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/npm/npmrc"
export NODE_REPL_HISTORY="${XDG_DATA_HOME:-$HOME/.local/share}/node_repl_history"
export RANDFILE="${XDG_DATA_HOME:-$HOME/.local/share}/rnd"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export LUAROCKS_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/luarocks/config-5.3.lua"
export HIGHLIGHT_OPTIONS='--out-format="ansi" --style="pablo"'
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LYNX_LSS="${XDG_CONFIG_HOME:-$HOME/.config}/lynx.lss"
export ELINKS_CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}/elinks"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export MYPY_CACHE_DIR="$XDG_CACHE_HOME/mypy"

export XCURSOR_THEME="cz-Hickson-White"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"
export SDL_IM_MODULE="fcitx"
export XMODIFIERS="@im=fctix"

_JAVA_OPTIONS=-Djava.util.prefs.userRoot="${XDG_DATA_HOME:-$HOME/.local/share}/java"
_JAVA_OPTIONS=-Djavafx.cachedir="$XDG_CACHE_HOME"
_JAVA_OPTIONS+=-Dawt.useSystemAAFontSettings="on -Dswing.aatext=true"
_JAVA_OPTIONS+=-Dswing.defaultlaf="com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
_JAVA_OPTIONS+=-Dswing.crossplatformlaf="com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3"
export _JAVA_OPTIONS

eval "$(sed 's/^[^#].*/export &/g;t;d' ${DIR:-$XDG_CONFIG_HOME}/user-dirs.dirs)"

export BL2_HOME=/mnt/wd1tb/catacombs/code/blockout
# }}}
# FZF {{{
export FZF_DEFAULT_OPTS="--cycle \
	--color=bg+:#1d2021,bg:-1,border:#080808,spinner:#E6DB74,hl:#7E8E91,fg:#ebdbb2,header:#7E8E91,info:#A6E22E,pointer:#A6E22E,marker:#ae81ff,fg+:#F8F8F2,prompt:#F4bf75,hl+:#Ff9700 \
	--reverse \
	--info=inline \
	--no-bold \
	--ansi \
	--pointer='→' \
	--marker='·' \
	--preview-window :wrap:sharp"

export FZF_DEFAULT_COMMAND="fd -t f -c always -H --strip-cwd-prefix"
export FZF_COMPLETION_OPTS='+c -x'
export FZF_CTRL_T_OPTS="--select-1 --exit-0 --preview 'bat --color=always {}'"
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'"
export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d '\r')
# }}}
# Less {{{
export LESSCHARSET=UTF-8
export LESS=FRXi
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export LESSPROMPT='?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...'
export LESSHISTFILE="/dev/null"
# }}}
# Path {{{
typeset -U PATH	path
path=(~/.local/bin $XDG_DATA_HOME/npm/bin $XDG_DATA_HOME/luarocks/bin $XDG_DATA_HOME/cargo/bin $path[@])
# }}}
# vim:foldmethod=marker:foldlevel=0
