hyprwm / hyprlock

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

Time, Date and other stuff aren't updating #357

Closed ilolm closed 5 months ago

ilolm commented 6 months ago

I use Arch Linux with the Hyprland desktop environment. Hyprlock is working fine except for one issue: when I lock my machine and the PC is idle (no mouse or keyboard activity), the time, date, and other information displayed by Hyprlock do not update. They only update when I move my mouse or type something on my keyboard.

Please watch the attached video for a demonstration.

https://github.com/hyprwm/hyprlock/assets/83036869/62906154-9366-4349-a2b3-c832d2d7296f

ashish-kus commented 5 months ago

text = cmd[update:1000] echo -e "$(date +"%M")"

did you used this format.

ilolm commented 5 months ago
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */  #
# Hyprlock                                                          
# Original config submitted by https://github.com/SherLock707

# Sourcing colors generated by wallust
source = $HOME/.config/hypr/wallust/wallust-hyprland.conf
$Scripts = $HOME/.config/hypr/scripts

general {
    grace = 1
}

background {
    monitor =
    #path = screenshot   # screenshot of your desktop
    path = $HOME/.config/rofi/.current_wallpaper   # NOTE only png supported for now
    color = $color7

    # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
    blur_size = 6
    blur_passes = 2 # 0 disables blurring
    noise = 0.0117
    contrast = 1.3000 # Vibrant!!!
    brightness = 0.8000
    vibrancy = 0.2100
    vibrancy_darkness = 0.0
}

input-field {
    monitor = DP-1
    size = 250, 50
    outline_thickness = 3
    dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
    dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
    dots_center = true
    outer_color = $color5
    inner_color = $color0
    font_color = $color12
    fade_on_empty = true
    placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
    hide_input = false

    position = 0, 200
    halign = center
    valign = bottom
}

# Date
label {
    monitor = DP-1
    text = cmd[update:18000000] echo "<b> "$(date +'%A, %-d %B %Y')" </b>"
    color = $color12
    font_size = 34
    font_family = JetBrains Mono Nerd Font 10

    position = 0, -150
    halign = center
    valign = top
}

# Week
label {
    monitor = DP-1
    text = cmd[update:18000000] echo "<b> "$(date +'Week %U')" </b>"
    color = $color5
    font_size = 24
    font_family = JetBrains Mono Nerd Font 10
    position = 0, -250
    halign = center
    valign = top
}

# Time
label {
    monitor = DP-1
# text = cmd[update:1000] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H
    color = $color15
    font_size = 94
    font_family = JetBrains Mono Nerd Font 10

    position = 0, 0
    halign = center
    valign = center
}

# User
label {
    monitor = DP-1
    text =    $USER
    color = $color12
    font_size = 18
    font_family = Inter Display Medium

    position = 0, 100
    halign = center
    valign = bottom
}

# uptime
label {
    monitor = DP-1
    text = cmd[update:60000] echo "<b> "$(uptime -p || $Scripts/UptimeNixOS.sh)" </b>"
    color = $color12
    font_size = 24
    font_family = JetBrains Mono Nerd Font 10
    position = 0, 0
    halign = right
    valign = bottom
}

# weather edit specific location. Note, this cause a 2-4 seconds delay in locking
label {
    monitor = DP-1
    text = cmd[update:3600000] [ -f ~/.cache/.weather_cache ] && cat  ~/.cache/.weather_cache
    color = $color12
    font_size = 24
    font_family = JetBrains Mono Nerd Font 10
    position = 50, 0
    halign = left
    valign = bottom
}

# Put a picture of choice here. Default is the current wallpaper
image {
    monitor = DP-1
    path = $HOME/.config/rofi/.current_wallpaper
    size = 230
    rounding = -1
    border_size = 2
    border_color = $color11
    rotate = 0
    reload_time = -1
    position = 0, 300
    halign = center
    valign = bottom
}

This is my hyprlock conifg.

Also I have nvidia 555.52.04 version. I use this version of nvidia, because it doesn't have issues with screen blinking in some software.

ilolm commented 5 months ago

Closed by miss-click, sorry

natsukashiixo commented 5 months ago

Same issue but with nvidia 550.90.07

also, labels and images properly update on my AMD iGPU laptop. Possibly nvidia-specific?

ilolm commented 4 months ago

Nvidia 560 fixed it.

OliverKreitmeyer commented 3 months ago

I am still having this issue on fedora 40, using nvidia 550.90.07 and two monitors... Is it possible to fix this without updating nvidia drivers?

ilolm commented 3 months ago

No, the issue is only with drivers.

Flameopathic commented 3 months ago

@ilolm not sure what you mean by 660, haven't seen a driver with that version come out yet. even 560 still has the issue for me

ilolm commented 3 months ago

@ilolm not sure what you mean by 660, haven't seen a driver with that version come out yet. even 560 still has the issue for me

Sorry, It's a typo. I meant 560.

Do you use arch?

newcharhuso commented 3 months ago

How did the Nvidia 560 worked out for you? Any problems?

id3v1669 commented 3 months ago

How did the Nvidia 560 worked out for you? Any problems?

works on a single monitor config, still broken on a multimonitor. RTX3080

Temp solution - call via sctipt that changes config file of WM and disables second monitor before calling hyprlock.