1- Index: sway-regolith/include/sway/commands.h
2- ===================================================================
3- --- sway-regolith.orig/include/sway/commands.h
4- +++ sway-regolith/include/sway/commands.h
5- @@ -172,6 +172,7 @@ sway_cmd cmd_resize;
6- sway_cmd cmd_scratchpad;
7- sway_cmd cmd_seamless_mouse;
8- sway_cmd cmd_set;
9- + sway_cmd cmd_set_from_resource;
10- sway_cmd cmd_shortcuts_inhibitor;
11- sway_cmd cmd_show_marks;
12- sway_cmd cmd_smart_borders;
131Index: sway-regolith/meson.build
142===================================================================
153--- sway-regolith.orig/meson.build
@@ -19,85 +7,16 @@ Index: sway-regolith/meson.build
197- 'sway',
208+ 'sway-regolith',
219 'c',
22- version: '1.9 ',
10+ version: '1.10.1 ',
2311 license: 'MIT',
24- @@ -45,6 +45,27 @@ subproject(
25- version: wlroots_version,
26- )
27- wlroots = dependency('wlroots', version: wlroots_version)
28- + xkbcommon = dependency('xkbcommon')
29- + cairo = dependency('cairo')
30- + pango = dependency('pango')
31- + pangocairo = dependency('pangocairo')
32- + gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
33- + pixman = dependency('pixman-1')
34- + glesv2 = dependency('glesv2')
35- + libevdev = dependency('libevdev')
36- + libinput = dependency('libinput', version: '>=1.6.0')
37- + xcb = dependency('xcb', required: get_option('xwayland'))
38- + drm_full = dependency('libdrm') # only needed for drm_fourcc.h
39- + drm = drm_full.partial_dependency(compile_args: true, includes: true)
40- + libudev = dependency('libudev')
41- + bash_comp = dependency('bash-completion', required: false)
42- + fish_comp = dependency('fish', required: false)
43- + math = cc.find_library('m')
44- + rt = cc.find_library('rt')
45- + xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland'))
46- + threads = dependency('threads') # for pthread_setschedparam
12+ @@ -80,6 +80,7 @@ math = cc.find_library('m')
13+ rt = cc.find_library('rt')
14+ xcb_icccm = wlroots_features['xwayland'] ? dependency('xcb-icccm') : null_dep
15+ threads = dependency('threads') # for pthread_setschedparam
4716+ trawldb = dependency('trawldb-0')
48- +
49- wlroots_features = {
50- 'xwayland': false,
51- 'libinput_backend': false,
52- Index: sway-regolith/sway/commands.c
53- ===================================================================
54- --- sway-regolith.orig/sway/commands.c
55- +++ sway-regolith/sway/commands.c
56- @@ -84,6 +84,7 @@ static const struct cmd_handler handlers
57- { "popup_during_fullscreen", cmd_popup_during_fullscreen },
58- { "seat", cmd_seat },
59- { "set", cmd_set },
60- + { "set_from_resource", cmd_set_from_resource},
61- { "show_marks", cmd_show_marks },
62- { "smart_borders", cmd_smart_borders },
63- { "smart_gaps", cmd_smart_gaps },
64- @@ -279,8 +280,8 @@ list_t *execute_command(char *_exec, str
65- goto cleanup;
66- }
67-
68- - // Var replacement, for all but first argument of set
69- - for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
70- + // Var replacement, for all but first argument of set and xresource
71- + for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
72- argv[i] = do_var_replacement(argv[i]);
73- }
74-
75- @@ -392,7 +393,7 @@ struct cmd_results *config_command(char
76- }
77-
78- // Do variable replacement
79- - if (handler->handle == cmd_set && argc > 1 && *argv[1] == '$') {
80- + if ((handler->handle == cmd_set || handler->handle == cmd_set_from_resource )&& argc > 1 && *argv[1] == '$') {
81- // Escape the variable name so it does not get replaced by one shorter
82- char *temp = calloc(1, strlen(argv[1]) + 2);
83- temp[0] = '$';
84- @@ -407,7 +408,7 @@ struct cmd_results *config_command(char
85- free(command);
8617
87- // Strip quotes and unescape the string
88- - for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
89- + for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
90- if (handler->handle != cmd_exec && handler->handle != cmd_exec_always
91- && handler->handle != cmd_mode
92- && handler->handle != cmd_bindsym
93- @@ -415,6 +416,7 @@ struct cmd_results *config_command(char
94- && handler->handle != cmd_bindswitch
95- && handler->handle != cmd_bindgesture
96- && handler->handle != cmd_set
97- + && handler->handle != cmd_set_from_resource
98- && handler->handle != cmd_for_window
99- && (*argv[i] == '\"' || *argv[i] == '\'')) {
100- strip_quotes(argv[i]);
18+ if get_option('sd-bus-provider') == 'auto'
19+ if not get_option('tray').disabled()
10120Index: sway-regolith/sway/commands/set_from_resource.c
10221===================================================================
10322--- /dev/null
@@ -150,23 +69,84 @@ Index: sway-regolith/sway/commands/set_from_resource.c
15069+ free(resource_value);
15170+ return cmd_set(2, argv_new);
15271+ }
72+ Index: sway-regolith/include/sway/commands.h
73+ ===================================================================
74+ --- sway-regolith.orig/include/sway/commands.h
75+ +++ sway-regolith/include/sway/commands.h
76+ @@ -173,6 +173,7 @@ sway_cmd cmd_resize;
77+ sway_cmd cmd_scratchpad;
78+ sway_cmd cmd_seamless_mouse;
79+ sway_cmd cmd_set;
80+ + sway_cmd cmd_set_from_resource;
81+ sway_cmd cmd_shortcuts_inhibitor;
82+ sway_cmd cmd_show_marks;
83+ sway_cmd cmd_smart_borders;
84+ Index: sway-regolith/sway/commands.c
85+ ===================================================================
86+ --- sway-regolith.orig/sway/commands.c
87+ +++ sway-regolith/sway/commands.c
88+ @@ -83,6 +83,7 @@ static const struct cmd_handler handlers
89+ { "popup_during_fullscreen", cmd_popup_during_fullscreen },
90+ { "seat", cmd_seat },
91+ { "set", cmd_set },
92+ + { "set_from_resource", cmd_set_from_resource },
93+ { "show_marks", cmd_show_marks },
94+ { "smart_borders", cmd_smart_borders },
95+ { "smart_gaps", cmd_smart_gaps },
96+ @@ -279,8 +280,8 @@ list_t *execute_command(char *_exec, str
97+ goto cleanup;
98+ }
99+
100+ - // Var replacement, for all but first argument of set
101+ - for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
102+ + // Var replacement, for all but first argument of set and xresource
103+ + for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
104+ argv[i] = do_var_replacement(argv[i]);
105+ }
106+
107+ @@ -392,7 +393,7 @@ struct cmd_results *config_command(char
108+ }
109+
110+ // Do variable replacement
111+ - if (handler->handle == cmd_set && argc > 1 && *argv[1] == '$') {
112+ + if ((handler->handle == cmd_set || handler->handle == cmd_set_from_resource )&& argc > 1 && *argv[1] == '$') {
113+ // Escape the variable name so it does not get replaced by one shorter
114+ char *temp = calloc(1, strlen(argv[1]) + 2);
115+ temp[0] = '$';
116+ @@ -407,7 +408,7 @@ struct cmd_results *config_command(char
117+ free(command);
118+
119+ // Strip quotes and unescape the string
120+ - for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
121+ + for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
122+ if (handler->handle != cmd_exec && handler->handle != cmd_exec_always
123+ && handler->handle != cmd_mode
124+ && handler->handle != cmd_bindsym
125+ @@ -415,6 +416,7 @@ struct cmd_results *config_command(char
126+ && handler->handle != cmd_bindswitch
127+ && handler->handle != cmd_bindgesture
128+ && handler->handle != cmd_set
129+ + && handler->handle != cmd_set_from_resource
130+ && handler->handle != cmd_for_window
131+ && (*argv[i] == '\"' || *argv[i] == '\'')) {
132+ strip_quotes(argv[i]);
153133Index: sway-regolith/sway/meson.build
154134===================================================================
155135--- sway-regolith.orig/sway/meson.build
156136+++ sway-regolith/sway/meson.build
157- @@ -102 ,6 +102 ,7 @@ sway_sources = files(
137+ @@ -103 ,6 +103 ,7 @@ sway_sources = files(
158138 'commands/seat/shortcuts_inhibitor.c',
159139 'commands/seat/xcursor_theme.c',
160140 'commands/set.c',
161141+ 'commands/set_from_resource.c',
162142 'commands/show_marks.c',
163143 'commands/shortcuts_inhibitor.c',
164144 'commands/smart_borders.c',
165- @@ -230 ,6 +231 ,7 @@ sway_deps = [
145+ @@ -234 ,6 +235 ,7 @@ sway_deps = [
166146 xkbcommon,
167147 xcb,
168148 xcb_icccm,
169149+ trawldb,
170150 ]
171151
172- if have_xwayland
152+ if wlroots_features['xwayland']
0 commit comments