On Tue, Nov 28, 2023 at 04:51:04PM +0100, Landry Breuil wrote: > Le Tue, Nov 28, 2023 at 03:59:02PM +0100, Sebastien Marie a écrit : > > Hi, > > > > The following patch makes wayland/sway to link to the tree (remove > > UNLINKED) and remove the RUN_DEPENDS on wayland/foot (which is still > > UNLINKED). > > > > foot is only need if you set it to be your "preferred terminal". it is a > > runtime configuration. > > sure, but it's also the default hardcoded configuration. Without any > config file, if you don't have foot installed, win-enter wont spawn a > terminal, and you'd be lost figuring out what to do without a term :) > > i don't oppose the linking to the build at all, more wayland testing is > more than welcome; but then maybe patch out the default config so that > it uses xterm via xwayland.... or default to havoc which is linked... >
Here's a diff that allows sway to be linked, and patches the default config to use xterm (and also installs swaybg to have the default wallpaper) It also adds a startsway.sh script to start sway and updates DESCR accordingly Note that the build fix was already committed independently. ok? Index: Makefile =================================================================== RCS file: /cvs/OpenBSD/ports/wayland/sway/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- Makefile 26 Nov 2023 17:49:42 -0000 1.8 +++ Makefile 30 Nov 2023 21:10:29 -0000 @@ -1,5 +1,5 @@ COMMENT = i3-compatible Wayland compositor -UNLINKED = wayland +REVISION = 0 GH_ACCOUNT = swaywm GH_PROJECT = sway @@ -35,8 +35,9 @@ wayland/wlroots \ x11/xkbcommon -RUN_DEPENDS = x11/gnome/themes-extra \ - wayland/foot +RUN_DEPENDS = wayland/dmenu-wayland \ + wayland/swaybg \ + x11/gnome/themes-extra CONFIGURE_ARGS = -Dtray=disabled @@ -45,5 +46,6 @@ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sway mv ${WRKINST}${SYSCONFDIR}/sway ${PREFIX}/share/examples/sway/ + ${INSTALL_SCRIPT} ${FILESDIR}/startsway.sh ${PREFIX}/bin .include <bsd.port.mk> Index: files/startsway.sh =================================================================== RCS file: files/startsway.sh diff -N files/startsway.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/startsway.sh 30 Nov 2023 21:10:29 -0000 @@ -0,0 +1,13 @@ +#! /bin/ksh +export XDG_RUNTIME_DIR=${HOME}/.local/run +if [ ! -d $XDG_RUNTIME_DIR ]; then + mkdir -m 700 -p $XDG_RUNTIME_DIR +fi +export WLR_DRM_DEVICES=/dev/dri/card0 +export LIBSEAT_BACKEND=noop + +# Tell applications to use Wayland +# export MOZ_ENABLE_WAYLAND=1 # doesn't work yet +export XDG_CURRENT_DESKTOP=sway + +exec /usr/local/bin/sway $* Index: patches/patch-config_in =================================================================== RCS file: patches/patch-config_in diff -N patches/patch-config_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-config_in 30 Nov 2023 21:10:29 -0000 @@ -0,0 +1,19 @@ +# Default config + +Index: config.in +--- config.in.orig ++++ config.in +@@ -14,11 +14,11 @@ set $down j + set $up k + set $right l + # Your preferred terminal emulator +-set $term foot ++set $term xterm + # Your preferred application launcher + # Note: pass the final command to swaymsg so that the resulting window can be opened + # on the original workspace that the command was run on. +-set $menu dmenu_path | wmenu | xargs swaymsg exec -- ++set $menu dmenu-wl_path | dmenu-wl | xargs swaymsg exec -- + + ### Output configuration + # Index: pkg/DESCR =================================================================== RCS file: /cvs/OpenBSD/ports/wayland/sway/pkg/DESCR,v retrieving revision 1.2 diff -u -r1.2 DESCR --- pkg/DESCR 2 Sep 2023 13:33:59 -0000 1.2 +++ pkg/DESCR 30 Nov 2023 21:10:29 -0000 @@ -10,17 +10,5 @@ Running -On OpenBSD, create a script (call it startwl for example) containing : - -#! /bin/ksh -export XDG_RUNTIME_DIR=/tmp/run/$(id -u) -if [ ! -d $XDG_RUNTIME_DIR ]; then - mkdir -m 700 -p $XDG_RUNTIME_DIR -fi -export WLR_DRM_DEVICES=/dev/dri/card0 -export LIBSEAT_BACKEND=noop - -# export MOZ_ENABLE_WAYLAND=1 # doesn't work yet -export XDG_CURRENT_DESKTOP=sway - -exec sway $* +On OpenBSD, use the provided /usr/local/bin/startsway.sh script to +launch sway, or customize it to your needs Index: pkg/PLIST =================================================================== RCS file: /cvs/OpenBSD/ports/wayland/sway/pkg/PLIST,v retrieving revision 1.3 diff -u -r1.3 PLIST --- pkg/PLIST 8 Nov 2023 14:04:07 -0000 1.3 +++ pkg/PLIST 30 Nov 2023 21:10:29 -0000 @@ -1,3 +1,4 @@ +bin/startsway.sh @bin bin/sway @bin bin/swaybar @bin bin/swaymsg -- Matthieu Herrb