From 343c1f0a35e398ffacbc3bd46ac57be44381d4b2 Mon Sep 17 00:00:00 2001
From: Marty Oehme <contact@martyoeh.me>
Date: Fri, 28 Feb 2025 20:07:25 +0100
Subject: [PATCH] river: Use built-in option to set compose key
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

So far, we used the external `setxkbmap` tool to map the compose key to
the 'menu' button (AltGr on my keyboard). With this I am able to type
äöü€ß.

Now using the built-in option in riverctl which I just discovered, so we
rely on fewer external programs.

Also setting the keyboard itself to 'us(altgr-intl)' which I _think_ I
had enabled before. If it turns out not, well, can always change back to
us layout with a single line.
---
 desktop/.config/river/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/desktop/.config/river/init b/desktop/.config/river/init
index 4860fd7..1f142af 100755
--- a/desktop/.config/river/init
+++ b/desktop/.config/river/init
@@ -44,6 +44,7 @@ should_start() { # 1=program binary name
     fi
 }
 
+riverctl keyboard-layout -options compose:menu "us(altgr-intl)"
 ## OPTIONS
 riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
 riverctl focus-follows-cursor normal
@@ -301,7 +302,6 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do
     riverctl input "$pad" pointer-accel 0.5
 done
 
-setxkbmap -option "compose:menu"
 
 # We are not in voidlinux, so no nice turnstile user services will take care of us
 # have to start everything manually here.