cmdtree

A trie command launcher for X11
git clone git://jb55.com/cmdtree
Log | Files | Refs | README | LICENSE

cfg.def.h (1337B)


      1 /* See LICENSE file for copyright and license details. */
      2 /* Default settings; can be overriden by command line. */
      3 
      4 enum position {
      5 	POSITION_TOP,
      6 	POSITION_LEFT,
      7 	POSITION_RIGHT,
      8 	POSITION_BOTTOM
      9 };
     10 
     11 static int xpad = 6;
     12 static int ypad = 2;
     13 
     14 static enum position position = POSITION_TOP;
     15 
     16 
     17 static const char *separator = " → ";
     18 
     19 /* -fn option overrides fonts[0]; default X11 font or font set */
     20 static const char *fonts[] = {
     21 	"monospace:size=14"
     22 };
     23 
     24 #define scheme_bg "#222222"
     25 
     26 static struct scheme schemes[SchemeLast] = {
     27 	[SchemeNorm]  = { .bg = scheme_bg,
     28 			  .bind = "#D19A66",
     29 			  .arrow = "#888",
     30 			  .prefix = "",
     31 			  .name = "#bbbbbb"
     32 	                },
     33 
     34 	[SchemePrefix] = { .bg = scheme_bg,
     35 			   .bind = "#eeeeee",
     36 			   .arrow = "#888",
     37 			   .prefix = "",
     38 			   .name = "#c678dd"
     39 	                 },
     40 };
     41 
     42 static struct command test_commands[] = {
     43 	DEFCMD("t", "test command", "echo ok")
     44 };
     45 
     46 
     47 static struct command browser_commands[] = {
     48 	DEFCMD("s", "chrome scaled", "chromium --force-device-scale-factor=1.25")
     49 	DEFCMD("c", "chromium", "chromium")
     50 	DEFCMD("f", "firefox", "firefox")
     51 	DEFCMD("k", "kill chrome", "pkill --oldest chromium")
     52 	DEFPREFIX("t", "test nested prefix", test_commands)
     53 };
     54 
     55 static struct command commands[] = {
     56 	DEFPREFIX("b", "browsers", browser_commands)
     57 	DEFCMD("e", "emacs", "emacs")
     58 };