sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-flyschemes-6.6-st-optionscheme-alpha-integration.diff (1689B)


      1 diff -up dwm-6.6-flyscheme/config.def.h dwm-6.6-flyscheme-st-optionscheme-alpha-integration/config.def.h
      2 --- dwm-6.6-flyscheme/config.def.h	2025-12-24 23:06:06.253357321 +0300
      3 +++ dwm-6.6-flyscheme-st-optionscheme-alpha-integration/config.def.h	2025-12-24 23:09:43.483360328 +0300
      4 @@ -116,7 +116,28 @@ static const char *dmenucmd[] = {
      5  	"-sf", "#eeeeee", /* changed as dmenucmd[12] in cycle_flyschemes */
      6  	NULL
      7  };
      8 -static const char *termcmd[]  = { "st", NULL };
      9 +
     10 +static const char *st_optionschemes[] = {
     11 +	"default",
     12 +	"light",
     13 +	"plan9",
     14 +	"dracula",
     15 +	"solarized",
     16 +	"nord",
     17 +	"gruvbox",
     18 +	"cyberpunk"
     19 +};
     20 +
     21 +static const char *st_alphas[] = {
     22 +	"0.8", "0.7", "0.9", "0.8", "0.9", "0.6", "0.7", "0.8"
     23 +};
     24 +
     25 +static const char *termcmd[]  = {
     26 +	"st",
     27 +	"-S", "default", /* changed as termcmd[2] in cycle_flyschemes */
     28 +	"-A", "0.8", /* changed as termcmd[4] in cycle_flyschemes */
     29 +	NULL
     30 +};
     31  
     32  static const Key keys[] = {
     33  	/* modifier                     key        function        argument */
     34 diff -up dwm-6.6-flyscheme/dwm.c dwm-6.6-flyscheme-st-optionscheme-alpha-integration/dwm.c
     35 --- dwm-6.6-flyscheme/dwm.c	2025-12-24 23:06:06.256690655 +0300
     36 +++ dwm-6.6-flyscheme-st-optionscheme-alpha-integration/dwm.c	2025-12-24 23:10:07.423360660 +0300
     37 @@ -2151,6 +2151,10 @@ update_scheme()
     38  	dmenucmd[8] = flyschemes[iflysch][SchemeNorm][0];
     39  	dmenucmd[10] = flyschemes[iflysch][SchemeSel][1];
     40  	dmenucmd[12] = flyschemes[iflysch][SchemeSel][0];
     41 +	int optschlen = LENGTH(st_optionschemes);
     42 +	int alphaslen = LENGTH(st_alphas);
     43 +	termcmd[2] = st_optionschemes[iflysch % optschlen];
     44 +	termcmd[4] = st_alphas[iflysch % alphaslen];
     45  	Client *cl = selmon->sel;
     46  	Client *c;
     47  	Monitor *m;