sxmo: simplify XDG_SESSION_TYPE fix

This commit is contained in:
Colin 2023-12-05 08:50:19 +00:00
parent f350d7949c
commit 3d7ea75bfc
3 changed files with 5 additions and 7 deletions

View File

@ -288,11 +288,6 @@ in
# this sets XDG_CURRENT_DESKTOP=sway
# and makes sure that sway is launched dbus-run-session.
wrapperFeatures.base = true;
extraSessionCommands = ''
# XXX(2023/12/04): fixes a bug where sxmo somehow doesn't set XDG_SESSION_TYPE, preventing apps like Komikku from launching.
# wlroots should set this: idk where/why it's failing
export XDG_SESSION_TYPE=wayland
'';
};
programs.xwayland.enable = cfg.config.xwayland;
# provide portals for:

View File

@ -190,7 +190,5 @@ output "Unknown 0x0637 0x00000000" {
# - XDG_CURRENT_DESKTOP
# for more, see: <repo:nixos/nixpkgs:nixos/modules/programs/wayland/sway.nix>
include /etc/sway/config.d/*
# XXX(2023/12/04): this shouldn't be necessary, but without this (and the other code which actually sets the variable) Komikku on moby fails to launch because XDG_SESSION_TYPE is unset
exec dbus-update-activation-environment --systemd XDG_SESSION_TYPE
@extra_lines@

View File

@ -383,7 +383,12 @@ in
bindsym button2 kill
bindswitch lid:on exec sxmo_wm.sh dpms on
bindswitch lid:off exec sxmo_wm.sh dpms off
exec 'printf %s "$SWAYSOCK" > "$XDG_RUNTIME_DIR"/sxmo.swaysock'
# XXX(2023/12/04): this shouldn't be necessary, but without this Komikku fails to launch because XDG_SESSION_TYPE is unset
exec dbus-update-activation-environment --systemd XDG_SESSION_TYPE
exec_always ${sxmo_init}
'';
};