mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
Merge branch 'config-refactor'
This commit is contained in:
commit
e026ef22f4
8 changed files with 722 additions and 817 deletions
|
|
@ -59,6 +59,10 @@
|
|||
* Foot now terminates if there are no available seats - for example,
|
||||
due to the compositor not implementing a recent enough version of
|
||||
the `wl_seat` interface (https://codeberg.org/dnkl/foot/issues/779).
|
||||
* Boolean options in `foot.ini` are now limited to
|
||||
“yes|true|on|1|no|false|off|0”, Previously, anything that did not
|
||||
match “yes|true|on”, or a number greater than 0, was treated as
|
||||
“false”.
|
||||
|
||||
|
||||
### Deprecated
|
||||
|
|
|
|||
24
config.h
24
config.h
|
|
@ -19,7 +19,7 @@ enum conf_size_type {CONF_SIZE_PX, CONF_SIZE_CELLS};
|
|||
|
||||
struct config_font {
|
||||
char *pattern;
|
||||
double pt_size;
|
||||
float pt_size;
|
||||
int px_size;
|
||||
};
|
||||
DEFINE_LIST(struct config_font);
|
||||
|
|
@ -74,8 +74,8 @@ struct config {
|
|||
|
||||
struct {
|
||||
enum conf_size_type type;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
} size;
|
||||
|
||||
unsigned pad_x;
|
||||
|
|
@ -115,7 +115,7 @@ struct config {
|
|||
} bell;
|
||||
|
||||
struct {
|
||||
int lines;
|
||||
uint32_t lines;
|
||||
|
||||
struct {
|
||||
enum {
|
||||
|
|
@ -132,7 +132,7 @@ struct config {
|
|||
|
||||
wchar_t *text;
|
||||
} indicator;
|
||||
double multiplier;
|
||||
float multiplier;
|
||||
} scrollback;
|
||||
|
||||
struct {
|
||||
|
|
@ -212,10 +212,10 @@ struct config {
|
|||
struct {
|
||||
enum { CONF_CSD_PREFER_NONE, CONF_CSD_PREFER_SERVER, CONF_CSD_PREFER_CLIENT } preferred;
|
||||
|
||||
int title_height;
|
||||
int border_width;
|
||||
int border_width_visible;
|
||||
int button_width;
|
||||
uint16_t title_height;
|
||||
uint16_t border_width;
|
||||
uint16_t border_width_visible;
|
||||
uint16_t button_width;
|
||||
|
||||
struct {
|
||||
bool title_set:1;
|
||||
|
|
@ -235,7 +235,7 @@ struct config {
|
|||
struct config_font_list font;
|
||||
} csd;
|
||||
|
||||
size_t render_worker_count;
|
||||
uint16_t render_worker_count;
|
||||
char *server_socket_path;
|
||||
bool presentation_timings;
|
||||
bool hold_at_exit;
|
||||
|
|
@ -257,8 +257,8 @@ struct config {
|
|||
bool render_timer_osd;
|
||||
bool render_timer_log;
|
||||
bool damage_whole_window;
|
||||
uint64_t delayed_render_lower_ns;
|
||||
uint64_t delayed_render_upper_ns;
|
||||
uint32_t delayed_render_lower_ns;
|
||||
uint32_t delayed_render_upper_ns;
|
||||
off_t max_shm_pool_size;
|
||||
float box_drawing_base_thickness;
|
||||
bool box_drawing_solid_shades;
|
||||
|
|
|
|||
|
|
@ -894,9 +894,7 @@ This section is for advanced users and describes configuration options
|
|||
that can be used to tweak foot's low-level behavior.
|
||||
|
||||
These options are *not* included in the example configuration. You
|
||||
should not change these unless you understand what they do and note
|
||||
that changing the default values *will* print a warning when launching
|
||||
foot.
|
||||
should not change these unless you understand what they do.
|
||||
|
||||
Note that these options may change, or be removed at any time, without
|
||||
prior notice.
|
||||
|
|
|
|||
3
log.h
3
log.h
|
|
@ -11,7 +11,8 @@ enum log_class {
|
|||
LOG_CLASS_ERROR,
|
||||
LOG_CLASS_WARNING,
|
||||
LOG_CLASS_INFO,
|
||||
LOG_CLASS_DEBUG
|
||||
LOG_CLASS_DEBUG,
|
||||
LOG_CLASS_COUNT,
|
||||
};
|
||||
|
||||
void log_init(enum log_colorize colorize, bool do_syslog,
|
||||
|
|
|
|||
2
render.c
2
render.c
|
|
@ -3538,7 +3538,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
term->height = height;
|
||||
term->scale = scale;
|
||||
|
||||
const int scrollback_lines = term->render.scrollback_lines;
|
||||
const uint32_t scrollback_lines = term->render.scrollback_lines;
|
||||
|
||||
/* Screen rows/cols before resize */
|
||||
const int old_cols = term->cols;
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ fdm_title_update_timeout(struct fdm *fdm, int fd, int events, void *data)
|
|||
static bool
|
||||
initialize_render_workers(struct terminal *term)
|
||||
{
|
||||
LOG_INFO("using %zu rendering threads", term->render.workers.count);
|
||||
LOG_INFO("using %hu rendering threads", term->render.workers.count);
|
||||
|
||||
if (sem_init(&term->render.workers.start, 0, 0) < 0 ||
|
||||
sem_init(&term->render.workers.done, 0, 0) < 0)
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ struct terminal {
|
|||
int timer_fd;
|
||||
} title;
|
||||
|
||||
int scrollback_lines; /* Number of scrollback lines, from conf (TODO: move out from render struct?) */
|
||||
uint32_t scrollback_lines; /* Number of scrollback lines, from conf (TODO: move out from render struct?) */
|
||||
|
||||
struct {
|
||||
bool enabled;
|
||||
|
|
@ -535,7 +535,7 @@ struct terminal {
|
|||
|
||||
/* Render threads + synchronization primitives */
|
||||
struct {
|
||||
size_t count;
|
||||
uint16_t count;
|
||||
sem_t start;
|
||||
sem_t done;
|
||||
mtx_t lock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue