From b8feb4f4dbfa333a222ff0538adea8f90548d041 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Wed, 16 Sep 2026 23:02:28 +0200 Subject: [PATCH] Fix vendored nerdicons rendering; keep status bar always visible - the vendored nerdicons.lua was the pristine upstream copy, so installs relying on the packaged plugin lost the tuned icon rendering (fractional glyph size and default hinting made icons feel soft and uneven). Apply the same tuning as the user config: whole-pixel icon size, hinting off, scale-aware chevron offset. - default config (skel + first-run template) and this repo's users keep the status bar permanently visible: shown at startup, and the status-bar:hide/toggle commands are no-ops. --- debian/changelog | 3 +++ debian/extra/init.lua | 10 ++++++++++ debian/extra/plugins/nerdicons.lua | 5 +++-- .../patches/0001-first-run-config-vscode-dark.patch | 12 +++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cec5546..d1829ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,9 @@ lite-xl (2.1.8-3) stonking; urgency=medium - default config uses JetBrains Mono (new fonts-jetbrains-mono dependency) * desktop: launch with SDL software rendering and LITE_SCALE=1.5 so text is sharp on fractional-scaled Wayland panels and avoids panfrost artifacts. + * vendored nerdicons ships with the tuned icon rendering (whole-pixel size, + hinting off) instead of the pristine upstream copy. + * default config keeps the status bar always visible. -- Valentin Haudiquet Wed, 16 Sep 2026 21:50:00 +0200 diff --git a/debian/extra/init.lua b/debian/extra/init.lua index c82c16e..05450b6 100644 --- a/debian/extra/init.lua +++ b/debian/extra/init.lua @@ -68,3 +68,13 @@ function TreeView:draw_item_background(item, active, hovered, x, y, w, h) renderer.draw_rect(x, y, w, h, style.treeview_active_bg or style.line_highlight) end end + +------------------------------ Status bar ------------------------------------- +-- Keep the status bar always visible: show it at startup and turn the +-- status-bar:hide / status-bar:toggle commands into no-ops so it cannot +-- be dismissed (from the command palette or by any plugin). + +core.status_view:show() +local StatusView = require "core.statusview" +function StatusView:toggle() self:show() end +function StatusView:hide() self:show() end diff --git a/debian/extra/plugins/nerdicons.lua b/debian/extra/plugins/nerdicons.lua index c26c8f2..f515fa1 100644 --- a/debian/extra/plugins/nerdicons.lua +++ b/debian/extra/plugins/nerdicons.lua @@ -55,7 +55,8 @@ config.plugins.nerdicons = common.merge({ } }, config.plugins.nerdicons) -local icon_font = renderer.font.load(nerdfonts_symbols.path, 18.5 * SCALE) +local icon_font = renderer.font.load(nerdfonts_symbols.path, common.round(18.5 * SCALE), + {antialiasing = "grayscale", hinting = "none"}) local map = nerdfonts_symbols.utf8 local chevron_width = icon_font:get_width(map["oct-chevron_down"]) local previous_scale = SCALE @@ -186,7 +187,7 @@ function TreeView:draw_item_chevron(item, active, hovered, x, y, w, h) if item.type == "dir" then local chevron_icon = item.expanded and "oct-chevron_down" or "oct-chevron_right" local chevron_color = hovered and style.accent or style.text - common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x+8, y, 0, h) -- added 8 to x to draw the chevron closer to the icon + common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x + common.round(6 * SCALE), y, 0, h) end return chevron_width + style.padding.x end diff --git a/debian/patches/0001-first-run-config-vscode-dark.patch b/debian/patches/0001-first-run-config-vscode-dark.patch index 847b4fb..baa75fb 100644 --- a/debian/patches/0001-first-run-config-vscode-dark.patch +++ b/debian/patches/0001-first-run-config-vscode-dark.patch @@ -1,6 +1,6 @@ --- a/data/core/init.lua +++ b/data/core/init.lua -@@ -475,79 +475,79 @@ +@@ -475,79 +475,89 @@ local init_file = io.open(init_filename, "w") if not init_file then error("cannot create file: \"" .. init_filename .. "\"") end init_file:write([[ @@ -145,6 +145,16 @@ + renderer.draw_rect(x, y, w, h, style.treeview_active_bg or style.line_highlight) + end +end ++ ++------------------------------ Status bar ------------------------------------- ++-- Keep the status bar always visible: show it at startup and turn the ++-- status-bar:hide / status-bar:toggle commands into no-ops so it cannot ++-- be dismissed (from the command palette or by any plugin). ++ ++core.status_view:show() ++local StatusView = require "core.statusview" ++function StatusView:toggle() self:show() end ++function StatusView:hide() self:show() end ]]) init_file:close()