mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-20 20:44:19 +02:00
PR comments
This commit is contained in:
parent
93070ef166
commit
a9d39aef9b
3 changed files with 10 additions and 10 deletions
|
|
@ -97,17 +97,17 @@ blank_box = true
|
|||
# Border foreground color id
|
||||
border_fg = 0x00FFFFFF
|
||||
|
||||
# Title to show at the top of the main box
|
||||
# If set to null, none will be shown
|
||||
box_title = null
|
||||
|
||||
# Relative horizontal position from the end of the screen
|
||||
# default: 0.5 (center)
|
||||
box_h_position = 0.5
|
||||
box_position_h = 0.5
|
||||
|
||||
# Relative vertical position from the bottom of the screen
|
||||
# default: 0.5 (center)
|
||||
box_v_position = 0.5
|
||||
box_position_v = 0.5
|
||||
|
||||
# Title to show at the top of the main box
|
||||
# If set to null, none will be shown
|
||||
box_title = null
|
||||
|
||||
# Brightness decrease command
|
||||
brightness_down_cmd = $PREFIX_DIRECTORY/bin/brightnessctl -q -n s 10%-
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ bigclock_12hr: bool = false,
|
|||
bigclock_seconds: bool = false,
|
||||
blank_box: bool = true,
|
||||
border_fg: u32 = 0x00FFFFFF,
|
||||
box_position_h: f32 = 0.5,
|
||||
box_position_v: f32 = 0.5,
|
||||
box_title: ?[]const u8 = null,
|
||||
box_h_position: f32 = 0.5,
|
||||
box_v_position: f32 = 0.5,
|
||||
brightness_down_cmd: [:0]const u8 = build_options.prefix_directory ++ "/bin/brightnessctl -q -n s 10%-",
|
||||
brightness_down_key: ?[]const u8 = "F5",
|
||||
brightness_up_cmd: [:0]const u8 = build_options.prefix_directory ++ "/bin/brightnessctl -q -n s +10%",
|
||||
|
|
|
|||
|
|
@ -1981,9 +1981,9 @@ fn positionWidgets(ptr: *anyopaque) !void {
|
|||
bb_width = @min(bb_width, state.buffer.width - 2);
|
||||
|
||||
const v_space: f32 = @floatFromInt(state.buffer.height - bb_height);
|
||||
const v_position: usize = @intFromFloat(@min(@max(1.0, v_space * state.config.box_v_position), max_v_position));
|
||||
const v_position: usize = @intFromFloat(std.math.clamp(v_space * state.config.box_position_v, 1.0, max_v_position));
|
||||
const h_space: f32 = @floatFromInt(state.buffer.width - bb_width);
|
||||
const h_position: usize = @intFromFloat(@min(@max(1.0, h_space * state.config.box_h_position), max_h_position));
|
||||
const h_position: usize = @intFromFloat(std.math.clamp(h_space * state.config.box_position_h, 1.0, max_h_position));
|
||||
|
||||
if (state.config.bigclock != .none) {
|
||||
state.bigclock_label.positionXY(TerminalBuffer.START_POSITION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue