kbgwm

sucklessy floating window manager
git clone https://git.neuralcrash.com/kbgwm.git
Log | Files | Refs | README | LICENSE

kbgwm.h (2035B)


      1 /*
      2  * kbgwm, a sucklessy floating window manager
      3  * Copyright (c) 2020-2021, Kebigon <git@kebigon.xyz>
      4  *
      5  * Permission to use, copy, modify, and/or distribute this software for any
      6  * purpose with or without fee is hereby granted, provided that the above
      7  * copyright notice and this permission notice appear in all copies.
      8  *
      9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16  */
     17 
     18 #pragma once
     19 
     20 #include "client.h"
     21 #include "types.h"
     22 #include <stdbool.h>
     23 
     24 void start(const union Arg *arg);
     25 void mousemove(const union Arg *arg);
     26 void mouseresize(const union Arg *arg);
     27 
     28 void focus_apply();
     29 void focus_next(const union Arg *);
     30 void focus_unfocus();
     31 void quit(const union Arg *);
     32 void workspace_change(const union Arg *);
     33 void workspace_next(const union Arg *);
     34 void workspace_previous(const union Arg *);
     35 void workspace_send(const union Arg *);
     36 void workspace_set(uint_fast8_t);
     37 
     38 #define focused_client workspaces[current_workspace]
     39 
     40 extern bool running;
     41 extern bool moving;
     42 extern bool resizing;
     43 extern xcb_connection_t *c;
     44 extern xcb_screen_t *screen;
     45 extern uint_least16_t previous_x;
     46 extern uint_least16_t previous_y;
     47 extern uint16_t numlockmask;
     48 extern xcb_atom_t wm_protocols;
     49 extern xcb_atom_t wm_delete_window;
     50 extern uint_fast8_t current_workspace;
     51 extern struct item *workspaces[];
     52 
     53 extern const struct Key keys[];
     54 extern const struct Button buttons[];
     55 
     56 extern const uint_least8_t keys_length;
     57 extern const uint_least8_t buttons_length;
     58 extern const uint_least8_t workspaces_length;
     59 extern const uint_least8_t border_width;
     60 extern const uint_least8_t border_width_x2;