sdiagram

Simple diagram tool — suckless-style node graph editor
git clone git clone https://git.krisyotam.com/krisyotam/sdiagram.git
Log | Files | Refs | LICENSE

config.def.h (3408B)


      1 /* sdiagram - simple diagram tool
      2  * See LICENSE file for copyright and license details. */
      3 
      4 /* appearance */
      5 static const char *font_title = "Sans 11";
      6 static const char *font_body = "Sans 9";
      7 static const double node_min_w = 180.0;
      8 static const double node_min_h = 44.0;
      9 static const double node_max_w = 320.0;
     10 static const double node_img_h = 160.0;
     11 static const double node_pad = 10.0;
     12 static const double node_hdr_h = 32.0;
     13 static const double node_comment_lh = 16.0;
     14 static const double conn_lw = 1.5;
     15 static const double zoom_step = 0.1;
     16 static const double zoom_min = 0.1;
     17 static const double zoom_max = 5.0;
     18 static const double grid_size = 50.0;
     19 static const int grid_on = 1;
     20 
     21 /* themes - krisyotam.com monochromatic palette */
     22 /* all colors: {r, g, b, a} - pure grayscale (0 saturation) */
     23 
     24 static const Theme theme_light = {
     25 	/* bg:           hsl(0 0% 98%) */
     26 	.bg         = {0.98, 0.98, 0.98, 1.0},
     27 	/* card:         hsl(0 0% 99%) */
     28 	.card       = {0.99, 0.99, 0.99, 1.0},
     29 	/* fg:           hsl(0 0% 20%) */
     30 	.fg         = {0.20, 0.20, 0.20, 1.0},
     31 	/* border:       hsl(0 0% 88%) */
     32 	.border     = {0.88, 0.88, 0.88, 1.0},
     33 	/* muted:        hsl(0 0% 92%) */
     34 	.muted      = {0.92, 0.92, 0.92, 1.0},
     35 	/* muted-fg:     hsl(0 0% 50%) */
     36 	.muted_fg   = {0.50, 0.50, 0.50, 1.0},
     37 	/* primary:      hsl(0 0% 10%) */
     38 	.primary    = {0.10, 0.10, 0.10, 1.0},
     39 	/* primary-fg:   hsl(0 0% 95%) */
     40 	.primary_fg = {0.95, 0.95, 0.95, 1.0},
     41 	/* connections */
     42 	.conn       = {0.55, 0.55, 0.55, 0.70},
     43 	/* selection ring: hsl(0 0% 40%) */
     44 	.sel        = {0.40, 0.40, 0.40, 1.0},
     45 	/* grid */
     46 	.grid       = {0.92, 0.92, 0.92, 1.0},
     47 	/* light mode headers: dark, text is primary_fg (0.95) */
     48 	.hdr = {
     49 		{0.10, 0.10, 0.10},
     50 		{0.18, 0.18, 0.18},
     51 		{0.14, 0.14, 0.14},
     52 		{0.22, 0.22, 0.22},
     53 		{0.12, 0.12, 0.12},
     54 		{0.16, 0.16, 0.16},
     55 	},
     56 	.nhdr = 6,
     57 };
     58 
     59 static const Theme theme_dark = {
     60 	/* bg:           hsl(0 0% 7%) */
     61 	.bg         = {0.07, 0.07, 0.07, 1.0},
     62 	/* card:         hsl(0 0% 9%) */
     63 	.card       = {0.09, 0.09, 0.09, 1.0},
     64 	/* fg:           hsl(0 0% 98%) */
     65 	.fg         = {0.98, 0.98, 0.98, 1.0},
     66 	/* border:       hsl(0 0% 15%) */
     67 	.border     = {0.15, 0.15, 0.15, 1.0},
     68 	/* muted:        hsl(0 0% 12%) */
     69 	.muted      = {0.12, 0.12, 0.12, 1.0},
     70 	/* muted-fg:     hsl(0 0% 70%) */
     71 	.muted_fg   = {0.70, 0.70, 0.70, 1.0},
     72 	/* primary:      hsl(0 0% 98%) */
     73 	.primary    = {0.98, 0.98, 0.98, 1.0},
     74 	/* primary-fg:   hsl(0 0% 9%) */
     75 	.primary_fg = {0.09, 0.09, 0.09, 1.0},
     76 	/* connections */
     77 	.conn       = {0.45, 0.45, 0.45, 0.70},
     78 	/* selection ring: hsl(0 0% 83%) */
     79 	.sel        = {0.83, 0.83, 0.83, 1.0},
     80 	/* grid */
     81 	.grid       = {0.11, 0.11, 0.11, 1.0},
     82 	/* dark mode headers: light, text is primary_fg (0.09) */
     83 	.hdr = {
     84 		{0.88, 0.88, 0.88},
     85 		{0.80, 0.80, 0.80},
     86 		{0.84, 0.84, 0.84},
     87 		{0.76, 0.76, 0.76},
     88 		{0.90, 0.90, 0.90},
     89 		{0.82, 0.82, 0.82},
     90 	},
     91 	.nhdr = 6,
     92 };
     93 
     94 /* default: 0=light, 1=dark */
     95 static const int default_dark = 0;
     96 
     97 /* default asset mode: 0=copy, 1=symlink */
     98 static const int default_asset_mode = 0;
     99 
    100 /* GTK CSS for squared corners (krisyotam.com aesthetic) */
    101 static const char *app_css =
    102 	"* { border-radius: 0; }\n"
    103 	"button { border-radius: 0; padding: 4px 10px; }\n"
    104 	"popover > contents { border-radius: 0; padding: 0; }\n"
    105 	"entry { border-radius: 0; }\n"
    106 	"headerbar { border-radius: 0; }\n"
    107 	"window { border-radius: 0; }\n"
    108 	"separator { margin: 0 2px; }\n";