2022-04-15 17:38:05 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Starting sway with proper environment too. My {bash,zsh}rc handles
|
|
|
|
# exec
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2022-10-15 16:05:55 +02:00
|
|
|
# As this script is kind of login manager and upstream wants to externalize
|
|
|
|
# the task of telling Sway is used to it, https://github.com/swaywm/sway/pull/4876#issuecomment-570790128
|
|
|
|
# This seems to be required by Firefox and many others.
|
2022-10-15 16:21:57 +02:00
|
|
|
# Don't listen to Waybar claiming this should be "Unity"
|
2022-10-15 16:05:55 +02:00
|
|
|
export XDG_CURRENT_DESKTOP=sway
|
|
|
|
# https://github.com/flameshot-org/flameshot/blob/master/docs/Sway%20and%20wlroots%20support.md
|
|
|
|
# mentions this
|
|
|
|
export XDG_SESSION_DESKTOP=sway
|
|
|
|
|
2023-08-14 16:00:58 +02:00
|
|
|
# Java applications under non-parenting window managers (incl. sway)
|
|
|
|
# via https://github.com/simplex-chat/simplex-chat/issues/2889#issuecomment-1677272784
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
|
2022-04-15 17:38:05 +02:00
|
|
|
# Using fcitx
|
|
|
|
export XMODIFIERS=@im=fcitx
|
|
|
|
export GTK_IM_MODULE="fcitx"
|
|
|
|
export QT_IM_MODULE="fcitx"
|
|
|
|
|
|
|
|
# qt5ct allows theme choosing
|
|
|
|
export QT_QPA_PLATFORMTHEME="qt5ct"
|
2024-02-18 13:48:06 +01:00
|
|
|
# https://librewolf.net/docs/faq/#cant-open-links-with-librewolf-when-using-wayland
|
|
|
|
export GDK_BACKEND=wayland
|
2024-02-18 13:44:14 +01:00
|
|
|
# Dark theme for GTK apps. Fedora: "adwaita-qt*"
|
2024-02-18 13:59:39 +01:00
|
|
|
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
2024-02-11 15:48:56 +01:00
|
|
|
export GTK_THEME=Adwaita:dark
|
2022-04-15 17:38:05 +02:00
|
|
|
|
|
|
|
# Ensuring Wayland gets used as per Arch Wiki
|
|
|
|
# 2021-02-28 https://wiki.archlinux.org/index.php/Wayland#GUI_libraries
|
|
|
|
export QT_QPA_PLATFORM=wayland
|
|
|
|
export CLUTTER_BACKEND=wayland
|
|
|
|
export SDL_VIDEODRIVER=wayland
|
2024-02-14 09:27:49 +01:00
|
|
|
# Electron
|
|
|
|
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
2022-04-16 15:01:52 +02:00
|
|
|
# Mozilla Products
|
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
2022-04-15 17:38:05 +02:00
|
|
|
|
2024-04-24 11:59:34 +02:00
|
|
|
# Ensures dbus is available. Fedora 40 seems to no longer require
|
|
|
|
# --unsupported-gpu on nvidia either.
|
|
|
|
#dbus-launch --exit-with-session sway --unsupported-gpu "$@"
|
|
|
|
dbus-launch --exit-with-session sway "$@"
|
2022-04-15 17:38:05 +02:00
|
|
|
set +x
|