if [[ "${DESKTOP_SESSION}" == *sway* ]]; then
    # make xdg-desktop-portal choose the wlr portal
    export XDG_CURRENT_DESKTOP=sway
    # set theme for Qt 5 applications
    export QT_QPA_PLATFORMTHEME=qt5ct
    # make Firefox use Wayland
    export MOZ_ENABLE_WAYLAND=1
    # setup for IME daemon (will be started as part of sway config)
    export GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx
fi
