diff options
author | uint23 <[email protected]> | 2025-04-25 23:08:02 +0100 |
---|---|---|
committer | uint23 <[email protected]> | 2025-04-25 23:08:02 +0100 |
commit | fd7b18b3c20bc4e2685cd0d6ac14d4b87ba89cf2 (patch) | |
tree | 9ff4e9a8c11c4302be94232a89664bb4085dfc67 | |
parent | c82d8ac61dbd323ee3ac5eb6e730c691927a14cc (diff) |
starting to add custom config
added config struct
added sxrc config file
~ master_width is now an int
-rw-r--r-- | defsxrc | 18 | ||||
-rw-r--r-- | src/config.h | 7 | ||||
-rw-r--r-- | src/defs.h | 12 | ||||
-rw-r--r-- | src/sxwm.c | 2 |
4 files changed, 34 insertions, 5 deletions
@@ -0,0 +1,18 @@ +# Colour Themes: +border_focused_colour = #c0cbff +border_unfocused_colour = #555555 +border_swap_colour = #fff4c0 + +# General Options: +master_coverage = 60% +gaps = 10 + +# Keybinds: +# Commands must be surrounded with "" +# Function calls don't need this + +mod_key = alt + +bind mod + shift + return = "st" +# this is an internal command - a pointer to a function +bind mod + j = focus_next diff --git a/src/config.h b/src/config.h index 342a54b..6437468 100644 --- a/src/config.h +++ b/src/config.h @@ -21,10 +21,9 @@ * The colour of your border when the * window is unfocused * - * MASTER_WIDTH (float): + * MASTER_WIDTH (int): * % of the screen the master window - * should take as a decimal value 0-1 - * eg. 0.5 is 50% + * should take * * RESIZE_MASTER_AMT (%): * % of the master width you want to @@ -65,7 +64,7 @@ #define BORDER_UFOC_COL "#555555" #define BORDER_SWAP_COL "#fff4c0" -#define MASTER_WIDTH 0.6 +#define MASTER_WIDTH 60 #define RESIZE_MASTER_AMT 1 #define MOTION_THROTTLE 60 #define SNAP_DISTANCE 5 @@ -103,6 +103,18 @@ typedef struct Client{ } Client; typedef struct { + uint gaps; + uint border_width; + ulong border_foc_col; + ulong border_ufoc_col; + ulong border_swap_col; + uint master_width; + uint resize_master_amt; + uint snap_distance; + Binding *binds; +} Config; + +typedef struct { int x, y; uint w, h; } Monitor; @@ -110,7 +110,7 @@ ulong last_motion_time = 0; ulong border_foc_col; ulong border_ufoc_col; ulong border_swap_col; -float master_frac = MASTER_WIDTH; +float master_frac = (float) MASTER_WIDTH / 100; uint gaps = GAPS; uint scr_width; uint scr_height; |