mirror of
https://github.com/swaywm/sway.git
synced 2026-05-25 21:38:49 -04:00
i3-compat: swaybar: default to first bar-id
When launching swaybar from the command line without a --bar-id flag, default to the first configured bar. This is a mirror of i3 PR https://github.com/i3/i3/pull/4231. This makes it easier to call swaybar from the command line since the majority of swaybar users have only one bar configured.
This commit is contained in:
parent
9c663b1fa1
commit
e52c14d535
2 changed files with 22 additions and 6 deletions
|
|
@ -72,12 +72,6 @@ int main(int argc, char **argv) {
|
|||
sway_log_init(SWAY_INFO, NULL);
|
||||
}
|
||||
|
||||
if (!swaybar.id) {
|
||||
sway_log(SWAY_ERROR, "No bar_id passed. "
|
||||
"Provide --bar_id or let sway start swaybar");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!socket_path) {
|
||||
socket_path = get_socketpath();
|
||||
if (!socket_path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue