hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

Placeholder Text Display Issue

Open TechLionDev opened this issue 1 year ago • 12 comments

It Wont render the place_holder text:

placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>

it just shows the value.

TechLionDev avatar Mar 30 '24 20:03 TechLionDev

What color is invalid in rendered value? $textAlpha or $accentAlpha?

NikSneMC avatar Mar 30 '24 21:03 NikSneMC

It Just shows the code as the placeholder, so instead of Logged in as it just shows "󰌾 Logged in as $USER"

Does that make sense?

TechLionDev avatar Apr 01 '24 02:04 TechLionDev

It Just shows the code as the placeholder, so instead of Logged in as it just shows "󰌾 Logged in as $USER"

Does that make sense?

I don't think so. What hyprlock version do you use?

NikSneMC avatar Apr 01 '24 05:04 NikSneMC

image

TechLionDev avatar Apr 01 '24 15:04 TechLionDev

I am also facing this problem. Something about the text color variables not parsing correctly within the <span> tag. I can get it to work if I reference the color codes directly.

This is the snippet out of my config:

placeholder_text = <span foreground="##cad3f5"><i>󰌾 Logged in as </i><span foreground="##b7bdf8">$USER</span></span>

#placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>

jaybobsilver avatar Apr 01 '24 19:04 jaybobsilver

Maybe you have wrong variables? Is source on 1st line valid?

NikSneMC avatar Apr 01 '24 19:04 NikSneMC

It is.

TechLionDev avatar Apr 01 '24 19:04 TechLionDev

Maybe you have wrong variables? Is source on 1st line valid?

All the other colors pull correctly, and to make sure I set the variable for those colors within the hyprlock.conf file itself. Same issue.

jaybobsilver avatar Apr 01 '24 19:04 jaybobsilver

20240401_152254 I Took A Picture with my Phone hopefully it helps

TechLionDev avatar Apr 01 '24 19:04 TechLionDev

20240401_152254 I Took A Picture with my Phone hopefully it helps

It helps a lot! $accentAlpha is parsed as $accent + Alpha (IDK why)

NikSneMC avatar Apr 01 '24 19:04 NikSneMC

This Works Except for the Password Dots bieng black:

source = $HOME/.config/hypr/mocha.conf

$accent = $sapphire
$accent2 = $sapphireAlpha
$text2 = $textAlpha
$text = $text
$font = JetBrainsMono Nerd Font

# GENERAL
general {
    disable_loading_bar = true
    hide_cursor = true
}

# BACKGROUND
background {
    path = screenshot
    blur_size = 5
    blur_passes = 4
    monitor =
    # path = ~/.config/background
    # blur_passes = 0
    color = $base
}

# TIME
label {
    monitor =
    text = cmd[update:30000] echo "$(date +"%R")"
    color = $text
    font_size = 90
    font_family = $font
    position = -30, 0
    halign = right
    valign = top
}

# DATE 
label {
    monitor = 
    text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
    color = $text
    font_size = 25
    font_family = $font
    position = -30, -150
    halign = right
    valign = top
}

# USER AVATAR

image {
    monitor = 
    path = ~/.face
    size = 100
    border_color = $accent

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

# INPUT FIELD
input-field {
    monitor =
    size = 300, 60
    outline_thickness = 4
    dots_size = 0.2
    dots_spacing = 0.2
    dots_center = true
    outer_color = $accent
    inner_color = $surface0
    font_color = $text
    fade_on_empty = false
    placeholder_text = <span foreground="##$text2"><i>󰌾 Logged in as </i><span foreground="##$accent2">$USER</span></span>
    hide_input = false
    check_color = $accent
    fail_color = $red
    fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
    capslock_color = $yellow
    position = 0, -35
    halign = center
    valign = center
}

TechLionDev avatar Apr 01 '24 19:04 TechLionDev

if i figure out the dots ill PR

TechLionDev avatar Apr 01 '24 19:04 TechLionDev