mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-21 22:43:38 +00:00
Fix numlock & capslock positioning
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -101,13 +101,13 @@ box_title = null
|
|||||||
# Brightness decrease command
|
# Brightness decrease command
|
||||||
brightness_down_cmd = $PREFIX_DIRECTORY/bin/brightnessctl -q -n s 10%-
|
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_down_key = F5
|
||||||
|
|
||||||
# Brightness increase command
|
# Brightness increase command
|
||||||
brightness_up_cmd = $PREFIX_DIRECTORY/bin/brightnessctl -q -n s +10%
|
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
|
brightness_up_key = F6
|
||||||
|
|
||||||
# Erase password input on failure
|
# Erase password input on failure
|
||||||
@@ -233,7 +233,7 @@ gameoflife_initial_density = 0.4
|
|||||||
# Command executed when pressing hibernate key (can be null)
|
# Command executed when pressing hibernate key (can be null)
|
||||||
hibernate_cmd = null
|
hibernate_cmd = null
|
||||||
|
|
||||||
# Specifies the key used for hibernate
|
# Specifies the key combination used for hibernate
|
||||||
hibernate_key = F4
|
hibernate_key = F4
|
||||||
|
|
||||||
# Remove main box borders
|
# 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
|
# Command executed when pressing restart_key
|
||||||
restart_cmd = /sbin/shutdown -r now
|
restart_cmd = /sbin/shutdown -r now
|
||||||
|
|
||||||
# Specifies the key used for restart
|
# Specifies the key combination used for restart
|
||||||
restart_key = F2
|
restart_key = F2
|
||||||
|
|
||||||
# Save the current desktop and login as defaults, and load them on startup
|
# 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
|
# Command executed when pressing shutdown_key
|
||||||
shutdown_cmd = /sbin/shutdown $PLATFORM_SHUTDOWN_ARG now
|
shutdown_cmd = /sbin/shutdown $PLATFORM_SHUTDOWN_ARG now
|
||||||
|
|
||||||
# Specifies the key used for shutdown
|
# Specifies the key combination used for shutdown
|
||||||
shutdown_key = F1
|
shutdown_key = F1
|
||||||
|
|
||||||
# Command executed when pressing sleep key (can be null)
|
# Command executed when pressing sleep key (can be null)
|
||||||
sleep_cmd = null
|
sleep_cmd = null
|
||||||
|
|
||||||
# Specifies the key used for sleep
|
# Specifies the key combination used for sleep
|
||||||
sleep_key = F3
|
sleep_key = F3
|
||||||
|
|
||||||
# Command executed when starting Ly (before the TTY is taken control of)
|
# Command executed when starting Ly (before the TTY is taken control of)
|
||||||
|
|||||||
@@ -1603,10 +1603,10 @@ fn positionComponents(state: *UiState) void {
|
|||||||
.addYFromIf(state.clock_label.childrenPosition(), state.config.clock != null)
|
.addYFromIf(state.clock_label.childrenPosition(), state.config.clock != null)
|
||||||
.removeYFromIf(state.edge_margin, state.config.clock != null)
|
.removeYFromIf(state.edge_margin, state.config.clock != null)
|
||||||
.invertX(state.buffer.width)
|
.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
|
state.capslock_label.positionX(state.numlock_label
|
||||||
.childrenPosition()
|
.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);
|
state.box.positionXY(TerminalBuffer.START_POSITION);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user