Commit graph

224 commits

Author SHA1 Message Date
Maximilian Seidler
e9a57f0dae
label: fix rendering with multiple timers that fire at the same time (#147) 2024-03-07 21:32:32 +00:00
Maximilian Seidler
1d39a530a4
label: higher precision resource id's (#148) 2024-03-07 21:31:58 +00:00
Kenton Groombridge
b17d666548
core: add commandline switch to lock immediately (#145)
Fixes: https://github.com/hyprwm/hyprlock/issues/143
2024-03-07 18:39:27 +00:00
Maximilian Seidler
90e94dee86
core: Allow and fix empty passwords (#140)
* Revert "core: don't auth on empty password (#126)"

This reverts commit 6a085d7f8e.

* core: properly handle pam_conv
2024-03-07 13:22:11 +00:00
Maximilian Seidler
3d6162e06e
input-field: Add fade out timeout #3 (#142)
* 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
2024-03-06 21:12:49 +00:00
624f497272 shaders: fix missing premult for colorize in final blur
fixes #136
2024-03-06 00:06:04 +00:00
cdb8e7774f core: don't restore on terminate 2024-03-06 00:00:58 +00:00
7d5cb1dbb3 misc: fix warning about iso strings 2024-03-05 23:33:28 +00:00
f0bcadc6ad restore: limit to once every 4s 2024-03-05 23:32:31 +00:00
81ec54c0e8 shadow: fix build 2024-03-05 20:31:31 +00:00
9b54840e12 shadows: disable by default 2024-03-05 20:28:29 +00:00
a4dc596cb8 renderer: add shadowable props 2024-03-05 20:27:28 +00:00
2fa0da47ab core: restart on a critical signal or SIGHUP
ref #76
2024-03-05 19:04:01 +00:00
matteo4375
d45ffd53e7
Nix/HM module: add missing options (#132) 2024-03-05 18:50:21 +02:00
Maximilian Seidler
738cc241e3
asyncResourceGatherer: support for home relative paths (#96) 2024-03-05 14:49:52 +00:00
bvr-yr
d1f542a75f
input-field: add dots rounding option (#130)
* refactor: move dot props to struct, rename to camelCase

* input-field: add dots rounding option

* render: minor fix for odd input-field width

* add dots_rounding option to Home Manager
2024-03-04 17:59:36 +00:00
matteo4375
49ef1d306c
input-field: Add rounding option (#127)
* input-field: add rounding option

* add rounding option to nix home manager module
2024-03-04 01:54:27 +00:00
BranchManager
6a085d7f8e
core: don't auth on empty password (#126) 2024-03-04 00:26:38 +00:00
p4rfait
19d7844f04
hidden-input-field: add seed for random colors in hidden input field outline (#125) 2024-03-03 22:55:27 +00:00
f9fe60c7eb pam: fallback auth to su 2024-03-03 02:27:32 +00:00
ada7ce8e56 renderer: various fixes to transformations and backgrounds
fixes #111
2024-03-03 02:19:31 +00:00
Mihai Fufezan
97548ec0ad
Nix/HM module: add security.pam instructions 2024-03-02 22:13:02 +02:00
Maximilian Seidler
4286cfb29c
core: Fix unlock sync (#119)
* core: error on repeated unlock

* core: change termination points

This seems to fix sporadic freezes when unlocking.
2024-03-02 14:21:41 +00:00
Aaron Blasko
fa2a875e33
Adding a pam configuration file (#115) 2024-03-02 01:49:44 +02:00
Maximilian Seidler
64bdc477b2
Revert "core: dispatch on exit instead of roundtrip" (#114)
This reverts commit 2c7027d2b5.
Without the roundtrip it was possible that session_lock_surface_destroy gets called before unlock_and_destroy is processed.
2024-03-01 22:45:38 +00:00
Maximilian Seidler
a7ec195842 grace: ignore key up and fix typo 2024-03-01 19:52:50 +02:00
53eab43296 grace: unlock on key press
fixes #110
2024-03-01 13:53:53 +00:00
Maximilian Seidler
ac757cf7ab
input-field: show autentication failReason without additional input (#98)
This makes it so that
1. The renderer is triggered when the onPasswordCheckTimer callback is fired. Previously you had to give an
   additional input for the renderer to be triggered and the fail reason to show.
2. The updateDots function now sets dots.currentAmout to 0, when a failID is present.
   That leads to the draw function to return false and the failReason to be displayed until another input happens.
2024-02-29 14:34:27 +00:00
Mihai Fufezan
4aeea1d580
Nix: refactor flake 2024-02-29 15:13:35 +02:00
LOSEARDES77
a279ee7613
core: add help message (#88)
* core: add help message

* core: create help method

* remove short option for display arg

* fix alignment
2024-02-27 15:10:15 +00:00
2c7027d2b5 core: dispatch on exit instead of roundtrip 2024-02-27 13:25:57 +00:00
EastArctica
fd8b81aec8
core: use raw key values for tracking keypresses (#92) 2024-02-26 21:18:52 +00:00
8876ceccc2 format: fix format string 2024-02-26 19:51:12 +00:00
0d5115ab6b core: use lowercase syms for tracking keypresses
fixes #86
2024-02-26 18:34:34 +00:00
b8966fe05f asyncresourcegatherer: clarify callback thread safety 2024-02-26 18:27:27 +00:00
582e8c86b4 label: use a callback from asyncGatherer to render 2024-02-26 18:25:52 +00:00
1f268e0a39 core: create surface on monitor connect 2024-02-26 17:59:27 +00:00
bvr-yr
a7cffd0f77
render: remove alpha check for input-field (#90) 2024-02-26 17:37:19 +00:00
4acf8981b3 core: fix repeated key events triggering presses
fixes #66
2024-02-26 02:28:33 +00:00
bvr-yr
94ac7fef1a
input-field: dots improvements (#84)
* input-field: dots improvements

* fix stuff
2024-02-26 00:33:19 +00:00
WindyDay
146965e7fb
core: unlock on sigusr1 (#82)
* Add SIGUSR1 to unlock

* minor style improvements

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2024-02-25 14:08:12 +00:00
Mihai Fufezan
844a899254
flake.lock: update nixpkgs 2024-02-24 17:12:33 +02:00
Maurice Kraus
0ad65916b8
renderer: restrict maximum dot amount w.r.t to input width (#56) 2024-02-24 14:14:10 +00:00
Gonçalo Negrier Duarte
57e8000660
core: fix libc++ compatibility (#75)
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>
2024-02-24 02:54:15 +00:00
Jan Beich
8969351cba
core: Add libc++ compatibility (#73)
src/renderer/AsyncResourceGatherer.cpp:98:22: error: no viable overloaded '+='
   98 |             progress += 1.0 / (preloads + 1.0);
      |             ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~
src/renderer/widgets/IWidget.cpp:41:44: error: no member named 'current_zone' in namespace 'std::chrono'
   41 |     const auto current_zone = std::chrono::current_zone();
      |                               ~~~~~~~~~~~~~^
2024-02-23 21:29:08 +00:00
4c68780143 format: sanitize username for null
ref #64
2024-02-23 13:04:13 +00:00
Jan Beich
f85287a523
core: Unbreak build on FreeBSD (#71)
* Add OpenPAM support (used by BSDs except OpenBSD)

--   Package 'pam', required by 'virtual:world', not found
CMake Error at /usr/local/share/cmake/Modules/FindPkgConfig.cmake:619 (message):
  The following required packages were not found:

   - pam

src/core/Password.cpp:6:10: fatal error: 'security/pam_misc.h' file not found
    6 | #include <security/pam_misc.h>
      |          ^~~~~~~~~~~~~~~~~~~~~

* Add missing headers

src/renderer/widgets/IWidget.cpp: In member function 'virtual IWidget::SFormatResult IWidget::formatString(std::string)':
src/renderer/widgets/IWidget.cpp:51:41: error: 'getlogin' was not declared in this scope
   51 |     replaceAll(in, "$USER", std::string{getlogin()});
      |                                         ^~~~~~~~
src/renderer/widgets/IWidget.cpp:51:51: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)'
   51 |     replaceAll(in, "$USER", std::string{getlogin()});
      |                                                   ^
src/renderer/DMAFrame.cpp: In member function 'bool CDMAFrame::onBufferDone()':
src/renderer/DMAFrame.cpp:181:17: error: 'close' was not declared in this scope; did you mean 'pclose'?
  181 |                 close(fd[plane_tmp]);
      |                 ^~~~~
      |                 pclose
src/renderer/DMAFrame.cpp:196:13: error: 'close' was not declared in this scope; did you mean 'pclose'?
  196 |             close(fd[plane]);
      |             ^~~~~
      |             pclose
src/core/Password.cpp: In lambda function:
src/core/Password.cpp:44:31: error: 'strdup' was not declared in this scope
   44 |         reply->resp         = strdup(pass.c_str());
      |                               ^~~~~~
src/core/hyprlock.cpp: In member function 'void CHyprlock::spawnAsync(const std::string&)':
src/core/hyprlock.cpp:768:9: error: 'sigemptyset' was not declared in this scope
  768 |         sigemptyset(&set);
      |         ^~~~~~~~~~~
src/core/hyprlock.cpp:769:21: error: 'SIG_SETMASK' was not declared in this scope
  769 |         sigprocmask(SIG_SETMASK, &set, NULL);
      |                     ^~~~~~~~~~~
src/core/hyprlock.cpp:769:9: error: 'sigprocmask' was not declared in this scope
  769 |         sigprocmask(SIG_SETMASK, &set, NULL);
      |         ^~~~~~~~~~~
2024-02-23 12:54:14 +00:00
9ba88d0ace gbm: prefer linear modifiers
ref #62
2024-02-22 23:02:42 +00:00
retchohrips
f411d9d632 Nix: add blur settings and no_fade_in 2024-02-22 11:07:27 +02:00
272fc359ad gbm: pick only valid modifiers 2024-02-22 03:05:56 +00:00