]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
22 months agolabel-freetype: Revamp to work better
Ray Strode [Mon, 18 Dec 2023 18:48:42 +0000 (13:48 -0500)] 
label-freetype: Revamp to work better

Recent changes to the freetype plugin made it quite buggy. There
was an infinite loop bug, and also a failure in metrics handling.

There's also a number of outstanding issues:

1. Kerning is not properly applied
2. hidpi displays don't render correctly

Rather than try to tackle all of these problems in a peicemeal way,
this commit substantially reworks the code.

It introduces a ply_freetype_unit_t type for more clearly managing
the fixed point math freetype requires. This type relies on less
than well defined compiler behavior, however, so it may cause issues
down the road.

It consolidates measuring and drawing code to one function, since in
both cases, the same computation needs to happen, and they had
slightly divergent implementations before.

It consolidates font loading code, so we don't end up with two
different font face loading routines, with different dpi values.

It also changes the names of some variables to be clearer in my
mind (like changing the loaded glyph to the name "glyph" instead
of the name "slot")

22 months agoply-console-viewer: Don't crash if passed a NULL format
Ray Strode [Mon, 18 Dec 2023 13:52:00 +0000 (08:52 -0500)] 
ply-console-viewer: Don't crash if passed a NULL format

The splash plugins currently call

ply_console_viewer_print (... NULL);

if no prompt message is specified... This leads to crash.

Rather than fixing all the splash plugins, this commit just makes
a NULL format be a noop.

22 months agoMerge branch 'synchronize-display-updates' into 'main'
Ray Strode [Sun, 17 Dec 2023 15:05:23 +0000 (15:05 +0000)] 
Merge branch 'synchronize-display-updates' into 'main'

ply-boot-splash: Flush display updates at fixed framerate

See merge request plymouth/plymouth!263

22 months agoply-boot-splash: Flush display updates at fixed framerate
Ray Strode [Sun, 17 Dec 2023 12:50:19 +0000 (07:50 -0500)] 
ply-boot-splash: Flush display updates at fixed framerate

At the moment the splash plugins have a lot of leeway when
updates can go to the screen. They can pause and unpause
updates by themselves, and draw at any point.

This rope has a little too much slack, it's actually kind
of complicated for the splash plugins to manage drawing
when they have more than one moving part.

For instance, a spinner animation may be drawing autonomously
from the splash plugin itself. To avoid flicker, everything
needs to be synchronized.

This commit adds that synchronization a layer higher than
the plugins themselves, in ply-boot-splash. It accumulates
drawing updates continuously without doing any drawing, until
a given deadline, then flushes the updates out all at once.

22 months agoRevert "ply-pixel-display: Pause the display and unpause it at a framerate"
Ray Strode [Sat, 16 Dec 2023 19:45:37 +0000 (14:45 -0500)] 
Revert "ply-pixel-display: Pause the display and unpause it at a framerate"

This reverts commit 815d3c72e2e4f7299490e43147972e7d31b91d17.

This idea of pausing and unpausing updates at a given framerate is good,
but doing it at the ply-pixel-display level causes a proble with
monitor hotplug.

22 months agoMerge branch 'fixconsoleviewerrefresh' into 'main'
n3rdopolis [Sat, 16 Dec 2023 13:27:24 +0000 (13:27 +0000)] 
Merge branch 'fixconsoleviewerrefresh' into 'main'

splash plugins: Better handling the redraw of the console viewer when visible,...

See merge request plymouth/plymouth!257

22 months agosplash plugins: Better handling the redraw of the console viewer when visible, and...
nerdopolis [Tue, 5 Dec 2023 11:27:21 +0000 (06:27 -0500)] 
splash plugins: Better handling the redraw of the console viewer when visible, and the splash state changes

22 months agoply-pixel-display: Pause the display and unpause it at a framerate
nerdopolis [Thu, 14 Dec 2023 00:05:59 +0000 (19:05 -0500)] 
ply-pixel-display: Pause the display and unpause it at a framerate

22 months agoply-entry: Don't crash hiding an entry that is already hidden
nerdopolis [Wed, 13 Dec 2023 01:56:30 +0000 (20:56 -0500)] 
ply-entry: Don't crash hiding an entry that is already hidden

22 months agoply-console-viewer: introduce ply_console_viewer_clear_line ()
nerdopolis [Wed, 13 Dec 2023 01:56:03 +0000 (20:56 -0500)] 
ply-console-viewer: introduce ply_console_viewer_clear_line ()

22 months agoply-console-viewer: Reorder the labels.
nerdopolis [Wed, 13 Dec 2023 00:58:59 +0000 (19:58 -0500)] 
ply-console-viewer: Reorder the labels.

When there is less than 1 screenful of lines, the first line now appears at the top, more similar to a terminal emulator

22 months agoply-terminal-emulator: Don't reject empty lines
nerdopolis [Wed, 13 Dec 2023 00:58:33 +0000 (19:58 -0500)] 
ply-terminal-emulator: Don't reject empty lines

22 months agoMerge branch 'nullify-borrowed-bytes' into 'main'
Ray Strode [Mon, 11 Dec 2023 15:45:51 +0000 (15:45 +0000)] 
Merge branch 'nullify-borrowed-bytes' into 'main'

ply-buffer: Nullify bytes outside scope block

See merge request plymouth/plymouth!262

22 months agoply-buffer: Nullify bytes outside scope block
Ray Strode [Mon, 11 Dec 2023 15:29:20 +0000 (10:29 -0500)] 
ply-buffer: Nullify bytes outside scope block

ply_buffer_borrow_bytes is a new macro to make it possible to
temporarily alter the allocation of the underlying bytes of
a `ply_buffer_t` outside of `ply_buffer_t` specific methods.

This macro works by forcing the caller to use a scope block
to clearly delineate where the allocation modification is
occurring. This macro was inspired by the python `with` feature.

Unfortunately, the macro leaves the bytes initialized outside
the scope block, so there is some temptation to continue messing
with the allocation when it's not allowed.

This commit improves the macro to address that problem by nullifying
the passed in variables at the conclusion of the borrowing scope
block.

22 months agoMerge branch 'resilientunicode' into 'main'
Ray Strode [Mon, 11 Dec 2023 03:14:31 +0000 (03:14 +0000)] 
Merge branch 'resilientunicode' into 'main'

ply-terminal-emulator: Handle incomplete Unicode characters with more resiliency

See merge request plymouth/plymouth!261

22 months agoply-terminal-emulator: Handle incomplete UTF-8 characters better
nerdopolis [Sat, 9 Dec 2023 02:48:47 +0000 (21:48 -0500)] 
ply-terminal-emulator: Handle incomplete UTF-8 characters better

This commit introduces a state machine to better handle when part
of a UTF-8 character comes in immediately, and the rest of it
comes in later.

It also tries to better handle cases where control characters
are interleaved in the middle of UTF-8 characters.

22 months agoply-terminal-emulator: Rename PLY_TERMINAL_SPACES_PER_TAB to PLY_TERMINAL_EMULATOR_SP...
nerdopolis [Sat, 9 Dec 2023 22:34:02 +0000 (17:34 -0500)] 
ply-terminal-emulator: Rename PLY_TERMINAL_SPACES_PER_TAB to PLY_TERMINAL_EMULATOR_SPACES_PER_TAB

22 months agoply-rich-text: Remove now unneeded definiton
nerdopolis [Sat, 9 Dec 2023 05:00:26 +0000 (00:00 -0500)] 
ply-rich-text: Remove now unneeded definiton

22 months agoutils: Rework UTF-8 handling
Ray Strode [Sun, 10 Dec 2023 15:18:30 +0000 (10:18 -0500)] 
utils: Rework UTF-8 handling

ply_utf8_character_get_size currently has this odd argument at
the end that is often just set to PLY_UTF8_MAX_CHARACTER_SIZE
and also the function returns magic values for cases where it
can't figure out the size because the byte isn't a leading
byte or is otherwise not valid UTF-8.

That means that API has a nuance to it that makes the code hard
to follow at a light read.

This commit attempts to improve the situation by dropping the
extra argument, and adds a way to get the type separate from the
size for clarity.

At the same time, this commit updates all the callers to use the
new API. There are two cases where the callers are trying to
remove the last character from a UTF-8 string, so this commit
adds a new function to consolidate that logic as well.

22 months agoply-buffer: Make ply_buffer_clear fast if called multiple times in a row
Ray Strode [Mon, 11 Dec 2023 02:59:47 +0000 (21:59 -0500)] 
ply-buffer: Make ply_buffer_clear fast if called multiple times in a row

ply_buffer_clear memsets over the entire allocation every time it is
run.

This commit makes it only clear the used part of the allocation.

22 months agobuffer: Add APIs for editing bytes in buffer
Ray Strode [Sun, 10 Dec 2023 15:09:37 +0000 (10:09 -0500)] 
buffer: Add APIs for editing bytes in buffer

This commit adds a few functions for getting at and
using the size, bytes, and capacity of a buffer.

This will make it easier to modify utf8 string on the side and
and update the buffer size afterward.

22 months agoMerge branch 'fixvtleds' into 'main'
n3rdopolis [Sat, 9 Dec 2023 15:33:51 +0000 (15:33 +0000)] 
Merge branch 'fixvtleds' into 'main'

Set the VT keyboard state with KDSKBMODE so that the VT console doesn't change the LED state

See merge request plymouth/plymouth!259

22 months agoply-input-device: Handle the keyboard sequence to change VTs
nerdopolis [Thu, 7 Dec 2023 22:25:58 +0000 (17:25 -0500)] 
ply-input-device: Handle the keyboard sequence to change VTs

22 months agoply-utils: Introduce ply_change_to_vt_with_fd () and ply_change_to_vt ()
nerdopolis [Thu, 7 Dec 2023 21:36:12 +0000 (16:36 -0500)] 
ply-utils: Introduce ply_change_to_vt_with_fd () and ply_change_to_vt ()

22 months agoWhen using input devices, set the VT keyboard state with KDSKBMODE so that the VT...
nerdopolis [Fri, 8 Dec 2023 15:31:41 +0000 (10:31 -0500)] 
When using input devices, set the VT keyboard state with KDSKBMODE so that the VT console doesn't change the LED state

22 months agomain: Restore terminal line discipline on hide splash
nerdopolis [Fri, 8 Dec 2023 15:30:37 +0000 (10:30 -0500)] 
main: Restore terminal line discipline on hide splash

At the moment if a program calls `plymouth hide-splash`
plymouth keeps the terminal in raw mode. That is wrong,
because programs call `plymouth hide-splash` specifically
so they can use the terminal.

This commit makes plymouth restore the terminal to cooked
mode so it's ready for the next program.

22 months agoMerge branch 'improve-console-viewer-api' into 'main'
Ray Strode [Thu, 7 Dec 2023 20:07:12 +0000 (20:07 +0000)] 
Merge branch 'improve-console-viewer-api' into 'main'

ply-console-viewer: Improve API

See merge request plymouth/plymouth!260

22 months agoply-console-viewer: Improve API
Ray Strode [Thu, 7 Dec 2023 19:59:11 +0000 (14:59 -0500)] 
ply-console-viewer: Improve API

At the moment injecting data into a console viewer involves calling
ply_console_viewer_parse_lines.

This name isn't optimal, since the data getting injected might not
be a full line at all.

This commit renames it to ply_console_viewer_write, and also adds
a ply_console_viewer_print that adds a printf like function for
convenience.

22 months agoMerge branch 'terminalwidth' into 'main'
n3rdopolis [Wed, 6 Dec 2023 22:52:30 +0000 (22:52 +0000)] 
Merge branch 'terminalwidth' into 'main'

ply-terminal-emulator: Take a maximum_column_count argument that is used in ply_rich_text.

See merge request plymouth/plymouth!256

22 months agoply-utils: rename ply_utf8_string_iterator_init to ply_utf8_string_iterator_initialize
nerdopolis [Wed, 6 Dec 2023 21:47:14 +0000 (16:47 -0500)] 
ply-utils: rename ply_utf8_string_iterator_init to ply_utf8_string_iterator_initialize

22 months agoply-rich-text: Rename functions from ending in _init to _initialize
nerdopolis [Wed, 6 Dec 2023 21:43:22 +0000 (16:43 -0500)] 
ply-rich-text: Rename functions from ending in _init to _initialize

22 months agoply-terminal-emulator: Fix terminal emulator accuracy issues, don't pad with the...
nerdopolis [Wed, 6 Dec 2023 05:08:01 +0000 (00:08 -0500)] 
ply-terminal-emulator: Fix terminal emulator accuracy issues, don't pad with the active formatting

22 months agoply-terminal-emulator: Require a fixed upfront column count
nerdopolis [Wed, 6 Dec 2023 02:12:37 +0000 (21:12 -0500)] 
ply-terminal-emulator: Require a fixed upfront column count

Some commands really do need to know how wide the terminal is to operate correctly. Without
it long lines don't wrap right and other badness can happen.

This commit addresses the problem by changing the terminal to take both a `number_of_rows`
and `number_of_columns` argument at construct time instead of just a `maximum_line_count`.

In order to properly implement that change, this commit also adds new api to `ply_rich_text_t`
to specify which parts of a run of rich text is read-only and which parts of the run can be
modified.

Changes in this commit were made with assistance from Ray Strode

22 months agoply-terminal-emulator: Don't spam the debug logs with the two most-common commands
nerdopolis [Wed, 6 Dec 2023 12:23:09 +0000 (07:23 -0500)] 
ply-terminal-emulator: Don't spam the debug logs with the two most-common commands

22 months agoply-terminal-emulator: cleanup dead code
nerdopolis [Wed, 6 Dec 2023 02:10:49 +0000 (21:10 -0500)] 
ply-terminal-emulator: cleanup dead code

22 months agoMerge branch 'add-redraw-debug' into 'main'
Ray Strode [Tue, 5 Dec 2023 21:28:00 +0000 (21:28 +0000)] 
Merge branch 'add-redraw-debug' into 'main'

drm: Add new plymouth.set-mode-on-redraws debug option

See merge request plymouth/plymouth!258

22 months agodrm: Add new plymouth.set-mode-on-redraws debug option
Ray Strode [Tue, 5 Dec 2023 21:19:19 +0000 (16:19 -0500)] 
drm: Add new plymouth.set-mode-on-redraws debug option

This option forces a modeset every frame

22 months agoMerge branch 'fixmodifierrepeat' into 'main'
Ray Strode [Mon, 4 Dec 2023 23:39:47 +0000 (23:39 +0000)] 
Merge branch 'fixmodifierrepeat' into 'main'

ply-input-device: Handle better when a keyboard sends key-repeat events for held modifier keys

Closes #225

See merge request plymouth/plymouth!255

22 months agoply-input-device: Handle modifiers better
nerdopolis [Mon, 4 Dec 2023 22:41:26 +0000 (17:41 -0500)] 
ply-input-device: Handle modifiers better

At the moment, holding down the shift key sends
key repeat events that lead to the output not
getting properly shifted.

This commit avoids updating modifier state when
the modifer key is held down.

22 months agoMerge branch 'input-device-debug' into 'main'
Ray Strode [Mon, 4 Dec 2023 23:11:52 +0000 (23:11 +0000)] 
Merge branch 'input-device-debug' into 'main'

ply-input-device: Handle SYN events

See merge request plymouth/plymouth!253

22 months agoply-input-device: Add new plymouth.debug-input-devices kernel option
Ray Strode [Mon, 4 Dec 2023 12:59:38 +0000 (07:59 -0500)] 
ply-input-device: Add new plymouth.debug-input-devices kernel option

Right now we don't have a lot of debugging information when processing
keyboard events.  I mean we don't want passwords to show up in logs
after all.

Still, it would be useful to have a way to turn the valve on to the
firehose.

This commit adds a plymouth.debug-input-devices kernel option.

22 months agoply-input-device: Handle SYN events
Ray Strode [Mon, 4 Dec 2023 12:54:41 +0000 (07:54 -0500)] 
ply-input-device: Handle SYN events

If the kernel falls behind a stream of input events, we currently
drop them on the floor.

It seems unlikely that this could ever happen theorhetically since we only
process keyboard events (versus, say, a high frequency stream of pointer
events, or a complex stylus device with inter-related events coming in,
in batches). Nonetheless, there is a report that suggests key events
may be getting dropped.

This commit adds support for handling the backlogged event case, and
hopefully address the bug report.

22 months agoMerge branch 'config-h-fix' into 'main'
Ray Strode [Mon, 4 Dec 2023 19:06:19 +0000 (19:06 +0000)] 
Merge branch 'config-h-fix' into 'main'

Include config.h automatically

See merge request plymouth/plymouth!254

22 months agoInclude config.h automatically
Ray Strode [Mon, 4 Dec 2023 19:02:51 +0000 (14:02 -0500)] 
Include config.h automatically

There are a few files missing #include <config.h>.

That is bad since it means those files don't get debug tracing.

This commit eliminates the pitfall by making sure the file is
included implicitly

22 months agoMerge branch 'make-random-numbers-random' into 'main'
Ray Strode [Mon, 4 Dec 2023 13:02:00 +0000 (13:02 +0000)] 
Merge branch 'make-random-numbers-random' into 'main'

ply-utils: Add function for getting random number

See merge request plymouth/plymouth!251

22 months agotwo-step: Use new ply_get_random_number function
Ray Strode [Mon, 4 Dec 2023 00:07:13 +0000 (19:07 -0500)] 
two-step: Use new ply_get_random_number function

22 months agospace-flares: Use new ply_get_random_number function
Ray Strode [Mon, 4 Dec 2023 00:07:00 +0000 (19:07 -0500)] 
space-flares: Use new ply_get_random_number function

22 months agoscript: Use new ply_get_random_number function
Ray Strode [Mon, 4 Dec 2023 00:06:47 +0000 (19:06 -0500)] 
script: Use new ply_get_random_number function

22 months agofade-throbber: Use new ply_get_random_number function
Ray Strode [Mon, 4 Dec 2023 00:06:32 +0000 (19:06 -0500)] 
fade-throbber: Use new ply_get_random_number function

22 months agoply-utils: Add function for getting random number
Ray Strode [Sun, 3 Dec 2023 23:59:18 +0000 (18:59 -0500)] 
ply-utils: Add function for getting random number

rand() and srand() are we use now and it's not working out too well
because we're seeding correctly in a number of places.

This commit adds one function to do it better.

Problem spotted by @emperor06

22 months agoMerge branch 'fixplythrobbercrash' into 'main'
Ray Strode [Mon, 4 Dec 2023 03:01:11 +0000 (03:01 +0000)] 
Merge branch 'fixplythrobbercrash' into 'main'

ply-throbber: Only set the loop when there is none. Be more flexable if...

See merge request plymouth/plymouth!252

22 months agoply-throbber: fully stop the throbber ply_throbber_start () is called after the throb...
nerdopolis [Mon, 4 Dec 2023 02:14:35 +0000 (21:14 -0500)] 
ply-throbber: fully stop the throbber ply_throbber_start () is called after the throbber is stopped with an end animation

22 months agoMerge branch 'betterxkblogging' into 'main'
Ray Strode [Mon, 4 Dec 2023 00:37:33 +0000 (00:37 +0000)] 
Merge branch 'betterxkblogging' into 'main'

ply-device-manager: Better logging of what vconsole variables are read

See merge request plymouth/plymouth!248

22 months agoply-device-manager: Better logging of what vconsole variables are read
nerdopolis [Sun, 3 Dec 2023 15:05:27 +0000 (10:05 -0500)] 
ply-device-manager: Better logging of what vconsole variables are read

22 months agoMerge branch 'dynamickeymapicon' into 'main'
Ray Strode [Mon, 4 Dec 2023 00:24:34 +0000 (00:24 +0000)] 
Merge branch 'dynamickeymapicon' into 'main'

ply-keymap-icon: Create dynamic text for the keymap name if it is not in the pre-rendered file

See merge request plymouth/plymouth!250

22 months agoply-keymap-icon: Create dynamic text for the keymap name if it is not in the pre...
nerdopolis [Sun, 3 Dec 2023 23:46:37 +0000 (18:46 -0500)] 
ply-keymap-icon: Create dynamic text for the keymap name if it is not in the pre-rendered file

23 months agoMerge branch 'parsekmsg' into 'main'
Ray Strode [Sat, 2 Dec 2023 23:33:26 +0000 (23:33 +0000)] 
Merge branch 'parsekmsg' into 'main'

Support for displaying logs from /dev/kmsg and the console on the screen, instead of relying on the text on the VT

See merge request plymouth/plymouth!224

23 months agospace-flares: Get the messages from the console and ply-kmsg-reader, and use ply...
n3rdopolis [Mon, 20 Mar 2023 02:42:41 +0000 (22:42 -0400)] 
space-flares: Get the messages from the console and ply-kmsg-reader, and use ply-terminal-emulator and ply-console-viewer to the display messages

23 months agofade-throbber: Get the messages from the console and ply-kmsg-reader, and use ply...
n3rdopolis [Mon, 20 Mar 2023 02:42:14 +0000 (22:42 -0400)] 
fade-throbber: Get the messages from the console and ply-kmsg-reader, and use ply-terminal-emulator and ply-console-viewer to the display messages

23 months agotwo-step: Get the messages from the console and ply-kmsg-reader, and use ply-terminal...
n3rdopolis [Mon, 20 Mar 2023 02:41:51 +0000 (22:41 -0400)] 
two-step: Get the messages from the console and ply-kmsg-reader, and use ply-terminal-emulator and ply-console-viewer to the display messages

23 months agolibply-splash-graphics: Introduce new ply-console-viewer control
n3rdopolis [Mon, 20 Mar 2023 02:41:32 +0000 (22:41 -0400)] 
libply-splash-graphics: Introduce new ply-console-viewer control

23 months agomain: start ply-kmsg-reader, and fix handling ESC key when there are no VTs
n3rdopolis [Mon, 20 Mar 2023 02:40:18 +0000 (22:40 -0400)] 
main: start ply-kmsg-reader, and fix handling ESC key when there are no VTs

23 months agoIntroduce ply-kmsg-reader to read kernel log messages from /dev/kmsg
n3rdopolis [Mon, 20 Mar 2023 02:38:26 +0000 (22:38 -0400)] 
Introduce ply-kmsg-reader to read kernel log messages from /dev/kmsg

23 months agoply-utils: Add function for getting current kmsg log levels
Ray Strode [Fri, 24 Nov 2023 16:02:33 +0000 (11:02 -0500)] 
ply-utils: Add function for getting current kmsg log levels

We need to know two things:

1. What log level threshold to follow when showing kernel messages to
   the console

2. What log level to use if a message comes in without a log level

This commit adds a new function `ply_get_kmsg_log_levels` that
returns those two values.

23 months agolabel-freetype: Add basic support for rich text
Ray Strode [Sat, 15 Jul 2023 00:47:55 +0000 (20:47 -0400)] 
label-freetype: Add basic support for rich text

Now that the ply-label interface supports rich text, we need to
implement it in the plugins.

This commit changes the freetype plugin to process
rich text in a rudimentary way that picks up colors, but not other
style attributes.

Based on initial work from nerdopolis

23 months agolabel-freetype: Handle utf-8 characters better
Ray Strode [Sat, 2 Dec 2023 18:11:37 +0000 (13:11 -0500)] 
label-freetype: Handle utf-8 characters better

The plugin currently assumes all characters are 7 byte ascii.

This commit just adds a mbrtowc call around the text to
handle UTF-8 text somewhat better.

23 months agolabel-freetype: Support monospaced fonts
n3rdopolis [Tue, 2 May 2023 21:03:03 +0000 (17:03 -0400)] 
label-freetype: Support monospaced fonts

23 months agolabel-freetype: Allow the label size to be set and calculated even when hidden
nerdopolis [Mon, 8 May 2023 23:24:19 +0000 (19:24 -0400)] 
label-freetype: Allow the label size to be set and calculated even when hidden

23 months agolabel-pango: Add support for set_rich_text
nerdopolis [Wed, 14 Jun 2023 23:35:50 +0000 (19:35 -0400)] 
label-pango: Add support for set_rich_text

Now that the ply-label interface supports rich text, we need to
implement it in the plugins.

This commit implements it for the pango plugin.

23 months agolabel-pango: Replace characters not supported by fonts with a replacement character
nerdopolis [Tue, 10 Oct 2023 11:45:35 +0000 (07:45 -0400)] 
label-pango: Replace characters not supported by fonts with a replacement character

Using a replacement character prevents hexboxes from appearing, which can mess up alignment of monospace fonts

23 months agoply-label: Set font before sizing label
Ray Strode [Sat, 2 Dec 2023 22:18:10 +0000 (17:18 -0500)] 
ply-label: Set font before sizing label

This commit makes sure the right font is loaded before sizing the
label, so the size comes out correctly.

23 months agoply-label: Add ply_label_set_hex_color () based off of ply_pixel_buffer_fill_with_hex...
n3rdopolis [Mon, 20 Mar 2023 02:40:52 +0000 (22:40 -0400)] 
ply-label: Add ply_label_set_hex_color () based off of ply_pixel_buffer_fill_with_hex_color for configuration of label text colors

23 months agoply-label: Introduce set_rich_text_for_control () for allowing text properties like...
nerdopolis [Wed, 14 Jun 2023 02:49:51 +0000 (22:49 -0400)] 
ply-label: Introduce set_rich_text_for_control () for allowing text properties like color to be set within labels

23 months agorich-text: Add iterator API
Ray Strode [Sat, 2 Dec 2023 17:22:35 +0000 (12:22 -0500)] 
rich-text: Add iterator API

This commit adds a small wrapper around ply_rich_text_get_characters
to make it easier to iterate over every character in a loop.

23 months agoply-utils: Add a utf-8 string iterator API
Ray Strode [Sat, 2 Dec 2023 17:36:54 +0000 (12:36 -0500)] 
ply-utils: Add a utf-8 string iterator API

This will make it easier to walk through a string and extract
each character.

23 months agoIntroduce ply-terminal-emulator to handle various console sequences from kernel loggi...
nerdopolis [Sun, 28 May 2023 01:22:32 +0000 (21:22 -0400)] 
Introduce ply-terminal-emulator to handle various console sequences from kernel logging facilities

23 months agolibply-splash-core: Add class to handle rich text
n3rdopolis [Sun, 26 Nov 2023 16:37:30 +0000 (11:37 -0500)] 
libply-splash-core: Add class to handle rich text

In order to implement a terminal that supports colors and styles,
we need some way assign colors and styles to text.

This commit adds a new class ply_rich_text_t to handle that.

Code split out of ply-terminal-emulator.c by Ray Strode.

23 months agopopulate-initrd: Ensure a monospace font is in the initrd, along with fonts defined...
n3rdopolis [Fri, 9 Dec 2022 18:07:36 +0000 (13:07 -0500)] 
populate-initrd: Ensure a monospace font is in the initrd, along with fonts defined in the theme.

23 months agocheck-format: Trim weird line that's getting added to output
Ray Strode [Thu, 30 Nov 2023 19:03:18 +0000 (14:03 -0500)] 
check-format: Trim weird line that's getting added to output

23 months agoMerge branch 'label-fixes' into 'main'
Ray Strode [Thu, 30 Nov 2023 18:53:39 +0000 (18:53 +0000)] 
Merge branch 'label-fixes' into 'main'

Label fixes

See merge request plymouth/plymouth!247

23 months agolabel-pango: Handle NULL text better
Ray Strode [Sun, 26 Nov 2023 03:44:49 +0000 (22:44 -0500)] 
label-pango: Handle NULL text better

23 months agolabel: Fix uncrustify spacing error in label
Ray Strode [Thu, 30 Nov 2023 18:37:00 +0000 (13:37 -0500)] 
label: Fix uncrustify spacing error in label

23 months agoMerge branch 'features/system-reset-mode' into 'main'
Ray Strode [Fri, 24 Nov 2023 20:11:37 +0000 (20:11 +0000)] 
Merge branch 'features/system-reset-mode' into 'main'

Add system-reset splash mode

Closes #148

See merge request plymouth/plymouth!246

23 months agoAdd system-reset splash mode
Victor Tran [Fri, 24 Nov 2023 20:11:36 +0000 (20:11 +0000)] 
Add system-reset splash mode

23 months agoMerge branch 'renametilebackground' into 'main'
Ray Strode [Thu, 23 Nov 2023 01:16:13 +0000 (01:16 +0000)] 
Merge branch 'renametilebackground' into 'main'

two-step scaled background fixes

See merge request plymouth/plymouth!245

23 months agospinfinity: Make the new ScaleBackgroundImage option more visible to theme editors
nerdopolis [Wed, 22 Nov 2023 16:09:05 +0000 (11:09 -0500)] 
spinfinity: Make the new ScaleBackgroundImage option more visible to theme editors

23 months agotwo-step: Rename ScaleBackgroundWallpaper to ScaleBackgroundImage
nerdopolis [Wed, 22 Nov 2023 16:07:56 +0000 (11:07 -0500)] 
two-step: Rename ScaleBackgroundWallpaper to ScaleBackgroundImage

23 months agotwo-step: Check for background.png before background-tile.png first, now that the...
nerdopolis [Wed, 22 Nov 2023 16:06:53 +0000 (11:06 -0500)] 
two-step: Check for background.png before background-tile.png first, now that the background may not always be tiled

23 months agoMerge branch 'scaletwostepbackground' into 'main'
Ray Strode [Wed, 22 Nov 2023 15:23:05 +0000 (15:23 +0000)] 
Merge branch 'scaletwostepbackground' into 'main'

two-step: Support a ScaleBackgroundWallpaper to scale the background instead of tiling it

See merge request plymouth/plymouth!243

23 months agotwo-step: Support a ScaleBackgroundWallpaper to scale the background instead of tiling it
nerdopolis [Wed, 22 Nov 2023 00:45:03 +0000 (19:45 -0500)] 
two-step: Support a ScaleBackgroundWallpaper to scale the background instead of tiling it

2 years agoMerge branch 'drm-guess-device-scale' into 'main'
Ray Strode [Thu, 31 Aug 2023 10:14:36 +0000 (10:14 +0000)] 
Merge branch 'drm-guess-device-scale' into 'main'

drm: Guess device-scale when using simpledrm

See merge request plymouth/plymouth!242

2 years agodrm: Guess device-scale when using simpledrm
Hans de Goede [Tue, 15 Aug 2023 17:25:21 +0000 (19:25 +0200)] 
drm: Guess device-scale when using simpledrm

When displaying on a simpledrm kms device the physical dimensions
of the screen are unknown. Use the heuristics from ply_get_device_scale ()
to guess the device scale to avoid rendering things too small
on 4K screens.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agodrm: Add check if the driver used is simpledrm
Hans de Goede [Tue, 15 Aug 2023 16:41:29 +0000 (18:41 +0200)] 
drm: Add check if the driver used is simpledrm

Add a check to see if the driver used is simpledrm,
this is a preparation patch for adding support to set
device_scale based on heuristics when using simpledrm.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agodrm: Initialize rotation local variable
Hans de Goede [Tue, 15 Aug 2023 16:42:46 +0000 (18:42 +0200)] 
drm: Initialize rotation local variable

Initialize rotation local variable to fix the following
false positive compiler warning:

src/plugins/renderers/drm/plugin.c: In function ‘get_primary_plane_rotation’:
src/plugins/renderers/drm/plugin.c:485:31: warning: ‘rotation’ may be used uninitialized [-Wmaybe-uninitialized]
  485 |                 *rotation_ret = rotation;
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~
src/plugins/renderers/drm/plugin.c:419:18: note: ‘rotation’ was declared here
  419 |         uint64_t rotation;
      |                  ^~~~~~~~

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agoutils: Add ply_guess_device_scale () helper
Hans de Goede [Tue, 15 Aug 2023 17:05:20 +0000 (19:05 +0200)] 
utils: Add ply_guess_device_scale () helper

Add a ply_guess_device_scale () helper for getting device-scale
when the physical dimensions of the output are not available.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agoMerge branch 'drm-bgrt-scale-fix' into 'main'
Ray Strode [Wed, 16 Aug 2023 22:07:47 +0000 (22:07 +0000)] 
Merge branch 'drm-bgrt-scale-fix' into 'main'

drm: Use first output for panel info if there is no builtin display

See merge request plymouth/plymouth!241

2 years agotwo-step: Fix spelling of "different"
Hans de Goede [Mon, 14 Aug 2023 14:57:54 +0000 (16:57 +0200)] 
two-step: Fix spelling of "different"

Fix "differtent" type, replacing it with "different".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agodrm: Use first output for panel info if there is no builtin display
Hans de Goede [Mon, 14 Aug 2023 14:50:22 +0000 (16:50 +0200)] 
drm: Use first output for panel info if there is no builtin display

The two-step renderer uses ply_renderer_get_panel_properties() to get
the device-scale used for the builtin panel, assuming this is most likely
light-up by the firmware on boot and that this is thus also displaying
the bgrt boot splash shown by the firmware at boot.

It needs to know the device-scale for this output so that if hi-dpi
(device-scale=2) rendering is used on the output it can also set
device-scale=2 on the ply_pixel_buffer() used for the bgrt background
so that the pixel-buffer code knows the splash is pre-scaled and
doesn't double it in size making it twice as big as original.

ATM this doubling in size of the splash is exactly what happens
when using a desktop with a hidpi monitor because the drm plugin
does not provide any "panel" properties in this case.

To avoid this fall-back to using the properties of the first
enumerated (connected) output for get_panel_properties().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 years agoMerge branch 'i18n-fixes' into 'main'
Ray Strode [Wed, 16 Aug 2023 22:00:46 +0000 (22:00 +0000)] 
Merge branch 'i18n-fixes' into 'main'

Fix translations after meson conversion

See merge request plymouth/plymouth!240

2 years agoi18n: Check for NL plymouth.mo file instead of /usr/share/locale existence
Hans de Goede [Tue, 15 Aug 2023 10:23:05 +0000 (12:23 +0200)] 
i18n: Check for NL plymouth.mo file instead of /usr/share/locale existence

setlocale () does not work when there is no locale info for
the selected LANG / LC_MESSAGES. But it does cache the set
LANG / LC_MESSAGES and on subsequent setlocale () calls with
the same LANG / LC_MESSAGES it does not recheck for the locale info.

Thus if the initrd does not have translations then the setlocale ()
call should be delayed to after the chroot so that e.g.
the "Installing Updates..." text, which only is shown after
the chroot, gets translated properly.

So far we have been checking the /usr/share/locale dir exists,
but it is possible that some initrd generators may create
that without the necessary locale info being available.

Instead check for the NL plymouth.mo file, assuming that
if that is available we have all the necessary locale info.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>