1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-30 02:28:31 +00:00

2843 Commits

Author SHA1 Message Date
Tin Švagelj
7526e7e18d
Cleanup remaining dpi scaling of min & max width (#1926)
This was left over from #1877.
2024-05-22 12:52:49 +00:00
Fernando
682db0c4df Fix build with specific option combination.
With some option combination the code to be compiled has not been updated with
regards to the changes in conky::rec, i.e get_height() becomes height() and
get_width() becomes width().
2024-05-20 14:41:21 -04:00
Tin Švagelj
256ffbd75a
Disable Xinput by default (#1920)
* Disable Xinput by default

Causes performance issues for a lot of people.
See #1886.
2024-05-17 13:09:38 +00:00
Fernando Apesteguía
c635df8689
Fix build with specific option combination (#1918)
Fixes incorrect member accessing left behind after #1910.
2024-05-15 18:18:11 +00:00
Tin Švagelj
2d50767216
Remove _member_access from geometry (#1910)
* It was difficult/too costly ensuring temporary this was correct when vecs contained in rects were accessed directly.
* Added semantics to `rect` and some utility functions.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-13 20:08:27 +00:00
Tin Švagelj
6bf383cf78
Introduce geometry primitives (#1862)
* Introduce geometry primitives based on Vc
* Apply geometry primitives to some existing code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-07 20:02:47 +00:00
Brenden Matthews
28a63989ab shared_ptr::unique() deprecated, use use_count()
unique() was deprecated in C++17, replace it with use_count(). We don't
need to worry about a race condition here.
2024-05-02 09:52:30 -04:00
Brenden Matthews
1352c28d1b Change debug message level 2024-05-02 08:32:22 -04:00
Brenden Matthews
d6a6aadc5c Add BUILD_COLOUR_NAME_MAP build flag
You can now specify `BUILD_COLOUR_NAME_MAP=OFF` to disable building the
gperf-based colour map, which also removes the requirement for gperf at
build time.
2024-05-02 08:32:22 -04:00
Brenden Matthews
d8c8fd3de5 CLI: -V now displays a short version string
* -v shows the full version output with build details
 * -V (capital V) shows only the short version string
2024-05-01 14:44:28 -04:00
Tin Švagelj
7b44b2a27b
Update DPI when changed in resource manager (#1878)
* Update xft_dpi on property change
  * Added fallback calculation when Xft is disabled.
* Removed display_width/height and replaced it with workarea for
  consistency.
* Make DPI work on X11 when Xft is disabled
* Make find_subwindow more specific, rename it

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-01 14:55:05 +00:00
Tin Švagelj
384bbed0df
Use _NET_VIRTUAL_ROOTS for querying virtual roots (#1875)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-30 20:59:28 +00:00
Tin Švagelj
e1f301354b
Remove dpi scaling of maximum width (#1877)
* Fix dpi scaling maximum_width setting
* Set workspace dimensions from WL output_geometry
* Append script parent dir to lua package.path
* Fix issues with dpi_scale function selection
* Re-implement rounding through `type_traits` generically

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-30 20:21:39 +00:00
Tin Švagelj
b486263b27
Use private mapping from provided shm_pool buffer (#1876)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-30 16:14:34 +00:00
Brenden Matthews
10045ab9f1 Require gperf at build-time
Rather than allowing the build to continue without gperf, we should
fail with an error so that the colour behaviour does not change in a
backward incompatible manner. The old colour behaviour should continue
to work going forward.

This resolves #1868.
2024-04-28 18:27:34 -04:00
Brenden Matthews
777b9a8dd7 Simplify binary include handling (and fix build) 2024-04-28 16:50:15 -04:00
Brenden Matthews
7598b89960 Disable -Wregister on gperf output
Older versions of gperf use the `register` keyword which is deprecated
in C++17, and warnings are treated as errors.

This disables the warning on gperf's output (colour-names.hh). I also
renamed `colour-names.cc` -> `colour-names.hh` because we're including
it as a header, not compiling it separately.

This resolves #1865.
2024-04-28 15:22:59 -04:00
Tin Švagelj
71c4e6ea52
Fix bad query_x11_windows early returns (#1864)
* Fix bad early returns
* Prevent fallback tree traversal from propagation code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-26 00:09:20 +00:00
Tin Švagelj
c5ee70177c
set_struts improvements (#1849)
Simplify and speed up strut code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-24 13:56:28 +00:00
Tin Švagelj
93ffab51a0
Use perfect hash (gperf) for parsing color names (#1848)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-24 06:24:54 +00:00
Tin Švagelj
6adf6b9dd4
Cleanup build flags, global namespace and includes (#1841)
- Separated displays so they don't have to all be included in build even when the features are disabled.
- Removed weird linker magic for display init and replaced it with straightforward (and faster) template functions that behave the same.
  - Replaced `disabled_display_output` classes with log messages.
- Add explicit compiler errors when feature dependent headers get included where they shouldn't (wl, x11).
- Switch BUILD_MOUSE_EVENTS dependency from OWN_WINDOW to BUILD_X11.
- Other minor improvements to some existing code which shouldn't affect behavior.
- Improve documentation.
- Remove X11 from unrelated headers.
  - This reaches 0% unneeded X11 polution in the sources.
  - Reenabled parts of window_type which would work in Wayland.
  - Remove unneeded guards.
- Display files are now no longer compiled if their features are disabled.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-23 21:15:37 +00:00
Tin Švagelj
c7df9c092e
Fix imlib_cache_size_setting::lua_setter (#1843)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-19 15:28:36 +00:00
Tin Švagelj
d815f9aa49
Create missing atom for query (#1834)
I'm assuming sending None Atom in the request will cause an error.
I defined those properties on my platform so that's why the function
didn't fail.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-17 19:40:01 +00:00
Tin Švagelj
f4b3229fc3
Exclusive XInput event handling (#1821)
- This commit changes mouse events to use XInput exclusively if it's not disabled.
- Added support for changing valuator properties through device configuration (see wiki for details).
- Fixed and cleaned up a lot of previously added code.
2024-04-17 02:04:14 +00:00
Tin Švagelj
c2dfa29f33
Refactor x11 event handling (#1819)
Move event handling code into separate functions.
2024-04-12 14:46:39 +00:00
Tin Švagelj
9565e2f7c2
Fix missing y_abs argument copy (#1813)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-11 13:34:56 +00:00
Tin Švagelj
e4213024e4
Set propagate to True, to not propagate by default (#1809)
XSendEvent propagate bool argument is actually "don't force propagation", so
True value means the event will only get propagated if it's not handled,
and False means the event will _always_ get propagated.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-10 17:35:30 +00:00
Tin Švagelj
9424ab8ca5
Fix event propagation on Openbox
Events now get correctly propagated to a window (or root if none) behind conky.
This was a necessary change to handle cases such as MATE+caja where caja
is used between conky and background to show icons and desktop menu.

* Don't change input focus on propagation

Could cause input focus flickering, so I'm leaving it up to WMs to manage focus.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-09 12:28:26 +00:00
Tin Švagelj
0419e01fe4
Fix render order in draw_stuff (#1801)
Pre draw hook is expected to run before anything else, so I moved imlib (e.g. ${image}) rendering after it.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-08 12:20:50 +00:00
Tin Švagelj
407769d03d
Skip propagation of non-input events
Fixes #1771

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-04 11:51:48 +00:00
Tin Švagelj
bfe39a8fd2
Handle external PropertyNotify events
Fixes #1792

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-04 11:51:01 +00:00
Brenden Matthews
d0033efe93 Increase max length of ACPI temp (fixes #977) 2024-03-23 09:27:29 -04:00
Brenden Matthews
8efb3f0e0e Fix naming conflict for Imlib2.h 2024-03-11 16:08:32 -04:00
Brenden Matthews
755e8c3e10 Fix regression in lua_load path handling
This should resolve #1778 (and similar issues).
2024-03-10 09:57:58 -04:00
Livanh
ee42a51006 Re-define text_object.data.l as "int64_t" 2024-03-04 08:18:19 -05:00
Livanh
4571c7f5d8 Define text_object.data.l as "long long"
This ensures that text_object.data.l is at least 64 bits in size,
even in a 32-bit environment. It can cause issues if smaller,
such as text turning black instead of a desired color (see #1477).
2024-03-04 08:18:19 -05:00
Brenden Matthews
5dd632c991 Don't call FcFini()
Fontconfig has a bug in FcFini() where it calls assert when it probably
shouldn't. This looks to be fixed in
6f6b397802,
which is in libfontconfig >=2.13.93.

Removing this seems to be safe, it will cause valgrind to show mem
leaks, but it doesn't look to be a problem in practice.
2024-02-26 08:40:02 -05:00
Tin Švagelj
97b6233d50 Add wlr layer shell check
Print a nicer error message if the compositor doesn't support
wlr-layer-shell-unstable-v1 spec.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-02-25 19:53:57 -05:00
Tin Švagelj
27d64fe834 Fix buffer overflow on X11 error bug
Skip descendant checking if cursor over desktop in query_x11_window_at_pos.
Simplify and correct check for whether cursor is over conky.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-02-25 08:13:45 -05:00
Brenden Matthews
8dae420bc8 Fix bad new/delete usage 2024-02-23 08:56:07 -05:00
Julian Schuler
f11eb219ad Format code using 'make clang-format' 2024-02-23 08:36:32 -05:00
Julian Schuler
183b45c7ea Add basic pulse audio source support
Added conky objects $if_pa_source_running and $if_pa_source_muted to
query the status of the default pulse audio source.
2024-02-23 08:36:32 -05:00
Brenden Matthews
35357e437c Update copyright 2024-02-22 08:53:35 -05:00
Brenden Matthews
ac9d107e77 Remove build date and associated vars
For reproducible builds, the build date messes things up, and some
distros just set it to 1980 now anyway. Thus, it's better to remove the
date altogether.
2024-02-22 08:36:21 -05:00
Brenden Matthews
51f6f0576c Fix update_interval handling from CLI args 2024-02-21 09:48:59 -05:00
Suyooo
aa6e61be2e X11: Fix infinite loop from Expose events being returned 2024-02-19 08:37:45 -05:00
Gene Carlson
0af1939caf Show cached memory as in free (Linux only) 2024-01-14 08:03:15 -05:00
Brenden Matthews
2fbe79a65c
One more byte for error 2023-11-19 14:16:34 -05:00
Tin
b9e7fa0574
Namespace mouse-events.cc/.h
Cleanup number namespaces so they use cstdint types instead of stdint.h
types. Latter could've caused some issues in the future.

Simplify valuator mask checking expression.

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:34 -05:00
Tin
1b45d95e26
Use core X11 events when Xinput is enabled
There was no way to propagate move events otherwise

Also, clang-format decided to kick in and reformat Xinput related
code...

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00