hyprwm / hyprlock

Hyprland's GPU-accelerated screen locking utility
BSD 3-Clause "New" or "Revised" License
820 stars 59 forks source link

[bug]: hyprlock doesn't seem follow current monitor scale settings #238

Closed AlexNabokikh closed 7 months ago

AlexNabokikh commented 7 months ago

Hi,

First of all, thank you for this fantastic screen-locking tool. It was very much needed! I'd like to report the incorrect scaling behavior of the Hyprlock. Basically, Hyprlock seems always sets the screen scale factor to "1", no matter what setting you have in hyprland.conf. When I use Hyprlock on my desktop machine or laptop on the dock with an external monitor with a scaling factor set to "1", everything looks perfect. However, on my laptop's screen, where I have the scaling factor set to "2," everything is very small.

OS: NixOS (unstable) hyprland, hyprlock build from master using flake.

Settings:

hyprland.conf

monitor = DP-1, highres, auto, 1
monitor = eDP-1, highres, auto, 2

hyprlock.conf

background {
    monitor =
    path = ${lock}
    blur_passes = 3
    contrast = 0.8916
    brightness = 0.8172
    vibrancy = 0.1696
    vibrancy_darkness = 0.0
}

general {
    no_fade_in = false
    grace = 0
    disable_loading_bar = true
}

input-field {
    monitor =
    size = 250, 60
    outline_thickness = 2
    dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
    dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
    dots_center = true
    outer_color = rgba(0, 0, 0, 0)
    inner_color = rgba(0, 0, 0, 0.5)
    font_color = rgb(200, 200, 200)
    fade_on_empty = false
    capslock_color = -1
    placeholder_text = <i><span foreground="##e6e9ef">Password</span></i>
    hide_input = false
    position = 0, -120
    halign = center
    valign = center
}

# Date
label {
  monitor =
  text = cmd[update:1000] echo "<span>$(date '+%A, %d %B')</span>"
  color = rgba(255, 255, 255, 0.8)
  font_size = 15
  font_family = JetBrains Mono Nerd Font Mono ExtraBold
  position = 0, -400
  halign = center
  valign = top
}

# Time
label {
    monitor =
    text = cmd[update:1000] echo "<span>$(date '+%H:%M')</span>"
    color = rgba(255, 255, 255, 0.8)
    font_size = 120
    font_family = JetBrains Mono Nerd Font Mono ExtraBold
    position = 0, -400
    halign = center
    valign = top
}

# Keyboard layout
label {
  text = cmd[update:200] hyprctl devices -j | jq -r '.keyboards[] | select(.name == "at-translated-set-2-keyboard") | .active_keymap'
  color = rgba(255, 255, 255, 0.9)
  font_size = 10
  font_family = JetBrains Mono Nerd Font Mono
  position = 0, -175
  halign = center
  valign = center
}
vaxerski commented 7 months ago

that's by design. You can make specific settings for your laptop by using multiple widgets.