WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.18k stars 48 forks source link

SwayFX Fails to Build on Artix #270

Closed cprin21 closed 4 months ago

cprin21 commented 5 months ago

Please fill out the following:

MrPenguin07 commented 4 months ago

I can build master on Gentoo without systemd.

Log file be helpful but I suspect this is a packaging issue.

cprin21 commented 4 months ago

Yes, likely some weirdness going on with how it is packaged on the AUR. I will raise the issue on the AUR for the swayfx and swayfx-git packages instead of here.

MrPenguin07 commented 4 months ago

Yes, likely some weirdness going on with how it is packaged on the AUR. I will raise the issue on the AUR for the swayfx and swayfx-git packages instead of here.

Having taken a look inside the AUR package, While systemd is not listed as a dependency - and for compilation/runtime it certainly isnt, The file 50-systemd-user.conf most certainly does require systemd;

# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
# See FS#63021
# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.

# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to.
exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway
exec systemctl --user import-environment DISPLAY \
                                         SWAYSOCK \
                                         WAYLAND_DISPLAY \
                                         XDG_CURRENT_DESKTOP

My suggestion to you would be to edit this to remove the systemd commands, Then manually set the env variables in a small bash script which your login manager uses to launch sway. For eg. I use this with sddm (and yes some of these are unecessary/deprecated but I haven't updated it in a long time)

       │ File: /usr/local/bin/startsway.sh
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #! /bin/sh
   2   │
   3   │ # force apps to use Wayland backend by default
   4   │ export QT_QPA_PLATFORMTHEME=qt5ct
   5   │ export MOZ_ENABLE_WAYLAND=1
   6   │ export QT_QPA_PLATFORM=wayland
   7   │ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
   8   │ export CLUTTER_BACKEND=wayland
   9   │ export GDK_BACKEND=wayland,x11
  10   │ export ECORE_EVAS_ENGINE=wayland_egl
  11   │ export ELM_ENGINE=wayland_wgl
  12   │ export SDL_VIDEODRIVER=wayland
  13   │ export _JAVA_AWT_WM_NONREPARENTING=1
  14   │ export XDG_CURRENT_DESKTOP=sway
  15   │
  16   │ # no redirecting stdout/stderr; handled by SDDM
  17   │ exec dbus-run-session sway

which is then launched as such:

         │ File: /usr/share/wayland-sessions/sway.desktop
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ [Desktop Entry]
   2   │ Name=Sway
   3   │ Comment=An i3-compatible Wayland compositor
   4   │ Exec=/usr/local/bin/startsway.sh
   5   │ Type=Application

I do believe this could be kept open, there are other ways of handling this IMO and hard deps on systemd simply suck :) Since # Upstream refuses to set XDG_CURRENT_DESKTOP so we have to is this export able to be coded into swayfx fork @ErikReider ?

Regards

edit: clear up misunderstanding