mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-08-27 18:03:48 -07:00
docs: update
This commit is contained in:
40
sowm.c
40
sowm.c
@@ -35,16 +35,16 @@ struct client{
|
|||||||
typedef struct ws ws;
|
typedef struct ws ws;
|
||||||
struct ws{client *list;};
|
struct ws{client *list;};
|
||||||
|
|
||||||
|
static void button_press(XEvent *e);
|
||||||
|
static void button_release();
|
||||||
|
static void configure_request(XEvent *e);
|
||||||
|
static void key_grab();
|
||||||
|
static void key_press(XEvent *e);
|
||||||
|
static void map_request(XEvent *e);
|
||||||
static void notify_destroy(XEvent *e);
|
static void notify_destroy(XEvent *e);
|
||||||
static void notify_enter(XEvent *e);
|
static void notify_enter(XEvent *e);
|
||||||
static void notify_motion(XEvent *e);
|
static void notify_motion(XEvent *e);
|
||||||
|
static void run(const Arg arg);
|
||||||
static void key_grab();
|
|
||||||
static void key_press(XEvent *e);
|
|
||||||
|
|
||||||
static void button_press(XEvent *e);
|
|
||||||
static void button_release();
|
|
||||||
|
|
||||||
static void win_add(Window w);
|
static void win_add(Window w);
|
||||||
static void win_center(Window w);
|
static void win_center(Window w);
|
||||||
static void win_center_current();
|
static void win_center_current();
|
||||||
@@ -54,23 +54,16 @@ static void win_fs_current();
|
|||||||
static void win_kill();
|
static void win_kill();
|
||||||
static void win_next();
|
static void win_next();
|
||||||
static void win_to_ws(const Arg arg);
|
static void win_to_ws(const Arg arg);
|
||||||
|
|
||||||
static void ws_go(const Arg arg);
|
static void ws_go(const Arg arg);
|
||||||
static void ws_save(int i);
|
static void ws_save(int i);
|
||||||
static void ws_sel(int i);
|
static void ws_sel(int i);
|
||||||
|
|
||||||
static void configure_request(XEvent *e);
|
static client *list = { 0 };
|
||||||
static void map_request(XEvent *e);
|
static ws ws_list[10];
|
||||||
static void run(const Arg arg);
|
static int desk = 1, sh, sw, s, j;
|
||||||
|
|
||||||
static client *list = { 0 };
|
|
||||||
static ws ws_list[10];
|
|
||||||
|
|
||||||
static int desk = 1, sh, sw, s, j;
|
|
||||||
|
|
||||||
static Display *dis;
|
|
||||||
static Window root, cur;
|
|
||||||
|
|
||||||
|
static Display *dis;
|
||||||
|
static Window root, cur;
|
||||||
static XButtonEvent start;
|
static XButtonEvent start;
|
||||||
static XWindowAttributes attr;
|
static XWindowAttributes attr;
|
||||||
|
|
||||||
@@ -212,10 +205,8 @@ void win_kill() {
|
|||||||
void win_center(Window w) {
|
void win_center(Window w) {
|
||||||
XGetWindowAttributes(dis, w, &attr);
|
XGetWindowAttributes(dis, w, &attr);
|
||||||
|
|
||||||
int x = (sw / 2) - (attr.width / 2);
|
XMoveWindow(dis, w, sw / 2 - attr.width / 2,
|
||||||
int y = (sh / 2) - (attr.height / 2);
|
sh / 2 - attr.height / 2);
|
||||||
|
|
||||||
XMoveWindow(dis, w, x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void win_fs(Window w) {
|
void win_fs(Window w) {
|
||||||
@@ -355,8 +346,7 @@ int main(void) {
|
|||||||
for (int i=0; i < sizeof(ws_list)/sizeof(*ws_list); ++i)
|
for (int i=0; i < sizeof(ws_list)/sizeof(*ws_list); ++i)
|
||||||
ws_list[i].list = 0;
|
ws_list[i].list = 0;
|
||||||
|
|
||||||
const Arg arg = {.i = 1};
|
ws_go((Arg){.i = 1});
|
||||||
ws_go(arg);
|
|
||||||
|
|
||||||
XSelectInput(dis, root, SubstructureNotifyMask|
|
XSelectInput(dis, root, SubstructureNotifyMask|
|
||||||
SubstructureRedirectMask|EnterWindowMask|LeaveWindowMask);
|
SubstructureRedirectMask|EnterWindowMask|LeaveWindowMask);
|
||||||
|
Reference in New Issue
Block a user