mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	commands/bar: fix mode and hidden_state at runtime
For compatibility with i3, `bar mode` and `bar hidden_state` do not require bar-ids (in the normal location) at runtime since they follow the alternative syntax: `bar mode|hidden_state <option> [<bar-id>]` This removes the incorrect error that the bar-id is missing for those two bar subcommands
This commit is contained in:
		
							parent
							
								
									08ec88692a
								
							
						
					
					
						commit
						00cffb8e20
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -80,7 +80,8 @@ struct cmd_results *cmd_bar(int argc, char **argv) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		config->current_bar = bar;
 | 
							config->current_bar = bar;
 | 
				
			||||||
		++argv; --argc;
 | 
							++argv; --argc;
 | 
				
			||||||
	} else if (!config->reading) {
 | 
						} else if (!config->reading && strcmp(argv[0], "mode") != 0 &&
 | 
				
			||||||
 | 
								strcmp(argv[0], "hidden_state") != 0) {
 | 
				
			||||||
		if (is_subcommand(argv[0])) {
 | 
							if (is_subcommand(argv[0])) {
 | 
				
			||||||
			return cmd_results_new(CMD_INVALID, "No bar defined.");
 | 
								return cmd_results_new(CMD_INVALID, "No bar defined.");
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue