fix: adjust coordinates for toki-earth lock screen
My two machines have different resolutions, so we need to convert between their pixel sizes.
This commit is contained in:
parent
8c8c8c7486
commit
6776e41e56
1 changed files with 74 additions and 71 deletions
|
|
@ -12,7 +12,10 @@
|
|||
# Hyprlock
|
||||
|
||||
programs.hyprlock.enable = true;
|
||||
programs.hyprlock.settings = {
|
||||
programs.hyprlock.settings =
|
||||
let
|
||||
adjust = y: if config.machine == "earth" then builtins.floor (y / 1.75) else y;
|
||||
in {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
disable_loading_bar = true;
|
||||
|
|
@ -35,31 +38,31 @@
|
|||
monitor = "";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, 480";
|
||||
position = "0, ${builtins.toString (adjust 480)}";
|
||||
text = "cmd[update:1000] date '+%H:%M:%S'";
|
||||
color = "rgb(a9b1d6)";
|
||||
font_family = "Quicksand";
|
||||
font_size = 102;
|
||||
font_size = adjust 102;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, 370";
|
||||
position = "0, ${builtins.toString (adjust 370)}";
|
||||
text = "cmd[update:60000] date '+%A %Y-%m-%d'";
|
||||
color = "rgb(a9b1d6)";
|
||||
font_family = "Quicksand";
|
||||
font_size = 32;
|
||||
font_size = adjust 32;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, -240";
|
||||
position = "0, ${builtins.toString (adjust (-240))}";
|
||||
text = "Login: $USER";
|
||||
color = "rgb(a9b1d6)";
|
||||
font_family = "Quicksand";
|
||||
font_size = 26;
|
||||
font_size = adjust 26;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -68,8 +71,8 @@
|
|||
monitor = "";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
size = "800, 70";
|
||||
position = "0, -160";
|
||||
size = "${builtins.toString (adjust 800)}, ${builtins.toString (adjust 70)}";
|
||||
position = "0, ${builtins.toString (adjust (-160))}";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_family = "Quicksand";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue