mirror of
https://github.com/fairyglade/ly.git
synced 2026-05-13 18:40:46 +00:00
Add option to move the box relative to the screen size (#964)
## What are the changes about? Added a new option in the configuration file for moving the box relative to the screen size. ``` box_h_position = 0.5 box_v_position = 0.5 ``` The big clock is centered relative to the box. In the cases where it would be outside of the screen, it moves the box to fit in the screen. ## What existing issue does this resolve? Add more options for personalization ## Examples Normal usage: ``` box_h_position = 0.15 box_v_position = 0.35 ```  Clock would be outside of the screen vertically: ``` box_h_position = 0.15 box_v_position = -1.0 ```  Clock would be outside of the screen horizontally and vertically: ``` box_h_position = -1.0 box_v_position = -1.0 input_len = 3 ```  Clock would be outside of the screen horizontally and vertically on the bottom left of the screen: ``` box_h_position = 2.0 box_v_position = 2.0 input_len = 3 ```  ## What existing issue does this resolve? _Replace this with a reference to an existing issue, or N/A if there is none_ ## Pre-requisites - [x] I have tested & confirmed the changes work locally - [x] I have run `zig fmt` throughout my changes Co-authored-by: AnErrupTion <anerruption+codeberg@disroot.org> Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/964 Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
This commit is contained in:
@@ -23,6 +23,8 @@ 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.4,
|
||||
box_title: ?[]const u8 = null,
|
||||
brightness_down_cmd: [:0]const u8 = build_options.prefix_directory ++ "/bin/brightnessctl -q -n s 10%-",
|
||||
brightness_down_key: ?[]const u8 = "F5",
|
||||
|
||||
Reference in New Issue
Block a user