INITIAL
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
sway \
|
||||
xwayland \
|
||||
dbus-x11 \
|
||||
libwayland-client0 \
|
||||
libwayland-server0 \
|
||||
libwayland-egl1 \
|
||||
mesa-vulkan-drivers \
|
||||
libvulkan1 \
|
||||
fonts-liberation \
|
||||
x11-xserver-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY sway.conf /etc/sway/config
|
||||
COPY start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
# Need to run as root to access DRM devices on many kiosk setups
|
||||
USER root
|
||||
|
||||
CMD ["/start.sh"]
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure runtime directory exists
|
||||
mkdir -p /run/wayland
|
||||
chmod 0700 /run/wayland
|
||||
|
||||
# Set env vars for Wayland/Sway
|
||||
export XDG_RUNTIME_DIR=/run/wayland
|
||||
export WAYLAND_DISPLAY=wayland-1
|
||||
export WLR_BACKENDS=drm,libinput
|
||||
# Fallback to headless if DRM is not available (useful for testing on mac/desktop without actual DRM)
|
||||
# export WLR_BACKENDS=headless
|
||||
|
||||
# Run sway
|
||||
echo "Starting Sway..."
|
||||
exec sway -d -c /etc/sway/config
|
||||
@@ -0,0 +1,29 @@
|
||||
# Default sway config for Kiosk
|
||||
|
||||
# Disable default bar
|
||||
bar {
|
||||
mode invisible
|
||||
}
|
||||
|
||||
# Remove window borders and title bars
|
||||
default_border none
|
||||
default_floating_border none
|
||||
hide_edge_borders both
|
||||
|
||||
# Map workspaces to specific outputs
|
||||
# Note: In a real Pi 4 environment, the outputs might be named HDMI-A-1 and HDMI-A-2.
|
||||
# You can customize these output names based on `swaymsg -t get_outputs`.
|
||||
workspace 1 output HDMI-A-1
|
||||
workspace 2 output HDMI-A-2
|
||||
|
||||
# Set a black background
|
||||
output * bg #000000 solid_color
|
||||
|
||||
# Idle configuration
|
||||
# We don't want the screen to turn off in a kiosk.
|
||||
exec swayidle -w \
|
||||
timeout 3600 'swaymsg "output * dpms on"' \
|
||||
resume 'swaymsg "output * dpms on"'
|
||||
|
||||
# Include any other specific configurations
|
||||
include /etc/sway/config.d/*
|
||||
Reference in New Issue
Block a user