mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
Make single bar handle multiple outputs
This commit is contained in:
parent
e19e32cf81
commit
6d57f03028
7 changed files with 160 additions and 71 deletions
|
|
@ -8,8 +8,7 @@
|
|||
struct bar {
|
||||
struct config *config;
|
||||
struct status_line *status;
|
||||
struct output *output;
|
||||
/* list_t *outputs; */
|
||||
list_t *outputs;
|
||||
|
||||
int ipc_event_socketfd;
|
||||
int ipc_socketfd;
|
||||
|
|
@ -22,6 +21,7 @@ struct output {
|
|||
struct registry *registry;
|
||||
list_t *workspaces;
|
||||
char *name;
|
||||
int idx;
|
||||
};
|
||||
|
||||
struct workspace {
|
||||
|
|
@ -35,7 +35,12 @@ struct workspace {
|
|||
/**
|
||||
* Setup bar.
|
||||
*/
|
||||
void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output);
|
||||
void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id);
|
||||
|
||||
/**
|
||||
* Create new output struct from name.
|
||||
*/
|
||||
struct output *new_output(const char *name);
|
||||
|
||||
/**
|
||||
* Bar mainloop.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
/**
|
||||
* Colors for a box with background, border and text colors.
|
||||
*/
|
||||
|
|
@ -25,6 +27,7 @@ struct config {
|
|||
bool strip_workspace_numbers;
|
||||
bool binding_mode_indicator;
|
||||
bool workspace_buttons;
|
||||
list_t *outputs;
|
||||
|
||||
int height;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/**
|
||||
* Initialize ipc connection to sway and get sway state, outputs, bar_config.
|
||||
*/
|
||||
void ipc_bar_init(struct bar *bar, int outputi, const char *bar_id);
|
||||
void ipc_bar_init(struct bar *bar, const char *bar_id);
|
||||
|
||||
/**
|
||||
* Handle ipc event from sway.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue