1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-16 01:57:09 +00:00
Commit Graph

35 Commits

Author SHA1 Message Date
bi4k8
30eda7e5d0
colours: parse 3-digit colour specifications again (#1480)
Co-authored-by: bi4k8 <bi4k8@github>
2023-03-31 12:52:37 -04:00
bi4k8
8f0a21bcc0 colours: cache X11 pixel values
now that we allocate these as-needed when converting colours to the X11 representation, we need to avoid reallocating the same colour over and over; cache them so we only allocate each colour once
2023-03-04 11:00:35 -05:00
Brenden Matthews
a39015b7bd
Apply clang-format. 2023-02-24 08:43:15 -05:00
bi4k8
5e98c49c4c
use new Colour type for specials and gradients (#1418)
* gradient, colours: use 24-bit colour depth internally on Wayland

our Colour type assumes this anyway; lower colour depth should be handled by display backends

* core: restore gradient color computation

this was mistakenly disabled when moving to a unified Colour representation

* core, gradient: use Colour type

* tests: gradient: always test hsv/hcl

colour computations no longer depend on the display backends we compile with, so these can be tested unconditionally now

* gradients, specials: use Color type

this makes specials now accept color names as well as hex codes, and removes all notions of color depth from gradient calculations

---------

Co-authored-by: bi4k8 <bi4k8@github>
2023-02-24 08:13:19 -05:00
bi4k8
fe27753929 move color settings to their own file
these settings are used for GUI builds as well as ncurses builds, and if we support colors in console and HTTP output, will be used there too

colors really are essential to what Conky does, even if some outputs don't support them, so it makes sense to build support for them unconditionally
2023-02-06 10:15:34 -05:00
bi4k8
9b2706fc49 build x11-color.cc for any GUI, not just wayland
we should actually build this for ncurses and html backends too, not just GUI ones
2023-02-06 10:15:34 -05:00
bi4k8
9ab51edf9f ncurses: allocate custom colors
color0-9 will now use their configured RGB values exactly
2023-02-06 10:15:34 -05:00
bi4k8
ec24079a3a remove x11 dependency for color parsing
this means we can use the same, portable color-parsing code
everywhere, including ncurses
2023-02-06 10:15:34 -05:00
bi4k8
a72902fa35 add Colour type and use it pervasively 2023-02-06 10:15:34 -05:00
bi4k8
d3e9bcbe71 wayland: use arithmetic instead of wrong-endian memcpy
this fixes corruption of parsed colors in Wayland-only builds
2023-01-04 07:59:33 -05:00
bi4k8
31b4c27abc use ARGB, not RGBA, for Wayland color values
this impacts only colors from which we compute Cairo colors, not the
rendered pixel buffers themselves, which were already and remain
ARGB32.

this makes Wayland and (24-bit) X11 use the same representation of
colors, fixing bugs when both backends were enabled.

we should still eventually switch to a backend-independent color
representation, because there are no guarantees of which pixel format
X11 will use (it isn't alway ARGB32) and backends like ncurses have
their own color representation; in most code we just hope the
unsigned long will be interpreted by the same backend as wrote it.
2023-01-03 08:35:23 -05:00
Brenden Matthews
76b0f049bc
Apply clang-format. 2022-12-24 09:44:03 -05:00
bi4k8
65f4d4f7eb
colours: define manually_get_x11_color for usage outside X11 2022-12-24 09:42:02 -05:00
bi4k8
e914128c32
colours: parse X11 colors under Wayland 2022-12-24 09:42:02 -05:00
bi4k8
d11742ae18
build, colours, core, gui, wayland, wl, x11: implement wayland display backend 2022-12-24 09:42:01 -05:00
Caio Freitas de Oliveira
ac7887ad09 refactor gradients to use config value instead of hard-coded option 2022-10-12 21:35:35 -04:00
Brenden Matthews
33aa5060c2
Make sure gradient width is >=2.
This should resolve #1070 for real this time.
2021-03-09 07:54:37 -06:00
Brenden Matthews
16f2ed659e
Tidy up gradient stuff. 2021-03-06 06:58:08 -06:00
Brenden Matthews
0f3c706336 Replace temporary colour array with smart pointer.
This should fix #1070.
2021-03-04 09:56:20 -05:00
Brenden Matthews
308f2cb8ea
Update copyright, authors. 2021-02-27 09:14:19 -06:00
isaac
36d685eb88 refactor and unit test 2021-01-23 18:00:53 -06:00
isaac
56920fde12 add build option 2021-01-23 18:00:53 -06:00
isaac
d25e0a72f4 added hsv gradient 2021-01-23 18:00:53 -06:00
Brenden Matthews
90673cf161 Make GitLab build work with clang checks. 2019-02-23 17:13:19 -05:00
lasers
7eec746b82 update copyright year to 2019 2019-01-05 11:15:36 -06:00
Brenden Matthews
4b92556fca
Build improvements: clang-tidy, sonar, Dockerfile. (#488) 2018-05-12 19:26:31 -04:00
Brenden Matthews
eebc8c653b
Add formatting/static analysis (#486)
* Reform source with clang-format.

Rules applied with:
    $ find . -iname *.h -o -iname *.cc | xargs clang-format \
        -style=file -i -fallback-style=google

* Add clang-format and analyze to build.

Based on the excellent work at: https://github.com/ttroy50/cmake-examples

* Clean up CMake stuff on macOS.

* Remove vim/emacs modelines.

* Update copyright dates.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.
2018-05-12 12:03:00 -04:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Pavel Labath
0852aa4fcd Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/ccurl_thread.cc
	src/conky.cc
	src/llua.cc
	src/logging.h
	src/nvidia.cc
2010-11-13 20:05:59 +01:00
Kevin Lyles
a251357f1d Fixed gradients to actually use both end colors
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-10-15 11:23:08 -07:00
Pavel Labath
b8bed06cc8 C++ version of get_x11_color() 2010-02-28 12:26:18 +01:00
Pavel Labath
12e98c7da5 Port out_to_x setting to lua-config 2010-02-25 22:28:34 +01:00
Pavel Labath
54630eb39e Header housekeeping: remove unneeded extern "C", add modelines, add inclusion guards
hopefully, this doesn't break anything
2010-02-25 21:50:50 +01:00
Brenden Matthews
7e78f036f0 Use consistent naming for build option macros.
Probably have broken some build features with this commit.
2010-01-06 18:39:44 -08:00
Brenden Matthews
d3a8c4d22e timed_thread
Convert everything (everything? maybe missed some stuff) from old
timed_thread to new timed_thread.
2010-01-04 19:21:12 -08:00