From f9c58ca098d895e5d18ff185e5b4db8629aeb1d3 Mon Sep 17 00:00:00 2001 From: Merith Date: Thu, 5 Jun 2025 05:26:41 +0000 Subject: [PATCH] make it smol. nuked the VNC server as that added, i shit ye not, 350mb --- Dockerfile | 19 +++++++------------ i3.config | 3 +++ vnc.sh | 29 ----------------------------- 3 files changed, 10 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7aba4a5..165f227 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,14 @@ FROM alpine:latest -ENV VNC_BUILTIN_WIDTH=1024 \ - VNC_BUILTIN_HEIGHT=768 \ - VNC_BUILTIN_PIXELDEPTH=32 \ - VNC_BUILTIN_DISABLED=true \ - DISPLAY=:0 - -# Install packages: X/VNC, fonts, terminal, i3, and utilities +# Install only essential packages RUN apk add --no-cache \ - x11vnc xvfb xterm bash \ - procps iproute2 inetutils-telnet xdpyinfo wget \ - font-dejavu fontconfig \ - i3wm i3blocks i3status htop - + xterm bash \ + procps inetutils-telnet \ + fontconfig \ + i3wm i3status + # Configure i3 +RUN mkdir -p /root/.config/i3 COPY i3.config /root/.config/i3/config # Entrypoint script diff --git a/i3.config b/i3.config index 9a90cba..4078298 100644 --- a/i3.config +++ b/i3.config @@ -6,6 +6,9 @@ bindsym $mod+Return exec xterm # Restart i3 inplace (preserves layout/session) bindsym $mod+Shift+r restart +# Close active window +bindsym $mod+Shift+q kill + # Workspace switching (workspaces 1 to 4) bindsym $mod+1 workspace 1 bindsym $mod+2 workspace 2 diff --git a/vnc.sh b/vnc.sh index e728a84..91ee65e 100644 --- a/vnc.sh +++ b/vnc.sh @@ -1,34 +1,5 @@ #!/bin/bash -# Prepare variables -: "${VNC_BUILTIN_WIDTH:=1024}" -: "${VNC_BUILTIN_HEIGHT:=786}" -: "${VNC_BUILTIN_PIXELDEPTH:=32}" -: "${VNC_BUILTIN_DISABLED:=true}" - -if [ "${VNC_BUILTIN_DISABLED}" = true ]; then - echo "Builtin VNC is disabled. You must ensure the DISPLAY variable is set and the target display is accessible" - echo "Using display ${DISPLAY}" -else - echo "Builtin VNC is enabled. The DISPLAY variable will be ignored and overwritten" - export DISPLAY=":0" - - echo "Using display ${DISPLAY} with size of ${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT} and pixel depth ${VNC_BUILTIN_PIXELDEPTH}" - Xvfb ${DISPLAY} -screen 0 "${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT}x${VNC_BUILTIN_PIXELDEPTH}" & -fi - -# Wait for the display to become ready -while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do - echo "Waiting for display ${DISPLAY} to become ready..." - sleep 1 -done -echo "Display ${DISPLAY} is ready!" - -# Launch the VNC server if enabled -if [ "${VNC_BUILTIN_DISABLED}" != true ]; then - x11vnc -bg -forever -nopw -display ${DISPLAY} & -fi - # Launch i3 window manager /usr/bin/i3