#!/usr/bin/env fish
set -q XDG_CONFIG_HOME || begin
echo XDG_CONFIG_HOME not set
exit 1
end
set -q DOTFILES_PATH || begin
echo DOTFILES_PATH not set
# set -Ux QT_QPA_PLATFORM xcb
# set -Ux QT_QPA_PLATFORM_PLUGIN_PATH /usr/lib/qt/plugins
set -Ux CLUTTER_BACKEND wayland
set -Ux SDL_VIDEODRIVER wayland
set -Ux MOZ_ENABLE_WAYLAND 1
set -Ux XDG_CURRENT_DESKTOP sway
for s in $ENV_PATH/*/sway-init.d.fish
source $s (dirname $s)
set initstr "\n(date): Initializsing Sway WM"
set elogfile ~/.sway.error.log
set logfile ~/.sway.log
echo $initstr >> $logfile; echo $initstr >> $elogfile
exec sway >> $logfile 2>> $elogfile