diff --git a/README.md b/README.md index 02b8aae..5ea3ad9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ANODE is a lightweight, keyboard-first, cross-Unix X11 desktop environment for * - **st (`0.9.2-anode`)**: HarfBuzz programming ligatures (`Fira Code`, defaulting to `size=13` scaled via live `Xft.dpi`), dirty-cell rendering cache, focus-gated cursor blink, explicit `St.font` override precedence with `~/.config/anode/Xresources.local`, `SIGUSR1` live reload, and portable Linux/BSD PTY handling. - **Unified `.xth` theme & fractional DPI scaling engine**: - 22 normalized 96-DPI `.xth` themes (`data/themes/*.xth`) pairing `Fira Code` monospace (`theme.fontFace` for ANODE-native components and third-party monospace slots) with `Roboto` non-monospace UI typography (`theme.uiFontFace` for third-party toolkits, automatically falling back to `Noto Sans` when `Roboto` is unavailable). - - `anode-apply-scale` & `anode-apply-theme` treat `scale.conf` as authoritative over stale session environment variables and synchronize `.Xresources`, `xrdb`, `dwm`, `dmenu`, `st`, `libgemui` dialogs, `anode-vkbd`, `dunst` (`scale = 1` + `Fira Code` pixel font sizing) — keeping ANODE-native components on `Fira Code` — alongside third-party toolkits using `Roboto` / `Noto Sans` UI fonts and `Fira Code` monospace slots: GTK-2, GTK-3, GTK-4 / `libadwaita` (built-in Adwaita/Default `resource:///...` inheritance with color-only overrides and dark/light auto-detection), `xsettingsd` (with discrete Xcursor size tiers), Fontconfig `60-anode-fonts.conf` (`sans-serif` -> `Roboto`/`Noto Sans`, `monospace` -> `Fira Code`), `gsettings`, Qt5 & Qt6 (`QT_QPA_PLATFORMTHEME=gtk3:qt6ct:qt5ct` following GTK-3 with synced `qt5ct`/`qt6ct` `general=` UI / `fixed=` monospace fonts & palettes), Kvantum, and Tk (`gtkTtk`) without double-scaling. + - `anode-apply-scale` & `anode-apply-theme` treat `scale.conf` as authoritative over stale session environment variables and synchronize `.Xresources`, `xrdb`, `dwm`, `dmenu`, `st`, `libgemui` dialogs, `anode-vkbd`, `dunst` (`scale = 1` + `Fira Code` pixel font sizing) — keeping ANODE-native components on `Fira Code` — alongside third-party toolkits using `Roboto` / `Noto Sans` UI fonts and `Fira Code` monospace slots: GTK-2, GTK-3, GTK-4 / `libadwaita` (built-in Adwaita/Default `resource:///...` inheritance with color-only overrides and dark/light auto-detection), `xsettingsd` (with discrete Xcursor size tiers and balanced `Gdk/WindowScalingFactor`, `Gdk/UnscaledDPI`, and `Xft/DPI` while keeping `GDK_SCALE`/`GDK_DPI_SCALE` unset so GTK and Chromium/Electron avoid double-scaling), Fontconfig `60-anode-fonts.conf` (`sans-serif` -> `Roboto`/`Noto Sans`, `monospace` -> `Fira Code`), `gsettings`, Qt5 & Qt6 (`QT_QPA_PLATFORMTHEME=gtk3:qt6ct:qt5ct` following GTK-3 with synced `qt5ct`/`qt6ct` `general=` UI / `fixed=` monospace fonts & palettes), Kvantum, and Tk (`gtkTtk`) without double-scaling. - **GemUI toolkit (`libgemui`) & desktop utilities**: - `anode-net`: Wi-Fi (`nmcli` / `wpa_cli` / BSD `ifconfig`), POSIX `getifaddrs` interfaces, Bluetooth (`bluetoothctl`), and DNS presets/custom nameservers (`anode-dnsctl`). - `anode-audio`: PipeWire (`wpctl`), PulseAudio (`pactl`), ALSA (`amixer`), OpenBSD `sndioctl`, and OSS audio mixer & profile/stream control. diff --git a/data/env.sh b/data/env.sh index eb3bff6..5b7c542 100755 --- a/data/env.sh +++ b/data/env.sh @@ -48,8 +48,9 @@ fi # Non-double-scaling multi-toolkit defaults : "${ANODE_SCALE:=1.00}" : "${ANODE_TOUCH:=0}" -: "${GDK_SCALE:=1}" -: "${GDK_DPI_SCALE:=1.0}" +# Keep GDK_SCALE/GDK_DPI_SCALE unset so GTK-3/4 and Chromium/Electron honor +# balanced XSETTINGS (Gdk/WindowScalingFactor + Gdk/UnscaledDPI + Xft/DPI) without double-scaling. +unset GDK_SCALE GDK_DPI_SCALE || true : "${ADW_DISABLE_PORTAL:=1}" : "${QT_QPA_PLATFORMTHEME:=gtk3:qt6ct:qt5ct}" : "${QT_AUTO_SCREEN_SCALE_FACTOR:=0}" @@ -58,7 +59,7 @@ fi : "${QT_SCALE_FACTOR:=$ANODE_SCALE}" : "${QT_FONT_DPI:=96}" : "${GTK_USE_PORTAL:=0}" -export ANODE_SCALE ANODE_TOUCH GDK_SCALE GDK_DPI_SCALE ADW_DISABLE_PORTAL \ +export ANODE_SCALE ANODE_TOUCH ADW_DISABLE_PORTAL \ QT_QPA_PLATFORMTHEME QT_AUTO_SCREEN_SCALE_FACTOR QT_ENABLE_HIGHDPI_SCALING \ QT_SCALE_FACTOR_ROUNDING_POLICY QT_SCALE_FACTOR QT_FONT_DPI GTK_USE_PORTAL diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 532b317..cf9178d 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -17,7 +17,7 @@ For a user or EDID-detected scale `S` clamped to `[0.50, 4.00]`: - `Xft.dpi = round(96 * S)` (`anode-apply-scale auto` honors explicit `xdpyinfo` server DPI outside `[94, 98]` before falling back to physical XRandR EDID dimensions) - `ANODE_SCALE = S`, `theme.baseFontSize = round(15 * S)`, and discrete standard Xcursor sizes (`16`, `24`, `32`, `48`, `64` mapped from `24 * S`); `~/.config/anode/scale.conf` takes precedence over stale session environment variables during live updates, while `anode-apply-scale` and `dwm` propagate updated scaling environment variables across `X11`, `D-Bus`, and newly spawned child processes. -- **GTK-2 / GTK-3 / GTK-4 / xsettingsd / Fontconfig**: `GDK_SCALE = (S < 1.75) ? 1 : round(S)`, `GDK_DPI_SCALE = 1 / GDK_SCALE`, `ADW_DISABLE_PORTAL=1`, unscaled logical non-monospace UI point sizes (`theme.uiFontFace`, `Roboto` with automatic `Noto Sans` fallback, `round((baseFontSize / S) * 0.65)`, e.g. `10pt`) because `Xft.dpi` is active (`Xft/DPI` remains omitted from `xsettingsd.conf` to avoid double-scaling), generated `~/.themes/ANODE-/gtk-{3.0,4.0}/gtk.css` themes inherit GTK's built-in Adwaita/Default stylesheets via `resource:///...` `@import` (auto-detecting dark vs light from `theme.isDark` or `theme.bgMain` luminance) with color-only overrides so native widget/menu spacing and borders stay intact, color-only `@define-color` overrides in `~/.config/gtk-{3.0,4.0}/gtk.css`, Fontconfig `$XDG_CONFIG_HOME/fontconfig/conf.d/60-anode-fonts.conf` aliasing `sans-serif` to `Roboto`/`Noto Sans` and `monospace` to `Fira Code`, `gsettings` synchronization (`org.gnome.desktop.interface`) when active, `gtk-cursor-theme-size = Xcursor.size` for GTK-2, and `Gtk/CursorThemeSize` / `gtk-cursor-theme-size = round(Xcursor.size / GDK_SCALE)` for `xsettingsd` and GTK-3/4. +- **GTK-2 / GTK-3 / GTK-4 / xsettingsd / Fontconfig**: `Gdk/WindowScalingFactor = (S < 1.75) ? 1 : round(S)`, `Xft/DPI = Xft.dpi * 1024`, and `Gdk/UnscaledDPI = round(Xft/DPI / Gdk/WindowScalingFactor)` in `xsettingsd.conf` with `GDK_SCALE` and `GDK_DPI_SCALE` kept unset (`unset`) so GTK-3, GTK-4, and Chromium/Electron apps scale cleanly without multiplying `Xft.dpi * GDK_SCALE`; `ADW_DISABLE_PORTAL=1`, unscaled logical non-monospace UI point sizes (`theme.uiFontFace`, `Roboto` with automatic `Noto Sans` fallback, `round((baseFontSize / S) * 0.65)`, e.g. `10pt`), generated `~/.themes/ANODE-/gtk-{3.0,4.0}/gtk.css` themes inherit GTK's built-in Adwaita/Default stylesheets via `resource:///...` `@import` (auto-detecting dark vs light from `theme.isDark` or `theme.bgMain` luminance) with color-only overrides so native widget/menu spacing and borders stay intact, color-only `@define-color` overrides in `~/.config/gtk-{3.0,4.0}/gtk.css`, Fontconfig `$XDG_CONFIG_HOME/fontconfig/conf.d/60-anode-fonts.conf` aliasing `sans-serif` to `Roboto`/`Noto Sans` and `monospace` to `Fira Code`, `gsettings` synchronization (`org.gnome.desktop.interface`) when active, `gtk-cursor-theme-size = Xcursor.size` for GTK-2, and `Gtk/CursorThemeSize` / `gtk-cursor-theme-size = round(Xcursor.size / Gdk/WindowScalingFactor)` for `xsettingsd` and GTK-3/4. - **Dunst notifications**: `anode-sync-dunst-theme` pins `scale = 1`, pre-scales geometry by `S`, and uses pixel font sizing (`Fira Code px`) so `Xft.dpi` never double-scales notifications. - **User `.Xresources` & terminal overrides**: `anode-apply-theme` sets `st.font` to `Fira Code:size=13`, preserves explicit `St.*` resource lines across theme switches, and appends `$XDG_CONFIG_HOME/anode/Xresources.local`, while `st` defaults to `Fira Code:size=13`, honors explicit `St.font` overrides over `st.font`, and resolves `size=` fonts against live `Xft.dpi`. - **Qt5 / Qt6**: `QT_QPA_PLATFORMTHEME=gtk3:qt6ct:qt5ct` (Qt follows ANODE's active GTK-3 theme first, with synced palettes and `general=Roboto,10` / `fixed=Fira Code,10` typography in `~/.config/qt5ct/` and `~/.config/qt6ct/` as fallback), `QT_AUTO_SCREEN_SCALE_FACTOR=0`, `QT_ENABLE_HIGHDPI_SCALING=1`, `QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough`, `QT_SCALE_FACTOR=S`, and `QT_FONT_DPI=96`. diff --git a/scripts/anode-apply-scale b/scripts/anode-apply-scale index 6a6fac7..0d7b228 100755 --- a/scripts/anode-apply-scale +++ b/scripts/anode-apply-scale @@ -120,10 +120,6 @@ CALC="$(awk -v raw="$SCALE" -v touch="$TOUCH" 'BEGIN { s = int(s * 100.0 + 0.5) / 100.0 xft_dpi = int(96.0 * s + 0.5) gdk_scale = (s < 1.75) ? 1 : int(s + 0.5) - if (gdk_scale <= 1) gdk_dpi = "1.0" - else if (gdk_scale == 2) gdk_dpi = "0.5" - else if (gdk_scale == 4) gdk_dpi = "0.25" - else gdk_dpi = sprintf("%.3f", 1.0 / gdk_scale) raw_cur = 24.0 * s if (raw_cur < 20.0) cur_sz = 16 else if (raw_cur < 32.0) cur_sz = 24 @@ -131,16 +127,15 @@ CALC="$(awk -v raw="$SCALE" -v touch="$TOUCH" 'BEGIN { else if (raw_cur < 64.0) cur_sz = 48 else cur_sz = 64 t = (touch == "1" || touch == 1) ? 1 : 0 - printf "%.2f %d %d %s %d %d\n", s, xft_dpi, gdk_scale, gdk_dpi, cur_sz, t + printf "%.2f %d %d %d %d\n", s, xft_dpi, gdk_scale, cur_sz, t }')" set -- $CALC SCALE="$1" XFT_DPI="$2" GDK_SCALE="$3" -GDK_DPI_SCALE="$4" -XCURSOR_SIZE="$5" -TOUCH="$6" +XCURSOR_SIZE="$4" +TOUCH="$5" mkdir -p "$CONF_DIR" @@ -160,8 +155,9 @@ cat > "$TMP_ENV" </dev/null 2>&1; then dbus-update-activation-environment --systemd \ ANODE_SCALE="$SCALE" ANODE_TOUCH="$TOUCH" \ - GDK_SCALE="$GDK_SCALE" GDK_DPI_SCALE="$GDK_DPI_SCALE" \ QT_QPA_PLATFORMTHEME="gtk3:qt6ct:qt5ct" \ QT_SCALE_FACTOR="$SCALE" XCURSOR_SIZE="$XCURSOR_SIZE" >/dev/null 2>&1 || \ dbus-update-activation-environment \ ANODE_SCALE="$SCALE" ANODE_TOUCH="$TOUCH" \ - GDK_SCALE="$GDK_SCALE" GDK_DPI_SCALE="$GDK_DPI_SCALE" \ QT_QPA_PLATFORMTHEME="gtk3:qt6ct:qt5ct" \ QT_SCALE_FACTOR="$SCALE" XCURSOR_SIZE="$XCURSOR_SIZE" >/dev/null 2>&1 || true fi if command -v systemctl >/dev/null 2>&1; then + systemctl --user unset-environment GDK_SCALE GDK_DPI_SCALE >/dev/null 2>&1 || true systemctl --user set-environment \ ANODE_SCALE="$SCALE" ANODE_TOUCH="$TOUCH" \ - GDK_SCALE="$GDK_SCALE" GDK_DPI_SCALE="$GDK_DPI_SCALE" \ QT_QPA_PLATFORMTHEME="gtk3:qt6ct:qt5ct" \ QT_SCALE_FACTOR="$SCALE" XCURSOR_SIZE="$XCURSOR_SIZE" >/dev/null 2>&1 || true fi fi fi -printf 'ANODE scale: %s (Xft.dpi=%s, GDK_SCALE=%s, QT_SCALE_FACTOR=%s, Xcursor=%s, touch=%s)\n' \ +printf 'ANODE scale: %s (Xft.dpi=%s, WindowScale=%s, QT_SCALE_FACTOR=%s, Xcursor=%s, touch=%s)\n' \ "$SCALE" "$XFT_DPI" "$GDK_SCALE" "$SCALE" "$XCURSOR_SIZE" "$TOUCH" diff --git a/scripts/anode-launcher b/scripts/anode-launcher index c2dc63c..499757d 100755 --- a/scripts/anode-launcher +++ b/scripts/anode-launcher @@ -424,6 +424,12 @@ if [ -n "${_wd:-}" ] && [ -d "$_wd" ]; then cd "$_wd" || true fi +: "${XDG_CONFIG_HOME:=$HOME/.config}" +if [ -r "$XDG_CONFIG_HOME/anode/scale.env" ]; then + . "$XDG_CONFIG_HOME/anode/scale.env" +fi +unset GDK_SCALE GDK_DPI_SCALE || true + if [ "${_tm:-0}" = "1" ]; then if command -v setsid >/dev/null 2>&1; then exec setsid st -e /bin/sh -c "exec $CMD" /dev/null 2>&1 & diff --git a/scripts/anode-replace b/scripts/anode-replace index b73b6d7..61ef1e8 100755 --- a/scripts/anode-replace +++ b/scripts/anode-replace @@ -315,7 +315,8 @@ sync_activation_env() { GNOME_DESKTOP_SESSION_ID MATE_DESKTOP_SESSION_ID CINNAMON_VERSION \ XFCE_SESSION LXQT_SESSION_CONFIG TDE_FULL_SESSION \ HYPRLAND_INSTANCE_SIGNATURE SWAYSOCK I3SOCK BSPWM_SOCKET \ - WINDOWMAKER E_START GDMSESSION >/dev/null 2>&1 || true + WINDOWMAKER E_START GDMSESSION \ + GDK_SCALE GDK_DPI_SCALE >/dev/null 2>&1 || true if [ "${ANODE_KEEP_GTK_THEME:-0}" != "1" ]; then systemctl --user unset-environment GTK_THEME >/dev/null 2>&1 || true fi @@ -408,7 +409,8 @@ unset KDE_FULL_SESSION KDE_SESSION_VERSION KDE_SESSION_UID \ GNOME_DESKTOP_SESSION_ID MATE_DESKTOP_SESSION_ID CINNAMON_VERSION \ XFCE_SESSION LXQT_SESSION_CONFIG TDE_FULL_SESSION \ HYPRLAND_INSTANCE_SIGNATURE SWAYSOCK I3SOCK BSPWM_SOCKET \ - WINDOWMAKER E_START GDMSESSION || true + WINDOWMAKER E_START GDMSESSION \ + GDK_SCALE GDK_DPI_SCALE || true if [ "${ANODE_KEEP_GTK_THEME:-0}" != "1" ]; then unset GTK_THEME || true fi diff --git a/scripts/anode-session b/scripts/anode-session index 61f123d..8de05cd 100755 --- a/scripts/anode-session +++ b/scripts/anode-session @@ -40,7 +40,8 @@ unset KDE_FULL_SESSION KDE_SESSION_VERSION KDE_SESSION_UID \ GNOME_DESKTOP_SESSION_ID MATE_DESKTOP_SESSION_ID CINNAMON_VERSION \ XFCE_SESSION LXQT_SESSION_CONFIG TDE_FULL_SESSION \ HYPRLAND_INSTANCE_SIGNATURE SWAYSOCK I3SOCK BSPWM_SOCKET \ - WINDOWMAKER E_START GDMSESSION || true + WINDOWMAKER E_START GDMSESSION \ + GDK_SCALE GDK_DPI_SCALE || true if [ "${ANODE_KEEP_GTK_THEME:-0}" != "1" ]; then unset GTK_THEME || true fi @@ -67,6 +68,7 @@ if [ "${ANODE_NO_DBUS:-0}" != "1" ]; then systemctl --user set-environment \ XDG_CURRENT_DESKTOP=ANODE XDG_SESSION_DESKTOP=anode \ DESKTOP_SESSION=anode XDG_SESSION_TYPE=x11 >/dev/null 2>&1 || true + systemctl --user unset-environment GDK_SCALE GDK_DPI_SCALE >/dev/null 2>&1 || true if [ "${ANODE_KEEP_GTK_THEME:-0}" != "1" ]; then systemctl --user unset-environment GTK_THEME >/dev/null 2>&1 || true fi diff --git a/scripts/anode-sync-gtk-theme b/scripts/anode-sync-gtk-theme index b8455fe..dcf83ff 100755 --- a/scripts/anode-sync-gtk-theme +++ b/scripts/anode-sync-gtk-theme @@ -75,6 +75,7 @@ MONO_FONT="$FONT_FACE" UI_FONT="$(resolve_ui_font "$(xres_get theme.uiFontFace "Roboto")")" BASE_SZ="$(xres_get theme.baseFontSize "15")" SCALE="$(xres_get theme.scale "1.00")" +XFT_DPI="$(xres_get Xft.dpi "")" CUR_SZ="$(xres_get Xcursor.size "24")" ICON_THEME="$(xres_get theme.iconTheme "Adwaita")" @@ -105,7 +106,7 @@ DANGER="$(xres_get theme.danger "#f07178")" THEME_ID="ANODE-$TNAME" -CALC="$(awk -v s="$SCALE" -v bsz="$BASE_SZ" -v dark="$DARK" -v bg="$BG_MAIN" -v cur="$CUR_SZ" ' +CALC="$(awk -v s="$SCALE" -v bsz="$BASE_SZ" -v xdpi="$XFT_DPI" -v dark="$DARK" -v bg="$BG_MAIN" -v cur="$CUR_SZ" ' function hex_byte(h, hi, lo) { hi = index("0123456789abcdef", substr(h, 1, 1)) - 1 lo = index("0123456789abcdef", substr(h, 2, 1)) - 1 @@ -131,6 +132,11 @@ BEGIN { if (sc < 0.50) sc = 0.50 if (sc > 4.00) sc = 4.00 gdk_sc = (sc < 1.75) ? 1 : int(sc + 0.5) + dpi = (xdpi != "" && (xdpi + 0.0) > 0.0) ? (xdpi + 0.0) : int(96.0 * sc + 0.5) + if (dpi < 48.0) dpi = 48.0 + if (dpi > 384.0) dpi = 384.0 + xset_dpi = int(dpi * 1024.0 + 0.5) + xset_unscaled_dpi = int((dpi * 1024.0) / gdk_sc + 0.5) logical_px = (bsz + 0.0) / sc pt = int((logical_px * 0.65) + 0.5) if (pt < 7) pt = 7 @@ -144,7 +150,7 @@ BEGIN { else if (dark == "0" || tolower(dark) == "false") is_d = 0 else is_d = bg_is_dark(bg) gtk_cur = int(((cur + 0.0) / gdk_sc) + 0.5); if (gtk_cur < 16) gtk_cur = 16 - printf "%d %d %d %d %d %d %d %d %d\n", gdk_sc, pt, btn_pv, btn_ph, rad, row_h, sb_w, is_d, gtk_cur + printf "%d %d %d %d %d %d %d %d %d %d %d\n", gdk_sc, pt, btn_pv, btn_ph, rad, row_h, sb_w, is_d, gtk_cur, xset_unscaled_dpi, xset_dpi }')" set -- $CALC GDK_SCALE_VAL="$1" @@ -156,6 +162,8 @@ ROW_H="$6" SB_W="$7" IS_DARK="$8" GTK_CUR_SZ="$9" +XSET_UNSCALED_DPI="${10}" +XSET_XFT_DPI="${11}" GTK_FONT="$UI_FONT $GTK_PT" @@ -444,7 +452,7 @@ gtk-cursor-theme-size=$GTK_CUR_SZ EOF mv -f "$GTK4_CONF_DIR/settings.ini.tmp.$$" "$GTK4_CONF_DIR/settings.ini" -# 3. xsettingsd (NOTE: Do NOT emit Xft/DPI here so Xft.dpi + GDK_SCALE never double-scale!) +# 3. xsettingsd (Publish balanced Gdk/WindowScalingFactor + Gdk/UnscaledDPI + Xft/DPI with GDK_SCALE unset) XSET_DIR="$XDG_CONFIG_HOME/xsettingsd" mkdir -p "$XSET_DIR" cat > "$XSET_DIR/xsettingsd.conf.tmp.$$" < \"$HOME/child_env.tmp\" && mv -f \"$HOME/child_env.tmp\" \"$HOME/child_env.txt\"\n") + os.chmod(launcher_stub, 0o755) + + dirty_dwm_env = dict(env) + dirty_dwm_env["PATH"] = fakebin + ":" + dirty_dwm_env.get("PATH", "") + dirty_dwm_env["GDK_SCALE"] = "2" + dirty_dwm_env["GDK_DPI_SCALE"] = "0.5" + dwm = subprocess.Popen([os.path.join(BUILD, "dwm", "dwm")], env=dirty_dwm_env) + tray_atom = X11.XInternAtom(dpy, b"_NET_SYSTEM_TRAY_S0", 0) + assert wait_until(lambda: X11.XGetSelectionOwner(dpy, tray_atom)), "DWM failed to start on Xvfb" + + root = X11.XDefaultRootWindow(dpy) + bar_win = wait_until(lambda: next((w for w in query_children(dpy, root) if "anode-wm" in get_wm_class(dpy, w)), None)) + assert bar_win, "DWM barwin not found" + bev = XButtonEvent() + bev.type = 4 # ButtonPress + bev.display = dpy + bev.window = bar_win + bev.root = root + bev.x = 2 + bev.y = 2 + bev.x_root = 2 + bev.y_root = 2 + bev.state = 0 + bev.button = 1 + bev.same_screen = 1 + X11.XSendEvent(dpy, bar_win, 0, 1 << 2, ctypes.byref(bev)) + X11.XSync(dpy, 0) + assert wait_until(lambda: os.path.isfile(child_env_path)), "DWM did not spawn launcher on bar click" + with open(child_env_path, "r", encoding="utf-8", errors="ignore") as f: + child_lines = [line.strip() for line in f.read().splitlines() if line.strip()] + assert "ANODE_SCALE=2.00" in child_lines, child_lines + assert not any(line.startswith(("GDK_SCALE=", "GDK_DPI_SCALE=")) for line in child_lines), child_lines + finally: + terminate(dwm) + terminate(xsd) + if dpy: + X11.XCloseDisplay(dpy) + terminate(xvfb) + + def main(): if not shutil.which("Xvfb"): print("test_x11_xvfb: Xvfb not installed (skipping)") @@ -638,6 +786,8 @@ def main(): print("test_x11_xvfb: St.font override & Dunst scale=1 OK") test_lockscreen_overlaps_systray() print("test_x11_xvfb: lockscreen overlaps systray OK") + test_gtk_xsettings_no_double_scale() + print("test_x11_xvfb: GTK/XSETTINGS non-double-scaling OK") return 0