howm
howm
howm.h
Go to the documentation of this file.
1 #ifndef HOWM_H
2 #define HOWM_H
3 
4 #include <stdbool.h>
5 #include <stdint.h>
6 #include <xcb/xcb.h>
7 #include <xcb/xcb_ewmh.h>
8 #include <xcb/xproto.h>
9 
10 #include "layout.h"
11 #include "types.h"
12 
13 #define VERSION "0.5.1"
14 #define WM_NAME "howm"
15 #define CONF_NAME "howmrc"
16 #define HOWM_PATH "/usr/bin/howm"
17 #define ENV_SOCK_VAR "HOWM_SOCK"
18 #define DEF_SOCK_PATH "/tmp/howm"
19 #define IPC_BUF_SIZE 1024
20 
21 #define WS_DEF_LAYOUT HSTACK
22 #define MASTER_RATIO 0.6
23 #define DEF_BORDER_FOCUS "#FFFFFF"
24 #define DEF_BORDER_UNFOCUS "#333333"
25 #define DEF_BORDER_PREV_FOCUS "#444444"
26 #define DEF_BORDER_URGENT "#FF0000"
27 #define GAP 0
28 
39 struct config {
43  uint16_t border_px;
44  uint32_t border_focus;
45  uint32_t border_unfocus;
47  uint32_t border_urgent;
48  bool bar_bottom;
49  uint16_t bar_height;
50  uint16_t op_gap_size;
52  bool zoom_gap;
55  unsigned int delete_register_size;
57  uint16_t scratchpad_width;
58 };
59 
61 
62 extern int retval;
63 extern xcb_connection_t *dpy;
64 extern uint16_t screen_height;
65 extern uint16_t screen_width;
66 extern int cur_state;
67 extern unsigned int mon_cnt;
68 
69 extern monitor_t *mon;
70 extern monitor_t *mon_head;
71 extern monitor_t *mon_tail;
72 extern unsigned int workspace_cnt;
73 
74 extern xcb_screen_t *screen;
75 extern xcb_ewmh_connection_t *ewmh;
76 extern bool running;
77 
78 extern struct config conf;
79 
80 extern const char *WM_ATOM_NAMES[];
81 extern xcb_atom_t wm_atoms[];
82 
83 void howm_info(void);
84 uint32_t get_colour(char *colour);
85 void quit(const int exit_status);
86 void spawn(char *cmd[]);
87 
88 #endif
xcb_ewmh_connection_t * ewmh
Definition: howm.c:69
int cur_state
Definition: howm.c:80
howm
Definition: howm.h:39
states
Definition: howm.h:60
uint16_t float_spawn_height
Definition: howm.h:54
monitor_t * mon_head
Definition: howm.c:85
uint16_t op_gap_size
Definition: howm.h:50
unsigned int workspace_cnt
Definition: howm.c:82
uint32_t border_prev_focus
Definition: howm.h:46
xcb_connection_t * dpy
Definition: howm.c:67
void howm_info(void)
Print debug information about the current state of howm.
Definition: howm.c:228
uint16_t border_px
Definition: howm.h:43
void spawn(char *cmd[])
Spawns a command.
Definition: howm.c:334
uint32_t border_unfocus
Definition: howm.h:45
Definition: howm.h:60
const char * WM_ATOM_NAMES[]
Definition: howm.c:70
uint16_t bar_height
Definition: howm.h:49
Definition: howm.h:60
Definition: howm.h:60
Definition: howm.h:60
uint16_t scratchpad_width
Definition: howm.h:57
uint32_t border_focus
Definition: howm.h:44
uint16_t scratchpad_height
Definition: howm.h:56
unsigned int mon_cnt
Definition: howm.c:81
void quit(const int exit_status)
Quit howm and set the return value.
Definition: howm.c:322
monitor_t * mon_tail
Definition: howm.c:86
bool follow_move
Definition: howm.h:42
bool focus_mouse
Definition: howm.h:40
uint32_t border_urgent
Definition: howm.h:47
bool focus_mouse_click
Definition: howm.h:41
uint16_t screen_width
Definition: howm.c:79
int retval
Definition: howm.c:73
monitor_t * mon
Definition: howm.c:84
uint32_t get_colour(char *colour)
Converts a hexcode colour into an X11 colourmap pixel.
Definition: howm.c:278
bool bar_bottom
Definition: howm.h:48
xcb_atom_t wm_atoms[]
Definition: howm.c:71
uint16_t float_spawn_width
Definition: howm.h:53
xcb_screen_t * screen
Definition: howm.c:68
unsigned int delete_register_size
Definition: howm.h:55
bool zoom_gap
Definition: howm.h:52
bool center_floating
Definition: howm.h:51
uint16_t screen_height
Definition: howm.c:78
Definition: types.h:73
bool running
Definition: howm.c:66