aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Denis Doria <denisdoria@gmail.com>2016-06-05 07:49:33 +0200
committerLibravatar Denis Doria <denisdoria@gmail.com>2016-06-05 07:49:33 +0200
commit3c3e98b1a3beda5f17f689bfad64dde3bc0bf6ac (patch)
treeb262bccd3d262d7ff144c26b7c8bb3a2f951c396
parentPut w to uppercase just to keep consistency between warnings (diff)
parentMerge pull request #696 from zandrmartin/numpad-enter-swaylock-fix (diff)
downloadsway-3c3e98b1a3beda5f17f689bfad64dde3bc0bf6ac.tar.gz
sway-3c3e98b1a3beda5f17f689bfad64dde3bc0bf6ac.tar.zst
sway-3c3e98b1a3beda5f17f689bfad64dde3bc0bf6ac.zip
Merge branch 'master' into variables_corner_cases
-rw-r--r--sway/commands.c6
-rw-r--r--sway/sway-bar.5.txt2
-rw-r--r--sway/sway.5.txt50
-rw-r--r--swaylock/main.c5
4 files changed, 56 insertions, 7 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 90a7d421..eab4a1c1 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -427,7 +427,7 @@ static struct cmd_results *cmd_border(int argc, char **argv) {
427static struct cmd_results *parse_border_color(struct border_colors *border_colors, const char *cmd_name, int argc, char **argv) { 427static struct cmd_results *parse_border_color(struct border_colors *border_colors, const char *cmd_name, int argc, char **argv) {
428 struct cmd_results *error = NULL; 428 struct cmd_results *error = NULL;
429 if (argc != 5) { 429 if (argc != 5) {
430 return cmd_results_new(CMD_INVALID, cmd_name, "Requires exact 5 color values"); 430 return cmd_results_new(CMD_INVALID, cmd_name, "Requires exactly five color values");
431 } 431 }
432 432
433 uint32_t colors[5]; 433 uint32_t colors[5];
@@ -476,7 +476,7 @@ static struct cmd_results *cmd_client_background(int argc, char **argv) {
476 uint32_t background; 476 uint32_t background;
477 477
478 if (argc != 1) { 478 if (argc != 1) {
479 return cmd_results_new(CMD_INVALID, "client.background", "Expect exact 1 value"); 479 return cmd_results_new(CMD_INVALID, "client.background", "Requires exactly one color value");
480 } 480 }
481 481
482 error = add_color("client.background", buffer, argv[0]); 482 error = add_color("client.background", buffer, argv[0]);
@@ -737,7 +737,7 @@ static struct cmd_results *cmd_floating_minimum_size(int argc, char **argv) {
737 737
738 } 738 }
739 739
740 sway_log(L_DEBUG, "New floating_minimum_size: '%d' x '%d'", config->floating_minimum_width, 740 sway_log(L_DEBUG, "New floating_minimum_size: '%d' x '%d'", config->floating_minimum_width,
741 config->floating_minimum_height); 741 config->floating_minimum_height);
742 742
743 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 743 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
diff --git a/sway/sway-bar.5.txt b/sway/sway-bar.5.txt
index 322dc32b..d0727440 100644
--- a/sway/sway-bar.5.txt
+++ b/sway/sway-bar.5.txt
@@ -61,7 +61,7 @@ Colors
61------ 61------
62 62
63Colors are defined within a _colors { }_ block inside a _bar { }_ block. Colors 63Colors are defined within a _colors { }_ block inside a _bar { }_ block. Colors
64must be defined in hex. E.g. _#fff000_ or _#fff000ff_ when including the alpha 64must be defined in hex. i.e. _#rrggbb_ or _#rrggbbaa_ when including the alpha
65channel. 65channel.
66 66
67**background** <color>:: 67**background** <color>::
diff --git a/sway/sway.5.txt b/sway/sway.5.txt
index 8faa5345..ffa181f7 100644
--- a/sway/sway.5.txt
+++ b/sway/sway.5.txt
@@ -100,7 +100,7 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
100 100
101**layout** <mode>:: 101**layout** <mode>::
102 Sets the layout mode of the focused container. _mode_ can be one of _splith_, 102 Sets the layout mode of the focused container. _mode_ can be one of _splith_,
103 _splitv_, or _toggle split_. 103 _splitv_, _toggle split_, _stacking_ or _tabbed_.
104 104
105**move** <left|right|up|down>:: 105**move** <left|right|up|down>::
106 Moves the focused container _left_, _right_, _up_, or _down_. 106 Moves the focused container _left_, _right_, _up_, or _down_.
@@ -150,6 +150,54 @@ or triggered at runtime.
150 **bindcode** <code> <command> is also available for binding with key codes 150 **bindcode** <code> <command> is also available for binding with key codes
151 instead of key names. 151 instead of key names.
152 152
153**client**.<color_class> <border> <background> <text> <indicator> <child_border>::
154 The client commands control the colors of the view borders and title bars. All
155 of the client commands _require_ five color values. (The one exception is
156 **client.background** which _requires_ one color value.) If you only want to
157 specify a subset, supply default colors for all the others. Colors must be
158 defined in hex. i.e. _#rrggbb_ or _#rrggbbaa_ when including the alpha
159 channel.
160 +
161 The command tokens are:
162 **color_class**::: Specifies the view to which the colors apply.
163 **client.background**:::: The color a view will be painted, underneath the
164 client itself. This will only be visible if a client does not fully
165 cover its allocated view space. This command only requires one color. _Note_:
166 This is not currently implemented.
167 **client.focused**:::: The view that has focus.
168 **client.focused_inactive**:::: A view that has focus within its
169 container, but the container is not focused.
170 **client.placeholder**:::: Used when drawing placeholder view contents.
171 Only background and text colors are used. _Note_: This is not
172 currently implemented.
173 **client.unfocused**:::: A view that does not have focus.
174 **client.urgent**:::: A view with an urgency hint. _Note_: This is not
175 currently implemented.
176 **border**::: The border around the title bar.
177 **background**::: The background of the title bar.
178 **text**::: The text color of the title bar.
179 **indicator**::: The color used to indicate where a new view will open. In a
180 tiled container, this would paint the right border of the current view if
181 a new view would be opened to the right. _Note_: This is not currently
182 implemented.
183 **child_border**::: The border around the view itself.
184
185+
186The default colors are:
187+
188--
189[options="header"]
190|===========================================================================
191|color_class |border |background |text |indicator |child_border
192|background |n/a |#ffffffff |n/a |n/a |n/a
193|focused |#4c7899ff |#285577ff |#ffffffff |#2e9ef4ff |#285577ff
194|focused_inactive |#333333ff |#5f676aff |#ffffffff |#484e50ff |#5f676aff
195|unfocused |#333333ff |#222222ff |#888888ff |#292d2eff |#222222ff
196|urgent |#2f343aff |#900000ff |#ffffffff |#900000ff |#900000ff
197|placeholder |#000000ff |#0c0c0cff |#ffffffff |#000000ff |#0c0c0cff
198|===========================================================================
199--
200
153**debuglog** <on|off|toggle>:: 201**debuglog** <on|off|toggle>::
154 Enables, disables or toggles logging for debug. The toggle argument cannot 202 Enables, disables or toggles logging for debug. The toggle argument cannot
155 be used in the configuration file. 203 be used in the configuration file.
diff --git a/swaylock/main.c b/swaylock/main.c
index 2c69f7fd..b5ce63ef 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -119,6 +119,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
119 119
120 if (state == WL_KEYBOARD_KEY_STATE_PRESSED) { 120 if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
121 switch (sym) { 121 switch (sym) {
122 case XKB_KEY_KP_Enter: // fallthrough
122 case XKB_KEY_Return: 123 case XKB_KEY_Return:
123 render_data.auth_state = AUTH_STATE_VALIDATING; 124 render_data.auth_state = AUTH_STATE_VALIDATING;
124 125
@@ -159,7 +160,7 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
159 case XKB_KEY_Super_L: // fallthrough 160 case XKB_KEY_Super_L: // fallthrough
160 case XKB_KEY_Super_R: // fallthrough 161 case XKB_KEY_Super_R: // fallthrough
161 case XKB_KEY_Hyper_L: // fallthrough 162 case XKB_KEY_Hyper_L: // fallthrough
162 case XKB_KEY_Hyper_R: // fallthrough 163 case XKB_KEY_Hyper_R:
163 { 164 {
164 // don't draw screen on modifier keys 165 // don't draw screen on modifier keys
165 break; 166 break;
@@ -360,7 +361,7 @@ int main(int argc, char **argv) {
360 { 361 {
361 int colorlen = strlen(optarg); 362 int colorlen = strlen(optarg);
362 if (colorlen < 6 || colorlen == 7 || colorlen > 8) { 363 if (colorlen < 6 || colorlen == 7 || colorlen > 8) {
363 sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, e.g. ff0000 or ff0000ff"); 364 sway_log(L_ERROR, "color must be specified in 3 or 4 byte format, i.e. rrggbb or rrggbbaa");
364 exit(EXIT_FAILURE); 365 exit(EXIT_FAILURE);
365 } 366 }
366 render_data.color = strtol(optarg, NULL, 16); 367 render_data.color = strtol(optarg, NULL, 16);