Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.10 rebase #367

Merged
merged 105 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
eafa655
removed bloat (lol)
WillPower3309 Nov 29, 2024
889ad07
added back bloat
WillPower3309 Nov 29, 2024
29fd6bb
added back some docs
WillPower3309 Nov 29, 2024
50fe988
added upstream config.in
WillPower3309 Nov 29, 2024
f2f2d75
added scenefx dep
WillPower3309 Nov 30, 2024
395bcad
removed outdated readme section
WillPower3309 Nov 30, 2024
b6cc394
added scenefx dep
WillPower3309 Dec 1, 2024
bd3806f
moved a lot of libs to scenefx ver
WillPower3309 Dec 2, 2024
9dd2266
added back corner radius cmd
WillPower3309 Dec 7, 2024
6879dbe
added corner radius (and blur poc) to buffers
WillPower3309 Dec 27, 2024
2909c22
mostly added blur command
WillPower3309 Dec 27, 2024
30d5484
moved node effect setting
WillPower3309 Dec 27, 2024
fbf5733
added blur_brightness
WillPower3309 Dec 27, 2024
5340d17
added remaining blur_data commands
WillPower3309 Dec 27, 2024
358b09e
added TODO
WillPower3309 Dec 27, 2024
9a560c8
added back blur documentation
WillPower3309 Dec 27, 2024
ae3e5a4
Fixed CSD not being clipped, fixing blurred CSD subsurfaces
ErikReider Dec 27, 2024
42172f5
fixed spelling
WillPower3309 Dec 28, 2024
d89ca7f
added blur xray command
WillPower3309 Dec 28, 2024
7b0fffe
Added forgotten code from upstream
ErikReider Dec 30, 2024
8251eb4
started adding xray blur
WillPower3309 Dec 31, 2024
c8708b6
added rounded titlebar
WillPower3309 Jan 1, 2025
c425f99
Fixed optimized blur node not being rendered
ErikReider Jan 1, 2025
8f4beda
Enable xray blur for tiled toplevels
ErikReider Jan 1, 2025
4c5a34a
Mark the optimized blur as dirty on background/bottom layer commit/de…
ErikReider Jan 1, 2025
59b5060
Mark xray blur as dirty when toggling xray and blur
ErikReider Jan 1, 2025
8c93949
Fixed blur commands formatting
ErikReider Jan 1, 2025
80a2d10
Added shadows
ErikReider Jan 1, 2025
cfd2c39
Fixed shadow flickering when displaying a saved view (resizing)
ErikReider Jan 1, 2025
75d7f79
Added shadow_offset command
ErikReider Jan 1, 2025
b31741d
Added shadows_on_csd command
ErikReider Jan 1, 2025
f314149
minimized shadow impl and now account for titlebar in shadow size
WillPower3309 Jan 1, 2025
c154de3
removed unneeded conditional
WillPower3309 Jan 1, 2025
3da505f
Fixed shadows not being toggleable
ErikReider Jan 2, 2025
1cab419
Move the shadow node to the bottom of the container tree
ErikReider Jan 2, 2025
668bc22
fixed segfault
WillPower3309 Jan 4, 2025
7318c37
removed unneeded code
WillPower3309 Jan 4, 2025
f82c4b5
removed comment
WillPower3309 Jan 4, 2025
a025548
adjust titlebar rounding for stacked and tabbed containers
WillPower3309 Jan 4, 2025
aa55766
left TODO
WillPower3309 Jan 9, 2025
59010af
fixed tabbed titlebar bug
WillPower3309 Jan 10, 2025
84f2067
first attempt at rounded border corners (top TODO)
WillPower3309 Jan 10, 2025
83ea520
added top border rounding
WillPower3309 Jan 15, 2025
a0c9765
starting to figure out bottom border hole
WillPower3309 Jan 16, 2025
0e6b0c6
Added shadow hole
ErikReider Jan 16, 2025
915917c
Set border and shadow hole corner_location
ErikReider Jan 17, 2025
0d688d5
Added minimize to scratchpad
ErikReider Jan 19, 2025
d9c5353
Fixed borders/shadows position being broken for toplevels with geomet…
ErikReider Jan 19, 2025
1ac8fa8
Fixed border offset being off when a parent container is displaying a…
ErikReider Jan 19, 2025
8a9844e
Fixed shadows being duplicated in stacked/tabbed layouts
ErikReider Jan 19, 2025
2e4f10b
Fixed double shadows when toggling tabbed/stacked layout
ErikReider Jan 19, 2025
cad9235
Fixed toplevel rounding top corners in tabbed/stacked layouts
ErikReider Jan 19, 2025
f2088db
simplified output_configure_scene
WillPower3309 Jan 20, 2025
543b01e
Round 2: Fixed toplevel rounding top corners in tabbed/stacked layouts
ErikReider Jan 21, 2025
8ab677e
added TODO for marks / title text hole
WillPower3309 Jan 22, 2025
fa87fea
Changed hole_data to clipped_region
ErikReider Jan 22, 2025
02c1161
Added back titlebar_separator
ErikReider Jan 22, 2025
7b542e1
Fixed non view buffers being rounded/blurred/etc...
ErikReider Jan 22, 2025
f750136
Don't ignore transparent views when blurring
ErikReider Jan 22, 2025
28fffc3
Fixed extra titlebar pixel when tabbed
ErikReider Jan 24, 2025
fdda28e
Removed setting of text_buffer corner radius
ErikReider Jan 24, 2025
2a3f5d1
Fixed optimized blur not being used for tiled containers
ErikReider Jan 24, 2025
da9b164
Added smart_corner_radius
ErikReider Jan 24, 2025
1a44576
Fixed optimized blur resizing to the previous output size
ErikReider Jan 24, 2025
80a8d7e
Added layer_effects with some new options
ErikReider Jan 24, 2025
7871e40
Added back dim effect
ErikReider Jan 24, 2025
51d4a14
Fixed layer_effect shadows not being applied until output resize
ErikReider Jan 24, 2025
f80cda8
Updated README with layer_effects
ErikReider Jan 24, 2025
5545dfb
renamed size -> area
WillPower3309 Jan 25, 2025
723c848
Removed unneeded TODOs
ErikReider Jan 25, 2025
913ae75
Added back swayfx version output
ErikReider Jan 25, 2025
0cd6ba9
Added back IPC changes
ErikReider Jan 25, 2025
6e07bf7
set blur + corner radius for moving indicator
WillPower3309 Jan 25, 2025
c71a325
dont use optimized blur for tiling indicator
WillPower3309 Jan 25, 2025
68b4d11
Fixed tiling indicator corner radius sometimes being larger than self
ErikReider Jan 26, 2025
145d3c7
removed saturation from README
WillPower3309 Jan 26, 2025
4bfacda
added back options in sway.5.scd
WillPower3309 Jan 26, 2025
1e97fbf
Fixed container effect not being re-set on config reload
ErikReider Jan 26, 2025
df7f0c5
Updated layer_effects man page + disable effects for bottom layers
ErikReider Jan 26, 2025
7dda5ed
add clipped region for titlebar text
WillPower3309 Jan 28, 2025
dd0ccc5
Use node-relative clipping rect positions
ErikReider Jan 29, 2025
d6b6463
Fixed optimized blur with rotated outputs
ErikReider Jan 30, 2025
a9e1529
Fixed titlebar clipped region not compensating for border thickness
ErikReider Jan 30, 2025
6f84ad6
Tiling indicator corner radius now matches container corner radius
ErikReider Jan 30, 2025
1f4de85
Update the optimized blur node size when arranging output
ErikReider Jan 31, 2025
62def01
fixed titlebar text clipping pos
WillPower3309 Feb 2, 2025
ad6d3c4
clip background region from titlebar border rect
WillPower3309 Feb 2, 2025
595ebb0
slightly optimized the titlebar corner rounding
WillPower3309 Feb 6, 2025
7c57daf
fixed corner radius in titlebar
WillPower3309 Feb 6, 2025
56df73f
update corner radius to 0 when corner location is none
WillPower3309 Feb 6, 2025
7355a67
add temp debug print
WillPower3309 Feb 8, 2025
6722367
removed debug print
WillPower3309 Feb 8, 2025
3909065
default dim to off
WillPower3309 Feb 8, 2025
88b78ba
Fixed dim not rounding the top corners when no titlebar is visible
ErikReider Feb 8, 2025
c2622de
Fixed tabbed/stacked toplevels not being dimmed when not in focus
ErikReider Feb 8, 2025
a93e2e9
Fixed bottom layer not being arranged
ErikReider Feb 8, 2025
ca7a3ff
Fixed layer shadow failed not being initialized
ErikReider Feb 10, 2025
289eddd
Fixed layer shadow not using the pending size
ErikReider Feb 10, 2025
7402d6c
Print scenefx version on start
ErikReider Feb 10, 2025
5e5d3c5
Fixed effects not being applied to subsurfaces
ErikReider Feb 10, 2025
3b21abf
Don't skip bottom layer when applying layer effects
ErikReider Feb 11, 2025
3cabfd5
Fixed layer shadow size not being set correctly
ErikReider Feb 11, 2025
593461f
Bumped scenefx dependency version to 0.2
ErikReider Feb 14, 2025
d415fa1
Fixed optimized blur not following output scaling
ErikReider Feb 15, 2025
7a4ab5b
Adjusted optimized blur logic to conform to scenefx PR: wlrfx/scenefx…
ErikReider Feb 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Sway is an incredible window manager, and certainly one of the most well establi
+ **Anti-aliased rounded corners, borders, and titlebars**
+ **Shadows**
+ **Dim unfocused windows**
+ **Per application saturation control**: Allows the user to set the saturation (Digital Vibrance) for specific applications. Great for some FPS games!
+ **Scratchpad treated as minimize**: Allows docks, or panels with a taskbar, to correctly interpret minimize / unminimize requests ([thanks to LCBCrion](https://github.com/swaywm/sway/issues/6457))
+ **nixify the repo**: Allows nixos users to easily contribute to and test this project

Expand Down Expand Up @@ -47,18 +46,29 @@ Sway is an incredible window manager, and certainly one of the most well establi
- The current layer namespaces can be shown with `swaymsg -r -t get_outputs | jq '.[0].layer_shell_surfaces | .[] | .namespace'`
- Example: `layer_effects "waybar" blur enable; shadows enable; corner_radius 6`
- Note: If an application uses gtk, its namespace is likely to be "gtk-layer-shell"
- SwayIPC Example: `swaymsg "layer_effects 'waybar' 'blur enable; shadows enable; corner_radius 6'"`
- SwayIPC Example: `swaymsg layer_effects "waybar" "blur enable"` (you can only set one effect at a time through `swaymsg`)
- Config Example:
```
layer_effects "waybar" {
blur enable;
blur_xray enable;
blur_ignore_transparent enable;
shadows enable;
corner_radius 20;
}
```
- Available Effects:
- `blur <enable|disable>`
- `blur_xray <enable|disable>`
- `blur_ignore_transparent <enable|disable>`
- `shadows <enable|disable>`
- `corner_radius <int>`
- `reset`: To reset/disable all previously applied effects to the layer application
+ Dim unfocused windows:
- `default_dim_inactive <float value 0.0 - 1.0>`
- `for_window [CRITERIA_HERE] dim_inactive <float value 0.0 - 1.0>`
- `dim_inactive_colors.unfocused <hex color> ex, #000000FF`
- `dim_inactive_colors.urgent <hex color> ex, #900000FF`
+ Application saturation: `for_window [CRITERIA HERE] saturation <set|plus|minus> <val 0.0 <-> 2.0>`
+ Keep/remove separator border between titlebar and content: `titlebar_separator enable|disable`
+ Treat Scratchpad as minimized: `scratchpad_minimize enable|disable`: **we recommend keeping this setting off, as there are many kinks to iron out here**

Expand Down Expand Up @@ -123,12 +133,6 @@ SwayFX will drop root permissions shortly after startup.

SwayFX would love to receive any new features that you're willing to build! Generally, we'd like to focus on eye-candy type improvements to keep our scope appropriate. If you'd like to build something that you think may be out of that focus, please raise an issue and we can discuss whether or not it will fit within this project.

Here's a quick outline of where most of our changes lie vs the main sway repository:

+ `sway/desktop/render.c`: the file that handles calling `fx_renderer` to render to the screen, handles damage tracking and scaling
+ `sway/desktop/fx_renderer/fx_renderer.c`: the meat and potatoes of this project, structured as similarly to wlr_renderer as possible
+ `sway/desktop/fx_renderer/shaders`: where all of the shaders that fx_renderer uses live

## Acknowledgements

The SwayFX team would like to first and foremost thank the maintainers and contributors of the Sway window manager. We are but a humble group of Sway enthusiasts who wanted to expand upon your creation.
Expand Down
1 change: 0 additions & 1 deletion client/pool-buffer.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200809
#include <assert.h>
#include <cairo.h>
#include <errno.h>
Expand Down
1 change: 0 additions & 1 deletion common/gesture.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200809L
#include "gesture.h"

#include <math.h>
Expand Down
1 change: 0 additions & 1 deletion common/ipc-client.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
Expand Down
1 change: 0 additions & 1 deletion common/log.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200112L
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion common/loop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200112L
#include <limits.h>
#include <string.h>
#include <stdbool.h>
Expand Down
2 changes: 0 additions & 2 deletions common/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
lib_sway_common = static_library(
'sway-common',
files(
'background-image.c',
'cairo.c',
'gesture.c',
'ipc-client.c',
Expand All @@ -14,7 +13,6 @@ lib_sway_common = static_library(
),
dependencies: [
cairo,
gdk_pixbuf,
pango,
pangocairo,
wayland_client.partial_dependency(compile_args: true)
Expand Down
3 changes: 3 additions & 0 deletions common/pango.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ size_t escape_markup_text(const char *src, char *dest) {
PangoLayout *get_pango_layout(cairo_t *cairo, const PangoFontDescription *desc,
const char *text, double scale, bool markup) {
PangoLayout *layout = pango_cairo_create_layout(cairo);
pango_context_set_round_glyph_positions(pango_layout_get_context(layout), false);

PangoAttrList *attrs;
if (markup) {
char *buf;
Expand Down Expand Up @@ -104,6 +106,7 @@ void get_text_size(cairo_t *cairo, const PangoFontDescription *desc, int *width,
void get_text_metrics(const PangoFontDescription *description, int *height, int *baseline) {
cairo_t *cairo = cairo_create(NULL);
PangoContext *pango = pango_cairo_create_context(cairo);
pango_context_set_round_glyph_positions(pango, false);
// When passing NULL as a language, pango uses the current locale.
PangoFontMetrics *metrics = pango_context_get_metrics(pango, description, NULL);

Expand Down
1 change: 0 additions & 1 deletion common/stringop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdarg.h>
#include <stdbool.h>
Expand Down
1 change: 0 additions & 1 deletion common/util.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <fcntl.h>
#include <math.h>
Expand Down
40 changes: 14 additions & 26 deletions config.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,7 @@ set $right l
# Your preferred terminal emulator
set $term foot
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu dmenu_path | wmenu | xargs swaymsg exec --

### Appearance
# window corner radius in px
corner_radius 10

# Window background blur
blur off
blur_xray off
blur_passes 2
blur_radius 5

shadows off
shadows_on_csd off
shadow_blur_radius 20
shadow_color #0000007F

# inactive window fade amount. 0.0 = no dimming, 1.0 = fully dimmed
default_dim_inactive 0.0
dim_inactive_colors.unfocused #000000FF
dim_inactive_colors.urgent #900000FF

# Move minimized windows into Scratchpad (enable|disable)
scratchpad_minimize disable
set $menu wmenu-run

### Output configuration
#
Expand Down Expand Up @@ -218,6 +193,19 @@ mode "resize" {
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim

#
# Status Bar:
Expand Down
20 changes: 0 additions & 20 deletions include/background-image.h

This file was deleted.

16 changes: 9 additions & 7 deletions include/sway/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ struct cmd_handler {
* Indicates the result of a command's execution.
*/
enum cmd_status {
CMD_SUCCESS, /**< The command was successful */
CMD_SUCCESS, /**< The command was successful */
CMD_FAILURE, /**< The command resulted in an error */
CMD_INVALID, /**< Unknown command or parser error */
CMD_INVALID, /**< Unknown command or parser error */
CMD_DEFER, /**< Command execution deferred */
CMD_BLOCK,
CMD_BLOCK_COMMANDS,
Expand Down Expand Up @@ -97,7 +97,6 @@ void container_resize_tiled(struct sway_container *parent, uint32_t axis,

struct sway_container *container_find_resize_parent(struct sway_container *con,
uint32_t edge);

/**
* Effect handlers value parsers
*/
Expand All @@ -109,6 +108,7 @@ bool cmd_corner_radius_parse_value(char *arg, int* result);
sway_cmd cmd_exec_validate;
sway_cmd cmd_exec_process;

sway_cmd cmd_allow_tearing;
sway_cmd cmd_assign;
sway_cmd cmd_bar;
sway_cmd cmd_bindcode;
Expand Down Expand Up @@ -175,11 +175,10 @@ sway_cmd cmd_max_render_time;
sway_cmd cmd_mode;
sway_cmd cmd_mouse_warping;
sway_cmd cmd_move;
sway_cmd cmd_nop;
sway_cmd cmd_opacity;
sway_cmd cmd_saturation;
sway_cmd cmd_new_float;
sway_cmd cmd_new_window;
sway_cmd cmd_nop;
sway_cmd cmd_opacity;
sway_cmd cmd_no_focus;
sway_cmd cmd_output;
sway_cmd cmd_permit;
Expand All @@ -193,13 +192,13 @@ sway_cmd cmd_scratchpad;
sway_cmd cmd_scratchpad_minimize;
sway_cmd cmd_seamless_mouse;
sway_cmd cmd_set;
sway_cmd cmd_shortcuts_inhibitor;
sway_cmd cmd_shadow_blur_radius;
sway_cmd cmd_shadow_color;
sway_cmd cmd_shadow_offset;
sway_cmd cmd_shadow_inactive_color;
sway_cmd cmd_shadows;
sway_cmd cmd_shadows_on_csd;
sway_cmd cmd_shortcuts_inhibitor;
sway_cmd cmd_show_marks;
sway_cmd cmd_smart_borders;
sway_cmd cmd_smart_corner_radius;
Expand Down Expand Up @@ -278,6 +277,7 @@ sway_cmd input_cmd_seat;
sway_cmd input_cmd_accel_profile;
sway_cmd input_cmd_calibration_matrix;
sway_cmd input_cmd_click_method;
sway_cmd input_cmd_clickfinger_button_map;
sway_cmd input_cmd_drag;
sway_cmd input_cmd_drag_lock;
sway_cmd input_cmd_dwt;
Expand Down Expand Up @@ -311,7 +311,9 @@ sway_cmd input_cmd_xkb_switch_layout;
sway_cmd input_cmd_xkb_variant;

sway_cmd output_cmd_adaptive_sync;
sway_cmd output_cmd_allow_tearing;
sway_cmd output_cmd_background;
sway_cmd output_cmd_color_profile;
sway_cmd output_cmd_disable;
sway_cmd output_cmd_dpms;
sway_cmd output_cmd_enable;
Expand Down
48 changes: 26 additions & 22 deletions include/sway/config.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#ifndef _SWAY_CONFIG_H
#define _SWAY_CONFIG_H
#include <libinput.h>
#include <scenefx/types/fx/blur_data.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <wlr/interfaces/wlr_switch.h>
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/util/box.h>
#include <wlr/render/color.h>
#include <xkbcommon/xkbcommon.h>
#include <xf86drmMode.h>
#include "../include/config.h"
Expand All @@ -15,7 +17,6 @@
#include "stringop.h"
#include "swaynag.h"
#include "tree/container.h"
#include "scenefx/types/fx/blur_data.h"
#include "sway/input/tablet.h"
#include "sway/tree/root.h"
#include "wlr-layer-shell-unstable-v1-protocol.h"
Expand Down Expand Up @@ -149,6 +150,7 @@ struct input_config {
int accel_profile;
struct calibration_matrix calibration_matrix;
int click_method;
int clickfinger_button_map;
int drag;
int drag_lock;
int dwt;
Expand Down Expand Up @@ -261,6 +263,7 @@ enum scale_filter_mode {

enum render_bit_depth {
RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8
RENDER_BIT_DEPTH_6,
RENDER_BIT_DEPTH_8,
RENDER_BIT_DEPTH_10,
};
Expand All @@ -286,6 +289,9 @@ struct output_config {
int max_render_time; // In milliseconds
int adaptive_sync;
enum render_bit_depth render_bit_depth;
bool set_color_transform;
struct wlr_color_transform *color_transform;
int allow_tearing;

char *background;
char *background_option;
Expand Down Expand Up @@ -487,17 +493,17 @@ struct sway_config {
float urgent[4];
} dim_inactive_colors;

bool blur_enabled;
bool blur_xray;
struct blur_data blur_data;

bool shadow_enabled;
bool shadows_on_csd_enabled;
int shadow_blur_sigma;
float shadow_color[4];
float shadow_inactive_color[4];
float shadow_offset_x, shadow_offset_y;

bool blur_enabled;
bool blur_xray;
struct blur_data blur_params;

bool titlebar_separator;
bool scratchpad_minimize;

Expand Down Expand Up @@ -706,22 +712,28 @@ const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filt

struct output_config *new_output_config(const char *name);

void merge_output_config(struct output_config *dst, struct output_config *src);
bool apply_output_configs(struct output_config **ocs, size_t ocs_len,
bool test_only, bool degrade_to_off);

bool apply_output_config(struct output_config *oc, struct sway_output *output);
void apply_stored_output_configs(void);

bool test_output_config(struct output_config *oc, struct sway_output *output);

struct output_config *store_output_config(struct output_config *oc);
/**
* store_output_config stores a new output config. An output may be matched by
* three different config types, in order of precedence: Identifier, name and
* wildcard. When storing a config type of lower precedence, assume that the
* user wants the config to take immediate effect by superseding (clearing) the
* same values from higher presedence configuration.
*/
void store_output_config(struct output_config *oc);

struct output_config *find_output_config(struct sway_output *output);

void apply_output_config_to_outputs(struct output_config *oc);

void reset_outputs(void);

void free_output_config(struct output_config *oc);

void request_modeset(void);
void force_modeset(void);
bool modeset_is_pending(void);

bool spawn_swaybg(void);

int workspace_output_cmp_workspace(const void *a, const void *b);
Expand Down Expand Up @@ -765,14 +777,6 @@ void translate_keysyms(struct input_config *input_config);

void binding_add_translated(struct sway_binding *binding, list_t *bindings);

int config_get_blur_size();

bool config_should_parameters_blur();

bool config_should_parameters_blur_effects();

bool config_should_parameters_shadow();

/* Global config singleton. */
extern struct sway_config *config;

Expand Down
Loading