Commit graph

276 commits

Author SHA1 Message Date
Maximilian Seidler
578246b996
config: use removeEmpty for the gradient varlist (#565) 2024-11-19 13:35:53 +00:00
Maximilian Seidler
b9cf5151ba
input-field: fix colorConfig caps, num and both when they are empty (#559) 2024-11-15 00:45:55 +00:00
Maximilian Seidler
d159e14e5b
config: make configStringToInt support rgb(a) with decimal values (#558) 2024-11-15 00:43:47 +00:00
Maximilian Seidler
2775ab2868
widgets: render frambuffers with alpha 1.0 (#554)
* helpers: update CColor

yoinked from Hyprland

* image: fix border alpha

* shape: fix border alpha
2024-11-12 13:31:27 +00:00
c3c28feb4c widget: show 12AM instead of 0AM 2024-11-11 15:58:49 +00:00
eadcbc0aed widget: fix time12 when it's 12pm
fixes #552
2024-11-11 15:58:11 +00:00
Maximilian Seidler
d8bd25b52d
core: add support for composed keys (#551) 2024-11-11 15:49:51 +00:00
Maximilian Seidler
6c3c444136
core: add border shader and border gradients (#548)
* renderer: add renderBorder function

* config: add CGradientValueData from Hyprland

* input-field: change outer to take gradients

Added gradient support to the following color options:
- `outer_color`
- `fail_color`
- `check_color`
- `capslock_color`
- `numlock_color`
- `bothlock_color``

* image: add gradient border

* shape: add gradient border

* shaders: adapt the new rounded smoothing factor from Hyprland
2024-11-09 16:54:44 +00:00
Maximilian Seidler
4fc133c96f
widgets: add support for specifing size and position options via percentages of output dimensions (#541)
* config: introduce a custom value type for layout related options

* widgets: use CLayoutValueData for size and position options

* widgets: catch bad_any_cast and out_of_range when contructing widgets other than label

* config: rename and restrict CLayoutValueData::fromAny to fromAnyPv

This is only for casting `any` variables that represent a void * to a
CLayoutValueData*, not just any any.

* misc: remove debug prints
2024-11-06 16:50:42 +00:00
moggiesir
1cd3231537
auth: make fingerprint initialization async (#544) 2024-11-05 13:12:26 +00:00
Maximilian Seidler
f225e23e5b
misc: make Debug::log flush stdout (#542)
Makes it a lot easier to spot a failed RASSERT
2024-11-02 23:42:39 +00:00
Maximilian Seidler
edbecc8708
widgets: remove debug remnants from #527 (#532) 2024-10-27 18:33:05 +00:00
Maximilian Seidler
29dd33d6a4
widgets: check current_zone pointer (#527)
* widgets: check current_zone pointer and fallback to utc

* misc: remove redundant printf in RASSERT

* widgets: no curly else
2024-10-26 19:27:24 +01:00
Maximilian Seidler
ae3bb0fd43
input-field: fix invert_numlock regression (#530) 2024-10-25 22:04:56 +01:00
Maximilian Seidler
f13d97e6d6
config: make the default widget position be 0,0 (#529) 2024-10-25 22:02:47 +01:00
a093a9eefd version: bump to 0.5.0 2024-10-22 01:09:26 +01:00
moggiesir
f48540fcd4
auth: Support parallel fingerprint auth (#514)
* auth: Support parallel fingerprint auth

I chose to use Fprint's dbus interface directly rather than going through pam (which uses Fprint's dbus interface) due to poor handling of system sleep somewhere between fprintd and pam. When preparing for sleep, fprintd puts the device to sleep, which causes VerifyStatus to emit with verify-unknown-error, which normally should be responded to by calling both Device.StopVerify and Device.Release (and this is what pam does). Unfortunately, if you try to release the device when the system is preparing for sleep, you'll get an error that the device is busy and then you can't can't claim or release the device for 30 seconds.

pam also has a max timeout for pam_fprintd.so of 99 seconds, and so if we used pam, we'd have to deal with the timeouts and keep restarting the auth conversation.

gdm/gnome-session lock seems to get around these issues by having a shutter on top of the lock screen that you have to interact with first that gives gnome-session a trigger to start fingerprint auth.

* nix/overlays: add sdbus overlay

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-10-22 01:08:24 +01:00
André Silva
b808086286
renderer: log framebuffer creation as trace (#518) 2024-10-17 15:23:58 +01:00
Vaxry
11694528b4
README: update deps 2024-10-13 13:05:11 +01:00
Maximilian Seidler
5065788a47
misc: use Vector2D, Box and Mat3x3 from hyprutils (#515)
* misc: use Vector2D, Box and Mat3x3 from hyprutils

* nix: flake update

Fix CI fails. We need hyprutils>=0.2.3

* misc: use a function to convert Hyprlang::VEC2 to Vector2D

* misc: fixup some includes
2024-10-13 13:04:32 +01:00
Maximilian Seidler
71021cc3de
input-field: add dots_text_format to support setting arbitrary chars as the input indicator (#510)
* input-field: make dots support arbitrary chars

* input-field: add font_familiy for placeholder and text dots

* input-field: allow dots_spacing from -1.0 to 1.0

Useful when using emojis in  dots_text_format
2024-10-13 00:16:31 +01:00
Maximilian Seidler
7362ce3435
misc: use hyprutils for string replaceAll (#512) 2024-10-11 16:44:47 +01:00
The-Emperor10
264fb8b70f
config: add input-field dots_fade_time option (#508)
* config: add input-field dots_fade_time option
Time is in milliseconds. Anything <= 0 is immediate.

* input-field: change speedPerSecond to fadeMs
Default is 200ms, which is the same amount of time as the previous
5 speedPerSecond. Not sure using doubles is necessary, but I'm
using them to avoid precision issues.

Closes: https://github.com/hyprwm/hyprlock/issues/355
2024-10-10 22:20:14 +01:00
Maximilian Seidler
eb63207ef0
core: make attemptRestoreOnDeath faster and hyprland exclusive (#506)
* core: make attemptRestoreOnDeath hyprland exclusive

* core: destoy lock and sessionLockSurfaces in attemptRestoreOnDeath
2024-10-05 14:30:19 +01:00
davc0n
d9c2a5e0b7
widgets: add 12h time format (#500) 2024-09-30 12:22:24 +01:00
Maximilian Seidler
9ea804788c
core: set capslock and numlock states on startup (#496) 2024-09-25 09:56:20 +01:00
Yang, Ying-chao
153977aab3
asyncResourceGatherer: stop worker threads when application is going to exit (#481) 2024-09-05 12:27:43 +01:00
Yang, Ying-chao
0b030d33c8
asyncResourceGatherer: do not detach worker threads (#477)
Worker threads become non-joinable once they are detached, and `await()` will not wait for them to
finish. This can lead to a crash when `asyncResourceGatherer` is destroyed in the main thread while it
is still being used in worker threads.
2024-09-04 20:58:38 +01:00
André Silva
73b0fc26c0 nix: add wayland-scanner native build input 2024-09-01 18:19:54 +03:00
Darko Nikolić
cc71c0b7d9
core: fix symlinked images not picking up extension (#473) 2024-08-31 12:37:47 +02:00
Maximilian Seidler
9c1e9e7db2
core: support desc: prefix for widget monitor options (#470) 2024-08-29 12:36:07 +02:00
Maximilian Seidler
a0af542f9b
input-field: refactor updateColors and other improvements (#469)
* input-field: refactor updateColors

* input-field: fix input-field:invert_numlock

* input-field: use updatePlaceholder to request the initial placeholder asset

* input-field: allow more gradual color animations

* input-field: fix caps and num indicator colors, when borderless and swap_font_color is true
2024-08-29 09:53:00 +02:00
Yang, Ying-chao
7bb4113a7e
core: fix crash caused by exiting without joining running thread (#464) 2024-08-21 11:25:14 +01:00
Maximilian Seidler
f673759d01
lockSurface: fix dynamic output mode and scale updates (#462)
* lockSurface: reload widgets on output change

* lockSurface: only configure when scale actually changed

* lockSurface: enable fsv1 per default for all compositors
2024-08-18 08:19:56 +01:00
Maximilian Seidler
9393a3e94d
core: add fractional_scaling option (#456)
* config: add fractional_scaling option

0 -> off
1 -> on
2 -> auto

* core: default auto option for fractional_scaling

* locksurface: fallback to integer scaling
2024-08-05 20:22:01 +02:00
alba4k
8cffe0618c fix alignment in help message 2024-08-04 12:53:43 +03:00
Aaron Blasko
5d85ea03b0
renderer: add --no-fade-in (#453) 2024-08-03 17:34:54 +02:00
c7fa5026c0
assets: add example.conf 2024-08-02 21:39:54 +03:00
Maximilian Seidler
8a89181e69
auth: use pam_faillock log as $FAIL (#447)
Allows us to show "(x minutes left to unlock)" directly in the
input-field fail text.
2024-07-30 18:52:50 +02:00
davc0n
5e8f12c2d9
core: minor refactor of command line options parsing (#441) 2024-07-28 19:10:36 +01:00
Maximilian Seidler
cf0e975fed
widgets: move asset updates out of the draw function (#442)
* label: move asset updates out of the draw function

This allows us to check if the label has actually updated after the
callback from the asyncResourceGatherer. If it isn't we can requeue the
renderUpdate() function.

* image: move asset updates out of the draw function
2024-07-24 23:18:11 +02:00
Maximilian Seidler
3e71799b30
misc: add issue templates (#440)
* misc: add issue templates

Copied from Hyprland and slightly modified

* misc: but template --version and minor improvements

* misc: fix bug template closing tag
2024-07-24 17:52:15 +02:00
58e1a4a499 core: add --version 2024-07-24 13:58:59 +02:00
dba9d8b517 version: bump to 0.4.1 2024-07-21 14:00:28 +02:00
Maximilian Seidler
3d3b52e42c
asyncResourceGatherer: deduplicate image rendering code (#433)
* asyncResourceGatherer: deduplicate image rendering code

Also happens to add support for JPEG and WEBP for image widgets

* asyncResourceGatherer: use a reference for path in getFileType
2024-07-19 23:20:31 +02:00
Maximilian Seidler
20c01d91d4
core: make sure m_sLockState.lock is present in onLockFinished and releaseSessionLock (#432) 2024-07-19 17:26:38 +02:00
372a4cd55e
flake.lock: update 2024-07-18 20:46:51 +03:00
a29012cbbd
CMake: fmt 2024-07-18 20:46:31 +03:00
cac93f67e8
CMake, Nix: add VERSION file 2024-07-18 20:45:42 +03:00
Maximilian Seidler
9514925a7c
core: grace unlock improvements and auth fixes for grace/SIGUSR1 unlocks (#424)
* core: check m_bTerminate for grace unlocks

* core: remove reference to the lock object on finished

* core: add isUnlocked

true if m_bFadeStarted or m_bTerminate

* auth: return early on grace or SIGUSR1 unlocks
2024-07-17 15:22:42 +02:00