#!/usr/bin/env zsh

# Path
scriptspath="/home/timmy/.local/bin"
export PATH="$scriptspath/launch:$PATH"
export PATH="$scriptspath/x11:$PATH"
export PATH="$scriptspath/misc:$PATH"
#export PATH="$scriptspath/keyboard:$PATH"
export PATH="$scriptspath/sync:$PATH"
export PATH="$scriptspath/programs:$PATH"
export PATH="$scriptspath/video:$PATH"

# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="launch brave"

# Clean up home directory
export XDG_CACHE_HOME="$HOME/.cache"

export XDG_CONFIG_HOME="$HOME/.config"
export XAUTHORITY="$XDG_CONFIG_HOME/x11/Xauthority"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
export INPUTRC="$XDG_CONFIG_HOME/zsh/inputrc"
export NOTMUCH_COFIG="$XDG_CONFIG_HOME/notmuch/config"
export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" # Move .zshrc

export XDG_DATA_HOME="$HOME/.local/share"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"

export LESSHISTFILE="-"

# Theming
export QT_QPA_PLATFORMTHEME="qt5ct"

# Autostart X after login
if [[ -z $DISPLAY ]] && [[ "$(id -u)" != 0 ]] && ( [[ $(tty) = /dev/tty1 ]] || [[ $(tty) = /dev/ttyC0 ]] ); then startx $XDG_CONFIG_HOME/x11/xinitrc; fi