mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
swaybar: feactor render, statusline
This commit is contained in:
parent
bb986cb336
commit
a6349a2444
8 changed files with 968 additions and 840 deletions
43
swaybar/state.h
Normal file
43
swaybar/state.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef _SWAYBAR_STATE_H
|
||||
#define _SWAYBAR_STATE_H
|
||||
|
||||
#include "client/registry.h"
|
||||
#include "client/window.h"
|
||||
|
||||
struct swaybar_state {
|
||||
struct swaybar_config *config;
|
||||
struct status_line *status;
|
||||
struct output *output;
|
||||
/* list_t *outputs; */
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
struct workspace {
|
||||
int num;
|
||||
char *name;
|
||||
bool focused;
|
||||
bool visible;
|
||||
bool urgent;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize state.
|
||||
*/
|
||||
struct swaybar_state *init_state();
|
||||
|
||||
/**
|
||||
* free workspace struct.
|
||||
*/
|
||||
void free_workspace(void *item);
|
||||
|
||||
#endif /* _SWAYBAR_STATE_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue