aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-06 18:07:40 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-06 18:07:40 -0500
commitafe7820264c3e77f14f6a21ff46596e8d07554e0 (patch)
tree6d019c4bc13ea1992fff5f7f23087213dc78d002
parent6d83c83a0b4228cdd2d785f23cf7faabc7a36f30 (diff)
downloadrivercfg-afe7820264c3e77f14f6a21ff46596e8d07554e0.tar.gz
rivercfg-afe7820264c3e77f14f6a21ff46596e8d07554e0.tar.xz
Add support for el9. What a mess
-rwxr-xr-xbldRiver.sh5
-rwxr-xr-xel9.sh449
-rwxr-xr-xriver/init17
-rwxr-xr-xriver/theme_helper8
-rwxr-xr-xwaylandrc11
5 files changed, 482 insertions, 8 deletions
diff --git a/bldRiver.sh b/bldRiver.sh
index 1ba49d0..125355b 100755
--- a/bldRiver.sh
+++ b/bldRiver.sh
@@ -1,6 +1,7 @@
#!/bin/sh
set -ex
codedir="${CODEDIR}/river"
+install_prefix="${RIVERWM_BASE:-$HOME/.local}"
if ! [ -d "$codedir" ] ; then
mkdir -p "$(basename "$codedir")"
@@ -8,12 +9,12 @@ if ! [ -d "$codedir" ] ; then
cd "$codedir"
git clean -fdx .
git reset --hard HEAD
- git checkout v0.3.5
+ git checkout v0.3.12
cd -
fi
cd "$codedir"
git submodule init
git submodule update
-zig build -Dxwayland -Doptimize=ReleaseSafe --prefix ~/.local install
+zig build --search-prefix "$RIVERWM_BASE" -Dxwayland -Doptimize=ReleaseSafe --prefix "$install_prefix" install
diff --git a/el9.sh b/el9.sh
new file mode 100755
index 0000000..71d7c13
--- /dev/null
+++ b/el9.sh
@@ -0,0 +1,449 @@
+#!/bin/sh
+set -ex
+# export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/rivercfg}"
+export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}"
+codedir="${RIVERWM_BASE}/src"
+# Override for everything elsedownstream...
+export CODEDIR="$codedir"
+
+# Annoyingly scattered about inside of the prefix...
+export PKG_CONFIG_PATH="$(echo "$RIVERWM_BASE/lib64/pkgconfig
+$RIVERWM_BASE/lib/pkgconfig
+$RIVERWM_BASE/share/pkgconfig
+/usr/lib64/pkgconfig
+/usr/lib/pkgconfig" | tr '\n' ':')"
+
+_pfx="$RIVERWM_BASE"
+
+
+sudo dnf config-manager --set-enabled crb
+
+sudo yum -y install \
+ doxygen \
+ expat-devel \
+ libffi-devel \
+ libxml2-devel \
+ xmlto \
+ libxkbcommon-devel \
+ pixman \
+ pixman-devel \
+ libglvnd-devel \
+ vulkan-loader-devel \
+ libdrm-devel \
+ xwayland-devel \
+ libinput-devel \
+ hwdata \
+ hwdata-devel \
+ libdisplay-info-devel \
+ cairo-devel \
+ pipewire-devel \
+ inih-devel \
+ scdoc \
+ libevdev-devel \
+ mtdev-devel \
+ gtk3-devel \
+ lcms2-devel \
+ xcb-util-devel \
+ gtkmm30-devel \
+ flatpak-devel \
+ fuse3-devel \
+ gstreamer1-devel \
+ gstreamer1-plugins-base-devel \
+ vala \
+ libpcap-devel \
+ iniparser-devel \
+ catch-devel \
+
+
+sudo yum -y builddep \
+ systemd \
+ mesa-vulkan-drivers \
+ xorg-x11-server-Xwayland \
+ xwayland-devel \
+ libdrm \
+ libinput \
+ xdg-desktop-portal \
+
+
+# sudo yum -y install python3-virtualenv
+
+python3 -m venv "$codedir/venv"
+. "$codedir/venv/bin/activate"
+pip install meson
+pip install ninja
+
+
+if ! [ -d "$codedir/wayland" ] ; then
+ git clone https://gitlab.freedesktop.org/wayland/wayland \
+ "$codedir/wayland"
+fi
+cd "$codedir/wayland"
+git checkout 1.24.0
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/drm" ] ; then
+ git clone https://gitlab.freedesktop.org/mesa/drm \
+ "$codedir/wl/drm"
+fi
+cd "$codedir/wl/drm"
+git checkout libdrm-2.4.131
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/wayland-protocols" ] ; then
+ git clone https://gitlab.freedesktop.org/wayland/wayland-protocols \
+ "$codedir/wl/wayland-protocols"
+fi
+cd "$codedir/wl/wayland-protocols"
+git checkout 1.47
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/pixman" ] ; then
+ git clone https://gitlab.freedesktop.org/pixman/pixman \
+ "$codedir/wl/pixman"
+fi
+cd "$codedir/wl/pixman"
+git checkout pixman-0.46.4
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+
+if ! [ -d "$codedir/wl/libliftoff" ] ; then
+ git clone https://gitlab.freedesktop.org/emersion/libliftoff \
+ "$codedir/wl/libliftoff"
+fi
+cd "$codedir/wl/libliftoff"
+git checkout v0.5.0
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+# https://gitlab.gnome.org/GNOME/glib/
+# Needed for xdg-desktop-portal...
+# Libinput also needs a newer vesion...
+if ! [ -d "$codedir/glib" ] ; then
+ git clone https://gitlab.gnome.org/GNOME/glib \
+ "$codedir/glib"
+fi
+cd "$codedir/glib"
+# git checkout 2.87.1
+git checkout 2.76.6
+git reset --hard HEAD
+# git clean -fdx .
+meson setup --includedir "${_pfx}/include" -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+
+if ! [ -d "$codedir/libinput" ] ; then
+ git clone https://gitlab.freedesktop.org/libinput/libinput/ \
+ "$codedir/libinput"
+fi
+cd "$codedir/libinput"
+git checkout 1.30.1
+git reset --hard HEAD
+git clean -fdx .
+git submodule update
+meson setup -Ddebug-gui=false -Dprefix="${_pfx}" build/
+# _prev_ld_pth="$LD_LIBRARY_PATH"
+# unset LD_LIBRARY_PATH
+ninja -C build/
+ninja -C build/ install
+# export LD_LIBRARY_PATH="$_prev_ld_pth"
+cd -
+
+
+if ! [ -d "$codedir/seatd" ] ; then
+ git clone https://git.sr.ht/~kennylevinsen/seatd \
+ "$codedir/seatd"
+fi
+cd "$codedir/seatd"
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/wlroots" ] ; then
+ git clone https://gitlab.freedesktop.org/wlroots/wlroots \
+ "$codedir/wl/wlroots"
+fi
+cd "$codedir/wl/wlroots"
+git checkout 0.19.2
+meson setup --includedir "${_pfx}/include" --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/wl/xdg-desktop-portal-wlr" ] ; then
+ git clone https://github.com/emersion/xdg-desktop-portal-wlr \
+ "$codedir/wl/xdg-desktop-portal-wlr"
+fi
+cd "$codedir/wl/xdg-desktop-portal-wlr"
+git checkout v0.8.1
+git checkout HEAD ./src
+git apply - <<EOF
+diff --git a/src/screencast/wlr_screencast.c b/src/screencast/wlr_screencast.c
+index 0c8aad7..84b15dc 100644
+--- a/src/screencast/wlr_screencast.c
++++ b/src/screencast/wlr_screencast.c
+@@ -18,6 +18,7 @@
+ #include <assert.h>
+ #include <wayland-client-protocol.h>
+ #include <xf86drm.h>
++#include <unistd.h>
+
+ #include "screencast.h"
+ #include "wlr_screencopy.h"
+EOF
+meson setup --wipe -Dprefix="${_pfx}" build/
+ninja -C build/
+ninja -C build/ install
+cd -
+
+if ! [ -d "$codedir/foot" ] ; then
+ git clone https://codeberg.org/dnkl/foot \
+ "$codedir/foot"
+fi
+cd "$codedir/foot"
+git checkout 1.25.0
+git checkout HEAD scripts meson.build
+# Fix for older python...
+git apply - <<EOF
+diff --git a/meson.build b/meson.build
+index a1d0104d..5a7ce8e4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -350,28 +350,6 @@ install_data(
+ systemd = dependency('systemd', required: false)
+ custom_systemd_units_dir = get_option('systemd-units-dir')
+
+-if systemd.found() or custom_systemd_units_dir != ''
+- configuration = configuration_data()
+- configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+-
+- if (custom_systemd_units_dir == '')
+- systemd_units_dir = systemd.get_variable('systemduserunitdir')
+- else
+- systemd_units_dir = custom_systemd_units_dir
+- endif
+-
+- configure_file(
+- configuration: configuration,
+- input: 'foot-server.service.in',
+- output: '@BASENAME@',
+- install_dir: systemd_units_dir
+- )
+-
+- install_data(
+- 'foot-server.socket',
+- install_dir: systemd_units_dir)
+-endif
+-
+ scdoc = dependency('scdoc', native: true, required: get_option('docs'))
+ install_data('foot.ini', install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'foot'))
+ if scdoc.found()
+diff --git a/scripts/generate-emoji-variation-sequences.py b/scripts/generate-emoji-variation-sequences.py
+index e05b6290..22cd6960 100644
+--- a/scripts/generate-emoji-variation-sequences.py
++++ b/scripts/generate-emoji-variation-sequences.py
+@@ -5,7 +5,7 @@ import sys
+
+
+ class Codepoint:
+- def __init__(self, start: int, end: None|int = None):
++ def __init__(self, start: int, end = None):
+ self.start = start
+ self.end = start if end is None else end
+ self.vs15 = False
+EOF
+mkdir -p bld/release
+cd -
+cd "$codedir/foot/bld/release"
+meson --buildtype=release --prefix="${_pfx}" -Ddefault-terminfo=xterm-256color -Db_lto=true ../..
+ninja
+ninja test
+ninja install
+cd -
+
+# https://gitlab.gnome.org/GNOME/json-glib/
+# Needed for xdg-desktop-portal...
+if ! [ -d "$codedir/json-glib" ] ; then
+ git clone https://gitlab.gnome.org/GNOME/json-glib \
+ "$codedir/json-glib"
+fi
+cd "$codedir/json-glib"
+git checkout 1.10.8
+meson setup --reconfigure -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+# https://github.com/martinpitt/umockdev/
+# Needed for xdg-desktop-portal...
+if ! [ -d "$codedir/umockdev" ] ; then
+ git clone https://github.com/martinpitt/umockdev/ \
+ "$codedir/umockdev"
+fi
+cd "$codedir/umockdev"
+git checkout 0.19.4
+meson setup --reconfigure -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+# https://flatpak.github.io/xdg-desktop-portal/docs/building-and-running.html
+if ! [ -d "$codedir/xdg-desktop-portal" ] ; then
+ git clone https://github.com/flatpak/xdg-desktop-portal \
+ "$codedir/xdg-desktop-portal"
+fi
+cd "$codedir/xdg-desktop-portal"
+git checkout 1.20.3
+meson setup -Dtests=disabled -Dprefix="${_pfx}" _build
+meson compile -C _build
+meson install -C _build
+cd -
+
+if ! [ -d "$codedir/bemenu" ] ; then
+ git clone https://github.com/Cloudef/bemenu \
+ "$codedir/bemenu"
+fi
+cd "$codedir/bemenu"
+git checkout 0.6.23
+make clients
+make wayland
+make curses
+make install PREFIX=$RIVERWM_BASE
+cd -
+
+if ! [ -d "$codedir/waybar" ] ; then
+ git clone https://github.com/Alexays/Waybar \
+ "$codedir/waybar"
+fi
+cd "$codedir/waybar"
+git reset --hard HEAD
+git checkout 0.14.0
+mkdir -p build
+git apply - <<EOF
+diff --git a/meson.build b/meson.build
+index b3e6ca0f..30245c18 100644
+--- a/meson.build
++++ b/meson.build
+@@ -146,17 +146,6 @@ conf_data.set('prefix', prefix)
+
+ add_project_arguments('-DSYSCONFDIR="@0@"'.format(prefix / sysconfdir), language : 'cpp')
+
+-if systemd.found()
+- user_units_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir')
+-
+- configure_file(
+- configuration: conf_data,
+- input: './resources/waybar.service.in',
+- output: '@BASENAME@',
+- install_dir: user_units_dir
+- )
+-endif
+-
+ src_files = files(
+ 'src/factory.cpp',
+ 'src/AModule.cpp',
+EOF
+cd -
+cd "$codedir/waybar/build"
+meson setup -Dprefix="${_pfx}" ..
+ninja
+ninja install
+cd -
+
+if ! [ -d "$codedir/swaylock" ] ; then
+ git clone https://github.com/swaywm/swaylock \
+ "$codedir/swaylock"
+fi
+cd "$codedir/swaylock"
+git checkout v1.8.4
+meson setup \
+ -Dzsh-completions=false \
+ -Dbash-completions=false \
+ -Dfish-completions=false \
+ -Dpam=disabled \
+ -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+# Sadly this one is going to need some more permissions...
+sudo chown root "$RIVERWM_BASE"/bin/swaylock
+sudo chmod +s "$RIVERWM_BASE"/bin/swaylock
+cd -
+
+if ! [ -d "$codedir/grim" ] ; then
+ git clone https://gitlab.freedesktop.org/emersion/grim \
+ "$codedir/grim"
+fi
+cd "$codedir/grim"
+git checkout v1.5.0
+meson setup -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+if ! [ -d "$codedir/slurp" ] ; then
+ git clone https://github.com/emersion/slurp \
+ "$codedir/slurp"
+fi
+cd "$codedir/slurp"
+git checkout v1.5.0
+meson setup -Dprefix="${_pfx}" build
+meson compile -C build
+meson install -C build
+cd -
+
+
+zigver=0.15.2
+zigdir="$RIVERWM_BASE/zig/zig$zigver"
+zigout="${zigdir}.tar.xz"
+# zigurl="https://ziglang.org/download/$zigver/zig-linux-x86_64-$zigver.tar.xz"
+zigurl="https://ziglang.org/download/$zigver/zig-x86_64-linux-$zigver.tar.xz"
+zigsigurl="${zigurl}.minisig"
+zigkey="RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U"
+sudo yum -y install \
+ minisign \
+ scdoc \
+ wget \
+ xwayland-run
+mkdir -p "$(dirname "$zigdir")"
+cd "$(dirname "$zigdir")"
+if ! [ -d "$zigdir" ] ; then
+ wget -O "$zigout" "$zigurl"
+ wget -O "${zigout}.minisig" "$zigsigurl"
+ minisign -Vm "$zigout" -P "$zigkey"
+ mkdir "$zigdir"
+ cd -
+ cd "$zigdir"
+ tar --strip-components=1 -xJf "$zigout"
+fi
+export PATH="$zigdir:$PATH"
+cd -
+./bldRiver.sh
+# ./bldSession.sh
+./link.sh
+
+
+echo '######################################################################'
+echo "NOTICE:"
+echo '######################################################################'
+echo
+echo You will need to add $RIVERWM_BASE/bin to your PATH and
+echo $RIVERWM_BASE/lib64 to the LD_LIBRARY_PATH environment variable.
+echo
+echo gdm has issues with wlcustom, login to a VT and run:
+echo . ~/.waylandrc
diff --git a/river/init b/river/init
index 91add4f..d61ed23 100755
--- a/river/init
+++ b/river/init
@@ -1,6 +1,10 @@
#!/bin/sh
+export XDG_CURRENT_DESKTOP=river
+RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+export SSH_ASKPASS="${XDG_CONFIG_HOME}/river/bemenu_askpass_helper"
+export SSH_ASKPASS_REQUIRE=force
bmenu_helper="$XDG_CONFIG_HOME/river/bemenu_helper"
# This is the example configuration file for river.
#
@@ -186,7 +190,7 @@ riverctl map normal Super+Shift Minus spawn "${XDG_CONFIG_HOME}/river/padding_he
riverctl map normal Super+Control L spawn swaylock
riverctl map normal Super D spawn "$bmenu_helper "bemenu-run
-riverctl map normal Super B spawn 'pkill -SIGUSR1 waybar'
+riverctl map normal Super B spawn "sh -c 'if pgrep waybar; then pkill waybar ; else waybar & fi'"
riverctl focus-follows-cursor normal
riverctl map normal Super+Shift P spawn 'grim /tmp/screenshot_$(date +%s).png'
@@ -214,11 +218,20 @@ if ! pgrep swaybg >/dev/null 2>&1 ; then
echo ""
# swaybg -i .wallpaper.jpg &
fi
-
+#
# If Chromium dialogs aren't working these are suspect
dbus-update-activation-environment --systemd WAYLAND_DISPLAY "XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
systemctl --user restart xdg-desktop-portal
+# So.... if we've compiled the portal by hand we're going to now run it
+if [ -d "$RIVERWM_BASE" ] ; then
+ _portal="$RIVERWM_BASE/libexec/xdg-desktop-portal"
+ [ -x "$_portal" ] && sh -c "$_portal"' --replace' &
+
+ _portal="$RIVERWM_BASE/libexec/xdg-desktop-portal-wlr"
+ [ -x "$_portal" ] && sh -c "$_portal"' --replace' &
+fi
+
# I hate calling this directly but the systemd unit is bugged on arch at
# least, running it by hand appears to work just fine
_gtk_portal=/usr/lib/xdg-desktop-portal-gtk
diff --git a/river/theme_helper b/river/theme_helper
index 398910d..5de2830 100755
--- a/river/theme_helper
+++ b/river/theme_helper
@@ -1,11 +1,11 @@
#!/bin/sh
set -ex
-exec >/tmp/theme.log 2>&1
+# exec >/tmp/theme.log 2>&1
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
conf="$XDG_CONFIG_HOME/river/theme_conf"
gnomeSet() {
- gsettings set org.gnome.desktop.interface color-scheme "$1"
+ gsettings set org.gnome.desktop.interface color-scheme "$1" || echo "color-scheme failed"
}
bgcolor_dark=0x282828
@@ -24,14 +24,14 @@ case $mode in
mode=dark
gnomeSet 'prefer-dark'
# Because GTK is an absolute disaster...
- gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark
+ gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark || echo "gtk-theme failed..."
pkill -SIGUSR1 foot
riverctl background-color "$bgcolor_dark"
;;
dark)
mode=light
gnomeSet 'prefer-light'
- gsettings set org.gnome.desktop.interface gtk-theme Adwaita
+ gsettings set org.gnome.desktop.interface gtk-theme Adwaita || echo "gtk-theme failed..."
pkill -SIGUSR2 foot
riverctl background-color "$bgcolor_light"
;;
diff --git a/waylandrc b/waylandrc
index 696b8e9..186eeaa 100755
--- a/waylandrc
+++ b/waylandrc
@@ -35,5 +35,16 @@ sh -c '/usr/libexec/kf6/polkit-kde-authentication-agent-1' &
sh -c '/usr/libexec/pam_kwallet_init' &
# sh -c 'kwalletd6' &
+RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}"
+if [ -d "$RIVERWM_BASE" ] ; then
+ export LD_LIBRARY_PATH="$RIVERWM_BASE/lib64:$RIVERWM_BASE/lib"
+
+ _bemenu_lib=$RIVERWM_BASE/lib/bemenu/
+ if [ -d "$_bemenu_lib" ] ; then
+ export BEMENU_RENDERERS="$_bemenu_lib"
+ fi
+fi
+
+
exec river