mirror of
https://github.com/swaywm/sway.git
synced 2024-11-18 05:59:15 +00:00
ad4d21d60b
If these aren't defined in config, color settings without 'focused_' prefix are used as a fallback.
66 lines
1 KiB
C
66 lines
1 KiB
C
#ifndef _SWAYBAR_BAR_H
|
|
#define _SWAYBAR_BAR_H
|
|
|
|
#include "client/registry.h"
|
|
#include "client/window.h"
|
|
#include "list.h"
|
|
|
|
struct bar {
|
|
struct config *config;
|
|
struct status_line *status;
|
|
list_t *outputs;
|
|
struct output *focused_output;
|
|
|
|
int ipc_event_socketfd;
|
|
int ipc_socketfd;
|
|
int status_read_fd;
|
|
pid_t status_command_pid;
|
|
};
|
|
|
|
struct output {
|
|
struct window *window;
|
|
struct registry *registry;
|
|
list_t *workspaces;
|
|
char *name;
|
|
int idx;
|
|
bool focused;
|
|
};
|
|
|
|
struct workspace {
|
|
int num;
|
|
char *name;
|
|
bool focused;
|
|
bool visible;
|
|
bool urgent;
|
|
};
|
|
|
|
/** Global bar state */
|
|
extern struct bar swaybar;
|
|
|
|
/**
|
|
* Setup bar.
|
|
*/
|
|
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.
|
|
*/
|
|
void bar_run(struct bar *bar);
|
|
|
|
/**
|
|
* free workspace list.
|
|
*/
|
|
void free_workspaces(list_t *workspaces);
|
|
|
|
/**
|
|
* Teardown bar.
|
|
*/
|
|
void bar_teardown(struct bar *bar);
|
|
|
|
#endif /* _SWAYBAR_BAR_H */
|