Fix numlock & capslock positioning

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2026-02-09 11:20:27 +01:00
parent 852a602032
commit d1810d8c98
2 changed files with 8 additions and 8 deletions

View File

@@ -101,13 +101,13 @@ box_title = null
# Brightness decrease command
brightness_down_cmd = $PREFIX_DIRECTORY/bin/brightnessctl -q -n s 10%-
# Brightness decrease key, or null to disable
# Brightness decrease key combination, or null to disable
brightness_down_key = F5
# Brightness increase command
brightness_up_cmd = $PREFIX_DIRECTORY/bin/brightnessctl -q -n s +10%
# Brightness increase key, or null to disable
# Brightness increase key combination, or null to disable
brightness_up_key = F6
# Erase password input on failure
@@ -233,7 +233,7 @@ gameoflife_initial_density = 0.4
# Command executed when pressing hibernate key (can be null)
hibernate_cmd = null
# Specifies the key used for hibernate
# Specifies the key combination used for hibernate
hibernate_key = F4
# Remove main box borders
@@ -304,7 +304,7 @@ path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Command executed when pressing restart_key
restart_cmd = /sbin/shutdown -r now
# Specifies the key used for restart
# Specifies the key combination used for restart
restart_key = F2
# Save the current desktop and login as defaults, and load them on startup
@@ -328,13 +328,13 @@ setup_cmd = $CONFIG_DIRECTORY/ly/setup.sh
# Command executed when pressing shutdown_key
shutdown_cmd = /sbin/shutdown $PLATFORM_SHUTDOWN_ARG now
# Specifies the key used for shutdown
# Specifies the key combination used for shutdown
shutdown_key = F1
# Command executed when pressing sleep key (can be null)
sleep_cmd = null
# Specifies the key used for sleep
# Specifies the key combination used for sleep
sleep_key = F3
# Command executed when starting Ly (before the TTY is taken control of)

View File

@@ -1603,10 +1603,10 @@ fn positionComponents(state: *UiState) void {
.addYFromIf(state.clock_label.childrenPosition(), state.config.clock != null)
.removeYFromIf(state.edge_margin, state.config.clock != null)
.invertX(state.buffer.width)
.removeXIf(TerminalBuffer.strWidth(state.numlock_label.text), state.buffer.width > TerminalBuffer.strWidth(state.numlock_label.text) + state.edge_margin.x));
.removeXIf(TerminalBuffer.strWidth(state.lang.numlock), state.buffer.width > TerminalBuffer.strWidth(state.lang.numlock) + state.edge_margin.x));
state.capslock_label.positionX(state.numlock_label
.childrenPosition()
.removeX(TerminalBuffer.strWidth(state.numlock_label.text) + TerminalBuffer.strWidth(state.capslock_label.text) + 1));
.removeX(TerminalBuffer.strWidth(state.lang.numlock) + TerminalBuffer.strWidth(state.lang.capslock) + 1));
state.box.positionXY(TerminalBuffer.START_POSITION);