Commit graph

926 commits

Author SHA1 Message Date
Felix Kratz
e75afe9474 only try locking the mutex for an animation frame
the animation_frame_callback function shall never be blocked by waiting for the mutex to unlock.
This is because the CVDiplayLink* funtions will try to acquire a mutex that is locked during the
call to animation_frame_callback. This can lead to a dead lock scenario when one thread handles an
event, the animation thread waits for this event to be handled but the handling of said event requires
to unlock the CVDisplayLink mutex...
2023-09-01 10:35:08 +02:00
Felix Kratz
baeca7d182 try to fix rare freeze (#391) 2023-08-31 17:23:21 +02:00
Felix Kratz
b5e87a352a perform required bit hacks to get float animations working properly 2023-08-30 18:33:31 +02:00
Felix Kratz
93f567f775 mention related projects such as SbarLua and sketchybar-app-font 2023-08-28 20:15:21 +02:00
Felix Kratz
d6a1a20009 hotfix for deadlock in rare cases 2023-08-27 01:41:14 +02:00
Felix Kratz
1f670b052c revert threaded receiver due to large qlimit
This reverts commit c5f9e7a6c4.
2023-08-27 01:37:28 +02:00
Felix Kratz
07323b8141 use large qlimit for mach port 2023-08-27 01:34:54 +02:00
Felix Kratz
c5f9e7a6c4 receiver thread 2023-08-27 01:03:53 +02:00
Felix Kratz
e48552f724 hotfix for compiling on Monterey and below 2023-08-25 23:41:53 +02:00
Felix Kratz
dba2cd2670 improve final animation frame precision 2023-08-23 15:02:21 +02:00
Felix Kratz
e5e24cb6b6 bump version to 2.16.0 (some days testing until release) 2023-08-22 09:58:57 +02:00
Felix Kratz
9cf86148b6 add missing color subdomains to alias and graph 2023-08-22 09:57:44 +02:00
Felix Kratz
672fe10227 replace wifi icon 2023-08-22 09:18:01 +02:00
Felix Kratz
cf13bed569 add event guards in default config 2023-08-22 09:14:00 +02:00
Felix Kratz
1890f00c7f Use CVDisplayLink to sync the animation refresh to the actual refresh of the display
A CVDiplayLink creates its own thread, where the callback function is invoked. Thus the event logic must be guarded with a recursive mutex to disable two distinct threads from accessing the core memory at the same time.
2023-08-21 18:31:08 +02:00
Felix Kratz
6d053648d4 properly remove items when bar_manager is destroyed 2023-08-21 17:55:13 +02:00
Felix Kratz
e67b96aa7d only listen to mouse events when the mouse is over the bar 2023-08-17 11:19:31 +02:00
Felix Kratz
207c4d7b58 entirely remove Carbon, get all events directly through the event mach port 2023-08-17 11:19:31 +02:00
Felix Kratz
e05fca28cf change event return to void 2023-07-31 19:45:01 +02:00
Felix Kratz
fef2d53f9b remove now unused memory pool 2023-07-19 19:30:38 +02:00
Felix Kratz
ec9c93953e add the new hotload and reload domains to the help section 2023-07-19 18:58:38 +02:00
Felix Kratz
6f736e863c formatting 2023-07-19 18:54:34 +02:00
Felix Kratz
ef14e353fd remove unused field from event 2023-07-19 18:48:45 +02:00
Felix Kratz
5f978a75e3 cleanup event memory management and callbacks 2023-07-19 18:43:50 +02:00
Felix Kratz
c3cd790565 better internal event logic
.

.
2023-07-19 17:02:44 +02:00
Felix Kratz
9bcbb81b22 schedule mach messages with the CFRunLoop instead of using a thread 2023-07-19 16:11:46 +02:00
Felix Kratz
931edf128c add reload domain
The new domain --reload [optional: <path>] allows to reload the current config or reload a different config where the path to the sketchybarrc file of the config is supplied as an optional argument
2023-07-19 12:16:51 +02:00
Felix Kratz
b91c61a520 add hotload functionality
The hotload feature is disabled by default and can be controlled via --hotload <boolean>.
When enabled, a change to any file in the CONFIG_DIR will lead to an automatic reload of the config.
When a hotload event occurs, all items are removed and all settings/defaults are reset.
Then the sketchybarrc is executed again, which gives the same effect as restarting the program manually.
2023-07-18 16:36:35 +02:00
Felix Kratz
bfceb847dd use CONFIG_DIR variable in default config 2023-07-17 15:11:36 +02:00
Felix Kratz
61eacaeb45 simplify function to generate the window id from a CGEvent 2023-07-04 18:25:46 +02:00
Felix Kratz
464b5f25cb clean up libraries and remove Cocoa
cleanup
2023-06-28 22:52:17 +02:00
Felix Kratz
f0c1d8a2b6 adapt mouse scroll events
fixup
2023-06-28 22:14:13 +02:00
Revan Sopher
30a66a6d03 Scroll wheel events 2023-06-28 22:14:13 +02:00
Felix Kratz
cde3bc2fd4 implement a faster method to get the window id from a CGEvent and clean up mouse event handling 2023-06-28 21:56:39 +02:00
Felix Kratz
5b820d3b5d remove unused includes 2023-06-26 14:18:09 +02:00
Felix Kratz
ced353079d adapt makefile for new color system 2023-06-14 23:14:41 +02:00
Felix Kratz
781ee63a8d add new color subdomains
i.e. it is now possible to set (and animate) specific color channels:
color.alpha=<float>
color.red=<float>
color.green=<float>
color.blue=<float>
The current way of setting colors with full argb-hex strings is of course still possible
2023-06-14 23:13:39 +02:00
Felix Kratz
bdc19bd994 push version to 2.15.2 2023-06-01 09:10:26 +02:00
Felix Kratz
4058ffef0b fix aliases not updating properly when the parent application is restarted (#377) 2023-06-01 09:01:49 +02:00
Felix Kratz
14c6381aa8 properly escape single quotes 2023-06-01 08:48:54 +02:00
Felix Kratz
7b0f41bddf replace clock icon because NerdFonts did a breaking change... 2023-05-05 14:48:52 +02:00
Felix Kratz
0b14989379 fix space_change events not occuring when leaving fullscreen (#367) 2023-05-03 10:14:31 +02:00
Felix Kratz
8a31469211 add topmost=window option for --bar domain (#368) 2023-05-03 09:59:38 +02:00
Felix Kratz
e022372a30 fix problems with mouse events when popups have negative offset (#368) 2023-05-03 08:05:36 +02:00
Felix Kratz
dc3d7701f1 fix bug where setting the background height to 25 would behave strangely 2023-05-03 07:33:44 +02:00
Felix Kratz
2721fb5431 small fix for media_change event 2023-04-26 12:45:47 +02:00
Felix Kratz
3144ec6752 add media_change event via MediaRemote framework, delivers now playing info for all apps that support the macOS media remote 2023-04-26 00:45:44 +02:00
Felix Kratz
ae94d6a4ba fix $INFO variable being permanently overwritten 2023-04-24 07:15:03 +02:00
Felix Kratz
03c6bee037 push version to 2.15.0 2023-04-23 00:21:50 +02:00
Felix Kratz
d28734d918 revert bracket padding changes for now (#351) 2023-04-22 23:28:21 +02:00