Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide_input not working after upgrade to v0.7 #694

Open
yavorski opened this issue Feb 23, 2025 · 5 comments
Open

hide_input not working after upgrade to v0.7 #694

yavorski opened this issue Feb 23, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@yavorski
Copy link

yavorski commented Feb 23, 2025

Regression?

Yes

Hyprlock Info and Version

Hyprlock version v0.7.0

Hyprlock config
# ~/.config/hypr/hyprlock.conf
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock

$font = Intel One Mono Bold
# $font = JetBrains Mono NL ExtraBold

general {
  text_trim = true
  hide_cursor = true
  ignore_empty_input = true
  disable_loading_bar = false
}

background {
  blur_passes = 0
  color = rgb(000000) #000000
  path = $HOME/dev/wallpapers/arch-lock.png
}

# Time
label {
  text = $TIME
  valign = top
  halign = right
  position = -30, 0
  font_size = 72
  font_family = $font
  color = rgb(ffffff) #ffffff
}

# Date
label {
  valign = top
  halign = right
  position = -30, -128
  font_size = 17
  font_family = $font
  color = rgb(ffffff) #ffffff
  text = cmd[update:43200000] date +"%A, %d %B %Y"
}

# Failed
label {
  halign = right
  valign = bottom
  position = -30, 15
  font_size = 11
  font_family = $font
  color = rgb(fa005f) #fa005f
  text = $FAIL [ $ATTEMPTS[!] ]
}

# KBD Layout
label {
  halign = center
  valign = center
  position = 0, -50
  font_size = 11
  font_family = $font
  text = $LAYOUT[!]
  color = rgb(ffffff) #ffffff
}

# Input
input-field {
  size = 480, 0
  halign = center
  valign = center
  position = 0, 0
  rounding = 0
  dots_size = 0.2
  dots_spacing = 0.2
  dots_center = true
  outline_thickness = 4
  hide_input = true
  fade_on_empty = true
  font_color = rgb(000000) #000000
  inner_color = rgb(ffffff) #ffffff
  outer_color = rgb(000000) #000000
  check_color = rgb(32f891) #32f891
  fail_color = rgb(fa005f) #fa005f
  capslock_color = rgb(faf76e) #faf76e
  placeholder_text = <span>󰌾 $USER</span>
  fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
}

Compositor Info and Version

System/Version info
Hyprland 0.47.2 built from branch  at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff  (version: bump to 0.47.2).
Date: Sun Feb 2 00:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.2


no flags were set


System Information:
System name: Linux
Node name: arch
Release: 6.13.4-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Sat, 22 Feb 2025 00:37:05 +0000


GPU information:
c3:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev dd) (prog-if 00 [VGA controller])


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:

Description

hide_input (swaylock like) indicator is not showing after latest update.

How to reproduce

Test with hide_input = true previous version and new version.

Crash reports, logs, images, videos

No response

@yavorski yavorski added the bug Something isn't working label Feb 23, 2025
@yavorski yavorski changed the title hide_input not working after upprade to v0.7 hide_input not working after upgrade to v0.7 Feb 23, 2025
@yavorski
Copy link
Author

yavorski commented Feb 23, 2025

I had to change output_color to gradient to make it work.

@PaideiaDilemma
Copy link
Collaborator

A normal color is also a valid gradient. What did you actually change to make it work?

@yavorski
Copy link
Author

yavorski commented Feb 24, 2025

A normal color is also a valid gradient. What did you actually change to make it work?

This is updated config which is working:

input-field {
  size = 480, 4

  halign = center
  valign = center

  rounding = 0
  position = 0, 0
  outline_thickness = 8

  dots_size = 0
  dots_spacing = 0
  dots_center = true

  hide_input = true
  fade_on_empty = true
  swap_font_color = true

  font_color = rgb(000000)
  inner_color = rgba(0, 0, 0, 0.0)
  fail_color = rgb(fa005f) #fa005f
  check_color = rgb(32f891) #32f891
  capslock_color = rgb(faf76e) #faf76e
  outer_color = rgba(33ccffee) rgba(00ff99ee) rgba(faf76eee)

  placeholder_text = <span>󰌾 $USER</span>
  fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
}

@BrenekH
Copy link

BrenekH commented Feb 24, 2025

I'm also experiencing weirdness with hide_input = true and I think either this issue should be re-opened as a regression or the documentation needs to be updated with how we are meant to utilize hide_input.

My original config (pre 0.7.0) set outer_color to rgba(0, 0, 0, 0) which forces the background to be transparent, but with the colored highlights still visible as I type. After updating, that setting caused the input indicators to still appear, but as black instead.

If I change to the multi-gradient suggested by @yavorski (rgba(33ccffee) rgba(00ff99ee) rgba(faf76eee)), I get a gradient as the background as well as the colors.

However, if I change outer_color to rgba(255, 0, 0, 0) I get my previous behavior of blank outer color, but fully saturated random colors as input indicators. As I reduce the brightness of the red channel, the input indicators lose their saturation as well. This is the case for the red, green, and blue channels, but only if the other channels are zero. I believe there's some color mixing happening here, especially because as I start to force the outer ring's background to white or black, the input indicators generally follow.

My ideal scenario for how hide_input would work is for outer_color to have zero impact of the input indicators, which could be configured via another option, or completely unconfigurable, as they are right now (at least, as far as I can tell).

My full input-field config:

input-field {
  monitor =
  placeholder_text =
  size = 100, 100
  hide_input = true

  outline_thickness = 15
  inner_color = rgba(0, 0, 0, 0.5)
  outer_color = rgba(255, 0, 0, 0)

  font_family = JetBrains Mono Extrabold

  fail_text = $FAIL <b>($ATTEMPTS)</b>
}

I'm running a fully up-to-date Arch Linux system with Hyprlock v0.7.0 installed from the official repository.

@PaideiaDilemma
Copy link
Collaborator

So when changing all the color transitions from a rgb to oklab for more consistent color transitions, I changed it so that we take the first color of the outer_color gradient and then randomly change it's hue. (mainly in an effort to make the hide_input segments match better with your outer_color)

When you look at a oklab color wheel like this one: https://observablehq.com/@shan/oklab-color-wheel, we basically select a random color within a ring.

If the outer color has hue 0 (in the context of rgb that means r=g=b), the ring that we select colors from is completely uniform.

Making this base color independent of outer_color with a sane default would be an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants