1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-06 22:18:36 +00:00

2872 Commits

Author SHA1 Message Date
François Revol
b05810d439 Fix tcp_ping for non-existent local network hosts
Fixes #2042

We can't just assume select() exiting before the timeout to be a
success, since connect() can actually tell us there's no route to host
or other errors.
2024-09-24 22:54:26 +02:00
Thomas Zajic
568d7e75fd audacious.cc: print_audacious_filename(): fix always empty $audacious_filename
print_audacious_filename() always returns an empty (zero-length) $audacious_filename, due to one of the std::min() operators always being 0. Removing the std::min() construct fixes the problem. Fixes #1175.
2024-09-21 08:07:33 -04:00
Gene Carlson
71814776d9 src/fs.cc: Fix whitespace mistake. 2024-09-15 08:20:13 -04:00
Gene Carlson
839602baec src/fs.{cc,h}: Update fs_stats without error spam. 2024-09-15 08:20:13 -04:00
zlice
875c1af663 set display to null for race condition
https://github.com/dunst-project/dunst/blob/master/src/x11/x.c#L499
looks to be the source of some code which now sets display to NULL
for some type of race condition in X11. Xlibint.h allows for building
on Void Linux but needs min/max undefined. closes #1939
2024-09-13 08:22:14 -04:00
quiescens
788ac88b31 fix for #208, clear the "set" flag on fs_stats entries periodically 2024-08-29 11:11:16 -04:00
w0j0pl
03711ea5e5
Fix logic bug in cache_nvidia_string_value_update() (#2022)
* Update nvidia.cc

Made a suggested change in logic from issue #1177

* Update nvidia.cc

Made a suggested change in logic from issue #1178

* Update nvidia.cc

Made a suggested change in logic from issue #1178
2024-08-29 09:15:09 -04:00
w0j0pl
c428663e02 Update nvidia.cc
Made a suggested change in logic from issue #1177
2024-08-27 16:51:16 -04:00
donutAnees
e03891f993
Implemented graph value clamping (#2000)
* Implemented graph value clamping

* Update variables.yaml

* Update variables.yaml
2024-07-30 12:30:29 -04:00
donutAnees
7ec86cfbd8 Implemented path resolution 2024-07-29 16:13:51 -04:00
donutAnees
9afcfadebb Fixed Down and Up Speed graph scaling 2024-07-28 22:01:41 -04:00
donutAnees
965105bb9e Implemented Invert Y Axis Flag Feature 2024-07-26 15:06:02 -04:00
donutAnees
03ed0d0e79 Implemented Invert X Axis Flag Feature 2024-07-26 15:06:02 -04:00
donutAnees
2009147095 Fixed graph parsing error 2024-07-23 09:11:26 -04:00
David Seifert
cc927f5231 Fix for GCC 15 two-phase lookup
* GCC 15 is more aggressive about checking dependent names:
  https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=r15-2117-g313afcfdabeab3

Bug: https://bugs.gentoo.org/936522
2024-07-23 09:09:54 -04:00
donutAnees
82bfeba9bf Made downspeedgraph and upspeedgraph use same scaling 2024-07-21 08:08:10 -04:00
Tin Švagelj
ac25fcce8b
Fix invalid uniform vector init function in geometry (#1987)
Should fix the broken vertical border padding which relies on `uniform` to work.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-07-15 16:45:10 +00:00
Loukas Agorgianitis
49ca67d1ab
Fix minimum_height not scaled with dpi_scale like minimum_width (#1980) 2024-07-04 04:32:43 +00:00
Fernando
6cf51b2800 Address feedback by brndnmtthws 2024-06-14 20:47:18 -04:00
Fernando
942ce12f59 Move comment above the function it belongs to. 2024-06-14 20:47:18 -04:00
Fernando
b6767b4310 Fix AC/battery logic on FreeBSD.
The logic for the detection of the battery/AC line was not completely correct
for FreeBSD. Launching conky on console shows the following:

Cannot read sysctl "hw.acpi.battery.time"
Cannot read sysctl "hw.acpi.battery.life"
Cannot read sysctl "hw.acpi.battery.state"
Cannot read sysctl "hw.acpi.acline"
Unknown battery state 8!

In a PC, the hw.acpi.battery MIB does not exist.
Also, the hw.acpi.acline is only present if supported by the hardware.
In addition, some variables were used uninitialized and that causes strange
behavior: in a PC it showed it worked on battery and the % of charge was an
ridiculous big number.

This patch addresses the issue. It fixes the problem in the PC. It has also
being tested in a laptop running FreeBSD current plugin and unplugging the AC
line and also snatching the battery mercilessly to see if something breaks.
2024-06-14 20:47:18 -04:00
Marc Aldorasi
9f830224e5 Restore previous strut behavior 2024-06-10 15:41:05 -04:00
randomcoder67
f88b50d21a added comment 2024-06-06 07:44:16 -04:00
randomcoder67
ba9d84a347 set foreground colour to the first (lowest) colour before drawing the scale, to ensure it always stays the same colour 2024-06-06 07:44:16 -04:00
Tin Švagelj
0bc625fdea
Revert changes from #1926 & #1877 (#1949)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-06-01 14:38:16 +00:00
Chris Sp
c8b127d148
Fix minimum height not being applied (#1952) 2024-06-01 14:23:56 +00:00
Tin Švagelj
9358f56622
Replace use of strncat in scroll.cc with strcat (#1950)
pwithcolors is allocated based on computed length so strncat produces a
warning.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-06-01 14:22:24 +00:00
David Eritsyan
8e36363405 Fix typo in conky.cc 2024-05-30 10:36:45 -04:00
Tin Švagelj
f2938d8d66
Make dpi_scale match original behavior (#1936)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-26 19:04:53 +00:00
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