redox/config/x11.toml
2025-11-20 13:43:17 -07:00

153 lines
2.7 KiB
TOML

# X11 configuration
include = ["desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 2048
# Package settings
[packages]
adwaita-icon-theme = {}
caja = {}
dbus = {}
gtk3 = {}
marco = {}
mate-control-center = {}
mate-icon-theme = {}
mate-panel = {}
mate-session-manager = {}
mate-settings-daemon = {}
mate-terminal = {}
mesa-demos-x11 = {}
webkitgtk3 = {}
xev = {}
xeyes = {}
#xfce4-panel = {}
#xfwm4 = {}
xinit = {}
xkbcomp = {}
xkbutils = {}
xkeyboard-config = {}
xserver-xorg = {}
xserver-xorg-video-orbital = {}
xterm = {}
zenity = {}
[[files]]
path = "/usr/lib/init.d/10_dbus"
data = """
export DBUS_DEBUG_OUTPUT=1
#export DBUS_VERBOSE=1
#export G_DBUS_DEBUG=all
mkdir -p /var/lib/dbus
dbus-uuidgen --ensure
mkdir -p /run/dbus
dbus-daemon --system
"""
[[files]]
path = "/usr/lib/init.d/10_xenv"
data = """
export DISPLAY :0
glib-compile-schemas /usr/share/glib-2.0/schemas/
"""
# Overridden to launch X instead of orblogin
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export BROWSER /bin/netsurf-fb
export VT 3
orbital orbital-x11
unset BROWSER
unset VT
"""
[[files]]
path = "/usr/bin/orbital-x11"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
# Generate config file
WIDTH="$((0x$(grep FRAMEBUFFER_WIDTH /scheme/sys/env | cut -d '=' -f 2)))"
HEIGHT="$((0x$(grep FRAMEBUFFER_HEIGHT /scheme/sys/env | cut -d '=' -f 2)))"
mkdir -p /usr/share/X11/xorg.conf.d
cat > /usr/share/X11/xorg.conf.d/orbital.conf <<EOF
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
VideoRam 256000
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
$(cvt "${WIDTH}" "${HEIGHT}")
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "${WIDTH}x${HEIGHT}"
EndSubSection
EndSection
EOF
# Launch X11 and session on display 0
export DISPLAY=":0"
X "${DISPLAY}" &
sleep 1
exec dbus-launch --exit-with-x11 orbital-x11-session
"""
[[files]]
path = "/usr/bin/orbital-x11-session"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
xterm&
sleep 1
mate-session&
"""
[[files]]
path = "/usr/bin/browser"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
#export G_MAIN_POLL_DEBUG=1
export G_MESSAGES_DEBUG=all
#export GDK_DEBUG=all
#export GTK_DEBUG=all
export LD_DEBUG=all
#export WEBKIT_DEBUG=all
exec MiniBrowser --dark-mode --ignore-tls-errors "about:blank"
"""
[users.messagebus]
uid = 100
gid = 100
name = "messagebus"
home = "/nonexistent"
shell = "/usr/bin/false"