-unset XDG_RUNTIME_DIR
-export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX)
+# start wayland if isn't already running
+if [[ -z "${WAYLAND_DISPLAY}" ]] && [[ "${XDG_VTNR}" -eq 1 ]]; then
-[[ -t 0 && $(tty) == /dev/tty1 && ! $DISPLAY ]] && exec startx
+ # setup runtime directory if it's not already
+ if test -z "$XDG_RUNTIME_DIR"; then
+ export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX)
+ fi
+
+ # enable wayland for firefox
+ export MOZ_ENABLE_WAYLAND=1
+
+ # start sway
+ dbus-launch sway
+fi
alias cd='z '
alias rename='perl-rename'
-alias make='make -j16 -l6 CFLAGS="-march=bdver1"'
+alias make='make -j8 -l9 '
alias dust='dust -rb'
alias ls='lsd'
# config aliases
alias wget='wget --hsts-file="$XDG_DATA_HOME/wget-hsts"'
-alias xrdb='xrdb -load "$XDG_CONFIG_HOME/X11/xresources"'
-alias background='feh --bg-fill --no-fehbg --randomize /home/huck/drive/library/photos/background'
-alias nvidia-settings='nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings'