* auth: add an interface for different authentication methods
* auth: pick inline feedback based on last active implementation
* config: move auth options to auth:<auth_impl>
BREAKING:
- general:pam_module -> auth:pam:module
- general:enable_fingerprint -> auth:fingerprint:enabled
- general:fingerprint_ready_message -> auth:fingerprint:ready_message
- general:fingerprint_present_message ->
auth:fingerprint:present_message
* auth: don't clear password input for fingerprint auth check
* fingerprint: checkAuthenticated when handling verfiy status
* Revert conditionally clearing the password input buffer
Makes sure the input field can show the fail text for fingerprint auth.
* auth: virtual instead of override, remove braces
* pam: join the thread
* auth: remove isAuthenticated and switch to a control flow based unlock
* auth: initialize authentication before aquiring the session lock
* 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
* 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
* 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>
* 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
* 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
* 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
* config: add fractional_scaling option
0 -> off
1 -> on
2 -> auto
* core: default auto option for fractional_scaling
* locksurface: fallback to integer scaling
* asyncResourceGatherer: start the asyncLoop at the same time as gather
This is a prerequesit for labels beeing drawn, while backgrounds are
note ready yet.
* core: allow immediate rendering even when backgrounds are not gathered yet
Note:
We don't really need to call `asyncResourceGatherer::apply` in the
`renderLock` function, since it will get called by a call to
`asyncResourceGatherer::getAssetById` anyways.
* background: render color rectangle when asset is not ready yet
* config: add general:immediate_render config option
* core: use the --immediate-render flag in attemptRestoreOnDeath
* auth: implement a full pam conversation
* input-field: fixup failedAttempts and color change
Credits to @bvr-yr
* pam: set default module to hyprland
* input-field: backup previous asset
* auth: restart auth in onPasswordCheckTimer
* auth: immediately switch to waiting when input was submitted
* auth: remove redundant waitingForPamAuth
* auth: add inputRequested and reschedule submitInput
* auth: clear password buffer and handle submitInput before input is requested
* Revert "input-field: backup previous asset"
This reverts commit 89702945be6af4aa43f54688ad34a4ccba994a3e.
Without the backup we avoid rendering the prompt placeholder for one frame when the failText is not available.
Looks better this way.
* auth: fallback to su if pam_module not in /etc/pam.d
rare occasion where a path check even works on nix
* auth: rename inputSubmitted and resubmit callback
* auth: detach failText from the conversation
* fix rebase mistake
* auth: make sure prompt and failText are not reset when restarting auth
needed for labels
* auth: force update timers when the prompt changes
* auth: remove unused stuff
* input-field: new color features
* add nix HM
* add workaround for faillasset not being shown on empty imput
* comment
* change cfg option name
* remove TODO
* small fix
* one more edge check
* dedup changeColor function
* simplify more
* misc: use weakly_canonical for absolutePath
* misc: make absolutePath not optional
* misc: use currentDir as the argument to absolutePath
* config: avoid circular imports
* input-field: add fade out timeout
* input-field: let dots reset themselfs
Now the dots kind of fade into the placeholder text on a failure.
* Nix/HM module: add input-field:fade_timeout option
src/config/ConfigManager.cpp:91:6: error: no type named 'mutex' in namespace 'std'
91 | std::mutex configMtx;
| ~~~~~^
src/config/ConfigManager.cpp:94:10: error: no member named 'lock_guard' in namespace 'std'
94 | std::lock_guard<std::mutex> lg(configMtx);
| ~~~~~^
/var/tmp/portage/gui-apps/hyprlock-9999/work/hyprlock-9999/src/config/ConfigManager.cpp:94:26: error: no member named 'mutex' in namespace 'std'
94 | std::lock_guard<std::mutex> lg(configMtx);
| ~~~~~^
Closes: https://github.com/hyprwm/hyprlock/issues/43
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>