|
howm
howm
|
The glue that holds howm together. This file houses the main event loop as well as setup and cleanup. More...
#include <errno.h>#include <getopt.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <sys/select.h>#include <sys/socket.h>#include <unistd.h>#include <xcb/xcb.h>#include <xcb/randr.h>#include <xcb/xcb_ewmh.h>#include "handler.h"#include "helper.h"#include "howm.h"#include "ipc.h"#include "monitor.h"#include "scratchpad.h"#include "xcb_help.h"#include "workspace.h"Functions | |
| static void | setup (void) |
| Occurs when howm first starts. More... | |
| static void | cleanup (void) |
| Cleanup howm's resources. More... | |
| static void | exec_config (char *conf_path) |
| Execute the script located at conf_path in order to configure howm. More... | |
| int | main (int argc, char *argv[]) |
| The code that glues howm together... More... | |
| void | howm_info (void) |
| Print debug information about the current state of howm. More... | |
| uint32_t | get_colour (char *colour) |
| Converts a hexcode colour into an X11 colourmap pixel. More... | |
| void | quit (const int exit_status) |
| Quit howm and set the return value. More... | |
| void | spawn (char *cmd[]) |
| Spawns a command. More... | |
Variables | |
| struct config | conf |
| bool | running = true |
| xcb_connection_t * | dpy = NULL |
| xcb_screen_t * | screen = NULL |
| xcb_ewmh_connection_t * | ewmh = NULL |
| const char * | WM_ATOM_NAMES [] = { "WM_DELETE_WINDOW", "WM_PROTOCOLS" } |
| xcb_atom_t | wm_atoms [LENGTH(WM_ATOM_NAMES)] |
| int | retval = EXIT_FAILURE |
| uint32_t | border_focus = 0 |
| uint32_t | border_unfocus = 0 |
| uint32_t | border_prev_focus = 0 |
| uint32_t | border_urgent = 0 |
| uint16_t | screen_height = 0 |
| uint16_t | screen_width = 0 |
| int | cur_state = OPERATOR_STATE |
| unsigned int | mon_cnt = 0 |
| unsigned int | workspace_cnt |
| monitor_t * | mon = NULL |
| monitor_t * | mon_head = NULL |
| monitor_t * | mon_tail = NULL |
The glue that holds howm together. This file houses the main event loop as well as setup and cleanup.
|
static |
Cleanup howm's resources.
Delete all of the windows that have been created, remove button grabs and remove pointer focus.
|
static |
Execute the script located at conf_path in order to configure howm.
| conf_path | The file path to the config file. |
| uint32_t get_colour | ( | char * | colour | ) |
Converts a hexcode colour into an X11 colourmap pixel.
| colour | A string of the format "#RRGGBB", that will be interpreted as a colour code. |
| void howm_info | ( | void | ) |
Print debug information about the current state of howm.
This can be parsed by programs such as scripts that will pipe their input into a status bar.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
The code that glues howm together...
|
static |
Occurs when howm first starts.
Workspaces are initialised, screen size is determined and atoms are then grabbed.
Atoms are gathered.
| uint32_t border_focus = 0 |
| uint32_t border_prev_focus = 0 |
| uint32_t border_unfocus = 0 |
| uint32_t border_urgent = 0 |
| struct config conf |
| int cur_state = OPERATOR_STATE |
| xcb_connection_t* dpy = NULL |
| xcb_ewmh_connection_t* ewmh = NULL |
| monitor_t* mon = NULL |
| unsigned int mon_cnt = 0 |
| monitor_t* mon_head = NULL |
| monitor_t* mon_tail = NULL |
| int retval = EXIT_FAILURE |
| bool running = true |
| xcb_screen_t* screen = NULL |
| uint16_t screen_height = 0 |
| uint16_t screen_width = 0 |
| const char* WM_ATOM_NAMES[] = { "WM_DELETE_WINDOW", "WM_PROTOCOLS" } |
| xcb_atom_t wm_atoms[LENGTH(WM_ATOM_NAMES)] |
| unsigned int workspace_cnt |