commit
afb6968874
@ -1,6 +1,7 @@
|
|||||||
option('sway_version', type : 'string', description: 'The version string reported in `sway --version`.')
|
option('sway-version', type : 'string', description: 'The version string reported in `sway --version`.')
|
||||||
option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.')
|
option('ld-library-path', type: 'string', value: '', description: 'The LD_LIBRARY_PATH environment variable.')
|
||||||
option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')
|
option('default-wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.')
|
||||||
option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
|
option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')
|
||||||
option('fish_completions', type: 'boolean', value: true, description: 'Install fish shell completions.')
|
option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
|
||||||
|
option('fish-completions', type: 'boolean', value: true, description: 'Install fish shell completions.')
|
||||||
option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications')
|
option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications')
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
#include "sway/commands.h"
|
||||||
|
|
||||||
|
struct cmd_results *cmd_focus_on_window_activation(int argc, char **argv) {
|
||||||
|
struct cmd_results *error = NULL;
|
||||||
|
if ((error = checkarg(argc, "focus_on_window_activation",
|
||||||
|
EXPECTED_EQUAL_TO, 1))) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(argv[0], "smart") == 0) {
|
||||||
|
config->focus_on_window_activation = FOWA_SMART;
|
||||||
|
} else if (strcmp(argv[0], "urgent") == 0) {
|
||||||
|
config->focus_on_window_activation = FOWA_URGENT;
|
||||||
|
} else if (strcmp(argv[0], "focus") == 0) {
|
||||||
|
config->focus_on_window_activation = FOWA_FOCUS;
|
||||||
|
} else if (strcmp(argv[0], "none") == 0) {
|
||||||
|
config->focus_on_window_activation = FOWA_NONE;
|
||||||
|
} else {
|
||||||
|
return cmd_results_new(CMD_INVALID, "focus_on_window_activation",
|
||||||
|
"Expected "
|
||||||
|
"'focus_on_window_activation smart|urgent|focus|none'");
|
||||||
|
}
|
||||||
|
|
||||||
|
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||||
|
}
|
Loading…
Reference in new issue