Commit Graph

3182 Commits

Author SHA1 Message Date
68dfd6aa3a scope_guard/modules: Rename scope_guard to ScopeGuard
Using pascal case for the class name keeps it more consistent with the
majority of the other class names.
2023-10-24 17:51:38 +02:00
dd1de3efbf Revert "Revert "Fix potential memory leaks""
This reverts commit 2d33c20231 and
reapplies various patches for memory leaks.
The reason for the revert was a bug for a maximum duration interval
which caused sleep_for() to cause unpredictable behavior.
2023-10-24 17:51:38 +02:00
521dac8086 sleeper_thread: Make sleep_for more robust
In the previous fix for a passed max duration, the assumption was made
that at maximum one second will pass between the duration assignment and
the std::condition_variable::sleep_for() call.
This implementation makes the behavior more predictable by using
sleep_until() instead to emulate the sleep_for() behavior.
2023-10-24 17:51:34 +02:00
ad7d4eb07d sleeper_thread: Allow sleep_for with max duration
The standard library has the implicit requirement that for
std::condition_variable::sleep_for() the duration must not cause an
overflow if added to the current time.
This commit will reduce the duration accordingly to fit into the
duration type.
2023-10-24 17:44:35 +02:00
a459d8a9b3 Merge pull request #2605 from Syndelis/fix/hyprland-persistent-workspaces-disappear-when-empty 2023-10-24 08:31:11 +02:00
4aee5977d6 fix: set workspace as persistent on create_workspace 2023-10-23 21:07:37 -03:00
f2085fcd92 Merge pull request #2592 from zjeffer/hyprland/workspaces
General cleanup in hyprland/workspaces
2023-10-23 08:45:52 +02:00
c47d75ceda Merge pull request #2593 from x0rzavi/typo-fixes
docs: fix typos and improve language coherence
2023-10-23 08:45:08 +02:00
9ecdbcc7bc Merge pull request #2596 from rehanzo/master 2023-10-22 09:46:35 +02:00
dafe49d28c Merge pull request #2599 from Alexays/revert-2586-bugfix/fix-potential-memory-leaks
Revert "Fix potential memory leaks"
2023-10-22 09:44:57 +02:00
2d33c20231 Revert "Fix potential memory leaks" 2023-10-22 09:44:46 +02:00
5963bf6ace modules/mpris: change default interval value to 0 2023-10-21 18:14:46 -04:00
dab1493644 cleanup onEvent, dont use try/catch for flow control 2023-10-21 19:33:55 +02:00
acc911737d update window count inside the on_window_* functions 2023-10-21 18:53:53 +02:00
2d614c68f5 code review 2023-10-21 18:15:22 +02:00
d0cab2a367 docs: fix typos and improve language coherence 2023-10-21 21:15:25 +05:30
7576611782 formatting 2023-10-21 17:06:02 +02:00
ed65d9cdbd General cleanup in hyprland/workspaces 2023-10-21 16:52:23 +02:00
dbb887b4a9 Merge pull request #2585 from davxy/master
Show the network interface with highest priority (aka lower metric)
2023-10-21 14:10:21 +02:00
06f4028697 Merge pull request #2588 from taminob/bugfix/fix-custom-module-signal-without-interval
Custom module: Allow signal without interrupt
2023-10-21 14:09:12 +02:00
3413b70413 Merge pull request #2586 from taminob/bugfix/fix-potential-memory-leaks
Fix potential memory leaks
2023-10-21 14:08:58 +02:00
6a8b510db8 Merge pull request #2589 from taminob/bugfix/lint-check-hpp-header-files 2023-10-21 12:56:57 +02:00
f598e348c4 ci: Update Linter job 2023-10-21 12:50:56 +02:00
6dd2cfba34 ci: Lint header files with hpp file ending 2023-10-21 11:57:11 +02:00
ae748b2644 modules+util: fix actual (potential) memory leaks 2023-10-21 11:51:33 +02:00
a0b63d6b1e modules: use scope_exit for deletion to make code more robust 2023-10-21 11:51:18 +02:00
89e85db790 ALabel: make use of std::chrono::max() instead of magic number 2023-10-21 11:50:38 +02:00
a73669be6a modules/upower: use smart pointer to avoid memory leak 2023-10-21 11:50:28 +02:00
8c57756556 util: add scope_guard
This custom small implementation avoids adding an extra dependency like
Boost.ScopeExit
2023-10-21 11:50:06 +02:00
b8afde043c sleeper_thread: allow interrupting sleep()
This keeps the function consistent with sleep_until() and sleep_for()
which both can be interrupted.
This is relevant to allow an update via a "signal" without an "interval"
in a custom module.
2023-10-20 23:57:54 +02:00
eefd6e8336 Merge pull request #2578 from Syndelis/fix/hyprland-windows-disappearing 2023-10-20 10:24:56 +02:00
6829ed1bb4 Different interfaces have different index 2023-10-20 08:25:28 +02:00
7d5577a2ed feat: create persistent workspaces after regular ones at init
feat: avoid recreating duplicate workspaces
2023-10-19 21:29:38 -03:00
a41225c4e0 Revert "fix: fill persistent workspaces' windows at init"
This reverts commit e14a3b8687.
2023-10-19 21:23:00 -03:00
a0d2d95b41 chore: remove unused function 2023-10-19 21:21:55 -03:00
e14a3b8687 fix: fill persistent workspaces' windows at init 2023-10-19 21:19:08 -03:00
846842be80 feat: emit dispatcher when any window is created during update 2023-10-19 10:45:00 -03:00
e845db84ad feat: avoid recreating workspaces 2023-10-18 19:11:49 -03:00
193040c41e feat: attempt to move windows out of the create window payload before taking them from workspaces 2023-10-18 19:11:49 -03:00
871f9a1269 fix: revert clock 2023-10-18 08:45:56 +02:00
5319cb6e10 fix: upower hidded on start 2023-10-17 20:12:24 +02:00
208928ded5 fix: lint 2023-10-17 19:29:06 +02:00
4d7eb3bd15 Merge pull request #2515 from chrisjshore/clock_fix
fix clock to work with fmt 10.x
2023-10-17 19:25:58 +02:00
6b73e2aa58 Merge pull request #2114 from mmhat/split-cpu-module
Split cpu module
2023-10-17 19:25:29 +02:00
6ddd283d0f fix: special workspaces weren't registering windows because of the special qualifier prefix 2023-10-16 20:48:52 -03:00
e70a67d958 chore: lint
chore: swap push_back to emplace_back
2023-10-16 19:14:50 -03:00
67c0c9a66c fix: delay window creation to await for hyprland to create a workspace 2023-10-16 19:07:00 -03:00
42741c963e Merge pull request #2575 from Syndelis/feat/slider 2023-10-16 08:08:37 +02:00
9d316de15a fix: avoid compiling audio_backend if pulse is not available 2023-10-15 18:12:31 -03:00
ecbcf242d5 feat: allow unmuting by moving the pulseaudio slider 2023-10-15 17:52:12 -03:00