commit 8e770447c73ef83ccd9765e2679cc200543cdc9d
parent 760cbe8c30c1f3a37903f6b267d2003e0f103bf4
Author: torter <koubbamohamedrayan@gmail.com>
Date: Tue, 17 Nov 2026 20:11:43 +0000
graphical stage files, the 9wm ebuild, handbook 3.5 on the other stages
Diffstat:
8 files changed, 104 insertions(+), 0 deletions(-)
diff --git a/graphical/etc/X11/xinit/xinitrc b/graphical/etc/X11/xinit/xinitrc
@@ -0,0 +1,9 @@
+#!/bin/sh
+export PLAN9=/opt/plan9
+export PATH=$PATH:$PLAN9/bin
+export EDITOR="sam -d"
+xsetroot -solid '#ddddaa' 2>/dev/null
+sxhkd -c /etc/sxhkd/sxhkdrc &
+plumber &
+9term -W 800x500+40+40 &
+exec 9wm -term 9term
diff --git a/graphical/etc/sxhkd/sxhkdrc b/graphical/etc/sxhkd/sxhkdrc
@@ -0,0 +1,23 @@
+# the dwm keys, as far as a window manager without tags can have them
+super + t
+ 9term
+super + shift + Return
+ 9term
+super + d
+ dmenu_run -i -p run:
+super + a
+ acme
+super + e
+ 9term -c sam
+super + shift + q
+ pkill -x 9wm
+XF86AudioRaiseVolume
+ amixer -q set Master 5%+
+XF86AudioLowerVolume
+ amixer -q set Master 5%-
+XF86AudioMute
+ amixer -q set Master toggle
+XF86MonBrightnessUp
+ brightnessctl -q set 5%+
+XF86MonBrightnessDown
+ brightnessctl -q -n 1% set 5%-
diff --git a/graphical/usr/bin/chamesle-session b/graphical/usr/bin/chamesle-session
@@ -0,0 +1,8 @@
+#!/bin/sh
+# the login on tty1 of a graphical stage: starts X with rio, and comes back to the shell when X ends
+export PLAN9=/opt/plan9
+export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PLAN9/bin
+export HOME=${HOME:-/root}
+cd "$HOME"
+startx /etc/X11/xinit/xinitrc -- :0 vt1 -keeptty >"$HOME/.xsession-errors" 2>&1
+exec /usr/bin/mksh -l
diff --git a/handbook/handbook.md b/handbook/handbook.md
@@ -245,6 +245,42 @@ hoard, and pack the root:
GNU patch is the one thing the stage3 does not give, and it is built from source.
+### 3.5 The other stages
+
+There are four stages. The unpacking in 3.3 is the same for all of them; only the tarball differs.
+
+| tarball | libc | what is in it |
+|---------|------|---------------|
+| `chamesle-stage-DATE` | musl | the base of 3.3: rifle, mksh, Winchester, gcc, SPAS, sam |
+| `chamesle-stage-graphical-DATE` | musl | the base, plus X, 9wm, sxhkd, dmenu, and plan9port with 9term and acme |
+| `chamesle-stage-glibc-DATE` | glibc | Gentoo's glibc userland (GNU coreutils stay), with Winchester, mksh, SPAS, rifle and sam |
+| `chamesle-stage-glibc-graphical-DATE` | glibc | the glibc stage, plus the same graphical set |
+
+Pick the libc by what you want to run. musl is Chamesle's own; glibc is for programs that only come as binaries for glibc.
+SPAS reads the profile in `/etc/spas/make.profile`, which is the musl profile in the musl stages and the plain one in the
+glibc stages.
+
+#### The graphical stages
+
+On the first boot the login on tty1 is `chamesle-session`, not a shell. It starts X, and X starts `9wm`, which is the
+window manager that looks and works like rio: the right button makes windows (New, Reshape, Move, Delete, Hide), and
+text is selected and cut by chording the mouse buttons. A `9term` is open when it comes up, with `plumber` behind it.
+When X ends you land in `mksh`. The login is `root` with no password until you set one (3.7).
+
+`sxhkd` carries the keys of the dwm setup that make sense without tags (`/etc/sxhkd/sxhkdrc`):
+
+| key | does |
+|-----|------|
+| Super+t, Super+Shift+Return | a new `9term` |
+| Super+d | `dmenu_run` |
+| Super+a | `acme` |
+| Super+e | `sam` in a `9term` |
+| Super+Shift+q | ends the session (kills `9wm`) |
+| volume and brightness keys | `amixer` and `brightnessctl` |
+
+`EDITOR` is `sam -d` there too. Everything is a file to change: `/etc/X11/xinit/xinitrc` is the session, and
+`getty-tty1` in `/etc/init.conf` is what starts it. Take that line out to go back to a plain login.
+
### 3.6 fstab
If you used chamesle-disk the file is written. Look at it: the boot partition by UUID on `/boot`, then `proc`, `sysfs`
diff --git a/overlay/metadata/layout.conf b/overlay/metadata/layout.conf
@@ -0,0 +1,2 @@
+masters = gentoo
+thin-manifests = true
diff --git a/overlay/profiles/repo_name b/overlay/profiles/repo_name
@@ -0,0 +1 @@
+chamesle
diff --git a/overlay/x11-wm/9wm/9wm-1.4.2.ebuild b/overlay/x11-wm/9wm/9wm-1.4.2.ebuild
@@ -0,0 +1,24 @@
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="A rio-like window manager for X"
+HOMEPAGE="https://github.com/9wm/9wm"
+SRC_URI="https://github.com/9wm/9wm/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64"
+
+RDEPEND="x11-libs/libX11 x11-libs/libXext"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -DSHAPE -DCOLOR -D_XOPEN_SOURCE" LDFLAGS="${LDFLAGS}" 9wm
+}
+
+src_install() {
+ dobin 9wm
+ newman 9wm.man 9wm.1
+ dodoc README.md CUSTOMIZING.md
+}
diff --git a/overlay/x11-wm/9wm/Manifest b/overlay/x11-wm/9wm/Manifest
@@ -0,0 +1 @@
+DIST 9wm-1.4.2.tar.gz 22099 BLAKE2B 01df40981dc2262c73a86bd04962351e689d61db9754a96f4e549fed916a8146f3e5899f4ae82bcd4c33296b2717d43333dfcb64b54adc2686b61ebcc1e43878 SHA512 4ea27b4a0851519fd1a8ccbd9e4c19addd592a2cd0a5dd1b077661564594b1ceb653cd8ec304ee56654cefa922514a02b041ad3d3639ef43efdb830cdec7485e