hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

hyprlock start only from cmd

Open sakuyma opened this issue 1 month ago • 1 comments

Regression?

Yes

Hyprlock Info and Version

v0.9.2
Hyprlock config
# BACKGROUND
background {
    monitor =
    path = /home/user/wallpaper/minimalist-black-hole.png
    blur_passes = 3
    contrast = 0.8916
    brightness = 0.8172
    vibrancy = 0.1696
    vibrancy_darkness = 0.0
}

# GENERAL
general {
    no_fade_in = false
    grace = 0
    disable_loading_bar = false
}

# TIME
label {
    monitor =
     text = cmd[update:1000] echo "$(date +"%-I:%M%p")"
    color = rgba(225, 225, 225, 0.65)
    font_size = 120
    font_family = SF Pro Display Bold
    position = 0, -120
    halign = center
    valign = top
}

# DAY-DATE-MONTH
label {
    monitor =
    text = cmd[update:1000] echo "<span>$(date '+%A, %d %B')</span>"
    color = rgba(225, 225, 225, 0.75)
    font_size = 30
    font_family = SF Pro Display Bold
    position = 0, 200
    halign = center
    valign = center
}

$LOGO =  
# LOGO
label {
    monitor =
    text = <span> </span>
    color = rgba(225, 225, 225, 0.75)
    font_size = 120
    position = 25, 60
    halign = center
    valign = center
}

# USER
label {
    monitor =
    text = Hello, $USER!
    color = rgba(255, 255, 255, 0.65)
    font_size = 25
    font_family = SF Pro Display Bold
    position = 0, -70
    halign = center
    valign = center
}

# INPUT FIELD
input-field {
    monitor =
    size = 290, 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(60, 56, 54, 0.35)
    font_color = rgb(200, 200, 200)
    fade_on_empty = false
    font_family = SF Pro Display Bold
    placeholder_text = <i><span foreground="##ffffff99">Use Me</span></i>
    hide_input = false
    position = 0, -140
    halign = center
    valign = center
}

# CURRENT SONG
label {
    monitor =
    text = cmd[update:1000] echo "$(~/.config/hypr/Scripts/songdetail.sh)" 
    color = rgba(235, 219, 178, .75)
    font_size = 16
    font_family = JetBrains Mono Nerd, SF Pro Display Bold
    position = 0, 80
    halign = center
    valign = bottom
}

Compositor Info and Version

System/Version info
Hyprland 0.52.1 built from branch v0.52.1 at commit 967c3c7404d4fa00234e29c70df3e263386d2597 clean (version: bump to 0.52.1).
Date: Sun Nov 9 23:31:36 2025
Tag: v0.52.1, commits: 6564

Libraries:
Hyprgraphics: built against 0.3.0, system has 0.3.0
Hyprutils: built against 0.10.2, system has 0.10.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.3, system has 0.6.3
Aquamarine: built against 0.9.5, system has 0.9.5

no flags were set


System Information:
System name: Linux
Node name: saku-core
Release: 6.17.7-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Sun, 02 Nov 2025 17:27:22 +0000

Libraries:
Hyprgraphics: built against 0.3.0, system has 0.3.0
Hyprutils: built against 0.10.2, system has 0.10.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.3, system has 0.6.3
Aquamarine: built against 0.9.5, system has 0.9.5



GPU information:
10:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] [10de:2504] (rev a1) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64  580.105.08  Release Build  (root@)


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:
  csgo-vulkan-fix by Vaxry ver 1.2
  hyprexpo by Vaxry ver 1.0
  dynamic-cursors by Virt ver 0.1

Explicit sync: supported
GL ver: 3.2
Backend: drm

Monitor info:
	Panel DP-3: 1920x1080, DP-3 Microstep G274F CC2H573901754 -> backend drm
		explicit ✔️
		edid:
			hdr ✔️
			chroma ✔️
			bt2020 ✔️
		vrr capable ❌
		non-desktop ❌

Description

Hyprlock doesnt start from keybind, rofi menu or wlogout menu, it only starts from command line and hypridle

How to reproduce

set keybind to exec hyprlock, and try press it

Crash reports, logs, images, videos

No response

sakuyma avatar Nov 12 '25 16:11 sakuyma

This is almost certainly an environment issue. It makes a difference if you use uwsm or not and how you start hyprland in the first place.

For hyprlock to start successfully it needs to connect to the compositor. That uses WAYLAND_DISPLAY and XDG_RUNTIME_DIR.

Then, since you are on nvidia, hyprlock may need other graphics related environment variables for graphics driver selection and it's configuration.

You can for example replace your hyprlock command with env > /home/myuser/hyprland_keybind_environment.txt and then examine the text file containing your environment after using that binding. Compare it to the environment in your terminal.

PointerDilemma avatar Nov 17 '25 14:11 PointerDilemma