@ -15,19 +15,19 @@ static const unsigned int gappoh = 10; /* horiz outer gap between windo
static const unsigned int gappov = 30 ; /* vert outer gap between windows and screen edge */
static const int smartgaps = 0 ; /* 1 means no outer gap when there is only one window */
# endif // VANITYGAPS_PATCH
# if HOLDBAR_PATCH
# if BAR_ HOLDBAR_PATCH
static const int showbar = 0 ; /* 0 means no bar */
# else
static const int showbar = 1 ; /* 0 means no bar */
# endif // HOLDBAR_PATCH
# endif // BAR_ HOLDBAR_PATCH
static const int topbar = 1 ; /* 0 means bottom bar */
# if BAR_HEIGHT_PATCH
static const int bar_height = 0 ; /* 0 means derive from font, >= 1 explicit height */
# endif // BAR_HEIGHT_PATCH
# if BAR PADDING_PATCH
# if BAR _ PADDING_PATCH
static const int vertpad = 10 ; /* vertical padding of bar */
static const int sidepad = 10 ; /* horizontal padding of bar */
# endif // BAR PADDING_PATCH
# endif // BAR _ PADDING_PATCH
# if FOCUSONCLICK_PATCH
static const int focusonwheel = 0 ;
# endif // FOCUSONCLICK_PATCH
@ -35,136 +35,127 @@ static const int focusonwheel = 0;
static int floatposgrid_x = 5 ; /* float grid columns */
static int floatposgrid_y = 5 ; /* float grid rows */
# endif // FLOATPOS_PATCH
# if STATUSPADDING_PATCH
# if BAR_ STATUSPADDING_PATCH
static const int horizpadbar = 2 ; /* horizontal padding for statusbar */
static const int vertpadbar = 0 ; /* vertical padding for statusbar */
# endif // STATUSPADDING_PATCH
# if STATICSTATUS_PATCH && !STATUSALLMONS_PATCH
static const int statmonval = 0 ;
# endif // STATICSTATUS_PATCH
# if STATUSBUTTON_PATCH
# endif // BAR_STATUSPADDING_PATCH
# if BAR_STATUSBUTTON_PATCH
static const char buttonbar [ ] = " <O> " ;
# endif // STATUSBUTTON_PATCH
# if SYSTRAY_PATCH
static const unsigned int systraypinning = 0 ; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
# endif // BAR_STATUSBUTTON_PATCH
# if BAR_SYSTRAY_PATCH
static const unsigned int systrayspacing = 2 ; /* systray spacing */
static const int systraypinningfailfirst = 1 ; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1 ; /* 0 means no systray */
# endif // SYSTRAY_PATCH
# endif // BAR_ SYSTRAY_PATCH
# if ONLYQUITONEMPTY_PATCH
static const int quit_empty_window_count = 2 ; /* only allow dwm to quit if no windows are open, value here represents number of deamons */
# endif // ONLYQUITONEMPTY_PATCH
# if EXTRABAR _PATCH
# if BAR_EXTRASTATUS _PATCH
static const char statussep = ' ; ' ; /* separator between status bars */
static const int ebalign = 0 ; /* extrabar alignment: 0 - left, 1 - right, 2 - center */
# if STATICSTATUS_PATCH && !STATUSALLMONS_PATCH
static const int statebmonval = statmonval ;
# endif // STATICSTATUS_PATCH
# endif // EXTRABAR_PATCH
# if PANGO_PATCH
# endif // BAR_EXTRASTATUS_PATCH
# if BAR_PANGO_PATCH
static const char font [ ] = " monospace 10 " ;
# else
static const char * fonts [ ] = { " monospace:size=10 " } ;
# endif // PANGO_PATCH
# endif // BAR_PANGO_PATCH
static const char dmenufont [ ] = " monospace:size=10 " ;
static char normfgcolor [ ] = " #bbbbbb " ;
static char normbgcolor [ ] = " #222222 " ;
# if ! VTCOLORS_PATCH
# if ! BAR_ VTCOLORS_PATCH
static char normbordercolor [ ] = " #444444 " ;
# if FLOAT_BORDER_COLOR_PATCH
static char normfloatcolor [ ] = " #db8fd9 " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# endif // ! VTCOLORS_PATCH
# endif // ! BAR_ VTCOLORS_PATCH
static char selfgcolor [ ] = " #eeeeee " ;
static char selbgcolor [ ] = " #005577 " ;
# if ! VTCOLORS_PATCH
# if ! BAR_ VTCOLORS_PATCH
static char selbordercolor [ ] = " #005577 " ;
# if FLOAT_BORDER_COLOR_PATCH
static char selfloatcolor [ ] = " #005577 " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
static char warnfgcolor [ ] = " #000000 " ;
static char warnbgcolor [ ] = " #ffff00 " ;
static char warnbordercolor [ ] = " #ff0000 " ;
# if FLOAT_BORDER_COLOR_PATCH
static char warnfloatcolor [ ] = " #ffffff " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# endif // STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
static char urgfgcolor [ ] = " #000000 " ;
static char urgbgcolor [ ] = " #000000 " ;
static char urgbordercolor [ ] = " #ff0000 " ; // NB: patch only works with border color for now
# if FLOAT_BORDER_COLOR_PATCH
static char urgfloatcolor [ ] = " #000000 " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# endif // URGENTBORDER_PATCH // STATUSCOLORS_PATCH
# endif // URGENTBORDER_PATCH // BAR_ STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
static char hidfgcolor [ ] = " #005577 " ;
static char hidbgcolor [ ] = " #222222 " ;
static char hidbordercolor [ ] = " #005577 " ;
# if FLOAT_BORDER_COLOR_PATCH
static char hidfloatcolor [ ] = " #f76e0c " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if TITLECOLOR_PATCH
# if BAR_ TITLECOLOR_PATCH
static char titlefgcolor [ ] = " #eeeeee " ;
static char titlebgcolor [ ] = " #005577 " ;
static char titlebordercolor [ ] = " #005577 " ;
# if FLOAT_BORDER_COLOR_PATCH
static char titlefloatcolor [ ] = " #005577 " ;
# endif // FLOAT_BORDER_COLOR_PATCH
# endif // TITLECOLOR_PATCH
# endif // VTCOLORS_PATCH
# endif // BAR_ TITLECOLOR_PATCH
# endif // BAR_ VTCOLORS_PATCH
# if ALPHA_PATCH
# if BAR_ ALPHA_PATCH
static const unsigned int baralpha = 0xd0 ;
static const unsigned int borderalpha = OPAQUE ;
static const unsigned int alphas [ ] [ 3 ] = {
/* fg bg border */
[ SchemeNorm ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeSel ] = { OPAQUE , baralpha , borderalpha } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { OPAQUE , baralpha , borderalpha } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { OPAQUE , baralpha , borderalpha } ,
# endif // URGENTBORDER_PATCH / STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH / BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { OPAQUE , baralpha , borderalpha } ,
# endif // AWESOMEBAR_PATCH
# if VTCOLORS_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_ VTCOLORS_PATCH
[ SchemeTagsNorm ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeTagsSel ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeTitleNorm ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeTitleSel ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeStatus ] = { OPAQUE , baralpha , borderalpha } ,
# elif TITLECOLOR_PATCH
# elif BAR_ TITLECOLOR_PATCH
[ SchemeTitle ] = { OPAQUE , baralpha , borderalpha } ,
# endif // VTCOLORS_PATCH / TITLECOLOR_PATCH
# endif // BAR_ VTCOLORS_PATCH / BAR_ TITLECOLOR_PATCH
} ;
# endif // ALPHA_PATCH
# if VTCOLORS_PATCH && FLOAT_BORDER_COLOR_PATCH
# endif // BAR_ ALPHA_PATCH
# if BAR_ VTCOLORS_PATCH && FLOAT_BORDER_COLOR_PATCH
static const char title_bg_dark [ ] = " #303030 " ;
static const char title_bg_light [ ] = " #fdfdfd " ;
static const int color_ptrs [ ] [ ColCount ] = {
/* fg bg border float */
[ SchemeNorm ] = { - 1 , - 1 , 5 , 12 } ,
[ SchemeSel ] = { - 1 , - 1 , 11 , 13 } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { - 1 , 1 , 1 , 14 } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { 7 , 9 , 9 , 15 } ,
# endif // URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { 5 , 0 , 0 , - 1 } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
[ SchemeTagsNorm ] = { 2 , 0 , 0 , - 1 } ,
[ SchemeTagsSel ] = { 6 , 5 , 5 , - 1 } ,
[ SchemeTitleNorm ] = { 6 , - 1 , - 1 , - 1 } ,
@ -175,37 +166,37 @@ static char colors[][ColCount][8] = {
/* fg bg border float */
[ SchemeNorm ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeSel ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
# endif // URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
[ SchemeTagsNorm ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeTagsSel ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeTitleNorm ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeTitleSel ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeStatus ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
} ;
# elif VTCOLORS_PATCH
# elif BAR_ VTCOLORS_PATCH
static const char title_bg_dark [ ] = " #303030 " ;
static const char title_bg_light [ ] = " #fdfdfd " ;
static const int color_ptrs [ ] [ ColCount ] = {
/* fg bg border */
[ SchemeNorm ] = { - 1 , - 1 , 5 } ,
[ SchemeSel ] = { - 1 , - 1 , 11 } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { - 1 , 1 , 1 } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { 7 , 9 , 9 } ,
# endif // URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { 5 , 0 , 0 } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
[ SchemeTagsNorm ] = { 2 , 0 , 0 } ,
[ SchemeTagsSel ] = { 6 , 5 , 5 } ,
[ SchemeTitleNorm ] = { 6 , - 1 , - 1 } ,
@ -216,15 +207,15 @@ static char colors[][ColCount][8] = {
/* fg bg border */
[ SchemeNorm ] = { " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeSel ] = { " #000000 " , " #000000 " , " #000000 " } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { " #000000 " , " #000000 " , " #000000 " } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { " #000000 " , " #000000 " , " #000000 " } ,
# endif // URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { " #000000 " , " #000000 " , " #000000 " } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
[ SchemeTagsNorm ] = { " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeTagsSel ] = { " #000000 " , " #000000 " , " #000000 " } ,
[ SchemeTitleNorm ] = { " #000000 " , " #000000 " , " #000000 " } ,
@ -240,20 +231,20 @@ char *colors[][ColCount] = {
/* fg bg border float */
[ SchemeNorm ] = { normfgcolor , normbgcolor , normbordercolor , normfloatcolor } ,
[ SchemeSel ] = { selfgcolor , selbgcolor , selbordercolor , selfloatcolor } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { warnfgcolor , warnbgcolor , warnbordercolor , warnfloatcolor } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { urgfgcolor , urgbgcolor , urgbordercolor , urgfloatcolor } ,
# endif // URGENTBORDER_PATCH / STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH / BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { hidfgcolor , hidbgcolor , hidbordercolor , hidfloatcolor } ,
# endif // AWESOMEBAR_PATCH
# if TITLECOLOR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_ TITLECOLOR_PATCH
[ SchemeTitle ] = { titlefgcolor , titlebgcolor , titlebordercolor , titlefloatcolor } ,
# endif // TITLECOLOR_PATCH
# endif // BAR_ TITLECOLOR_PATCH
} ;
# else // ! VTCOLORS_PATCH && !FLOAT_BORDER_COLOR_PATCH
# else // ! BAR_ VTCOLORS_PATCH && !FLOAT_BORDER_COLOR_PATCH
static
# if !XRDB_PATCH
const
@ -262,20 +253,20 @@ char *colors[][ColCount] = {
/* fg bg border */
[ SchemeNorm ] = { normfgcolor , normbgcolor , normbordercolor } ,
[ SchemeSel ] = { selfgcolor , selbgcolor , selbordercolor } ,
# if STATUSCOLORS_PATCH
# if BAR_ STATUSCOLORS_PATCH
[ SchemeWarn ] = { warnfgcolor , warnbgcolor , warnbordercolor } ,
# endif // STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || STATUSCOLORS_PATCH
# endif // BAR_ STATUSCOLORS_PATCH
# if URGENTBORDER_PATCH || BAR_ STATUSCOLORS_PATCH
[ SchemeUrg ] = { urgfgcolor , urgbgcolor , urgbordercolor } ,
# endif // URGENTBORDER_PATCH / STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# endif // URGENTBORDER_PATCH / BAR_ STATUSCOLORS_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { hidfgcolor , hidbgcolor , hidbordercolor } ,
# endif // AWESOMEBAR_PATCH
# if TITLECOLOR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_ TITLECOLOR_PATCH
[ SchemeTitle ] = { titlefgcolor , titlebgcolor , titlebordercolor } ,
# endif // TITLECOLOR_PATCH
# endif // BAR_ TITLECOLOR_PATCH
} ;
# endif // VTCOLORS_PATCH / FLOAT_BORDER_COLOR_PATCH
# endif // BAR_ VTCOLORS_PATCH / FLOAT_BORDER_COLOR_PATCH
# if SCRATCHPADS_PATCH
const char * spcmd1 [ ] = { " st " , " -n " , " spterm " , " -g " , " 120x34 " , NULL } ;
@ -290,16 +281,16 @@ static Sp scratchpads[] = {
# endif // SCRATCHPADS_PATCH
/* tagging */
# if EWMHTAGS_PATCH
# if BAR_ EWMHTAGS_PATCH
static char * tags [ ] = { " 1 " , " 2 " , " 3 " , " 4 " , " 5 " , " 6 " , " 7 " , " 8 " , " 9 " } ;
# else
static const char * tags [ ] = { " 1 " , " 2 " , " 3 " , " 4 " , " 5 " , " 6 " , " 7 " , " 8 " , " 9 " } ;
# endif // EWMHTAGS_PATCH
# if ALTERNATIVE_TAGS_PATCH
# endif // BAR_ EWMHTAGS_PATCH
# if BAR_ ALTERNATIVE_TAGS_PATCH
static const char * tagsalt [ ] = { " 1 " , " 2 " , " 3 " , " 4 " , " 5 " , " 6 " , " 7 " , " 8 " , " 9 " } ;
# endif // ALTERNATIVE_TAGS_PATCH
# endif // BAR_ ALTERNATIVE_TAGS_PATCH
# if TAGGRID_PATCH
# if BAR_ TAGGRID_PATCH
/* grid of tags */
# define DRAWCLASSICTAGS 1 << 0
# define DRAWTAGGRID 1 << 1
@ -315,7 +306,7 @@ static const char *tagsalt[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const unsigned int drawtagmask = DRAWTAGGRID ; /* | DRAWCLASSICTAGS to show classic row of tags */
static const int tagrows = 2 ;
# endif // TAGGRID_PATCH
# endif // BAR_ TAGGRID_PATCH
/* There are two options when it comes to per-client rules:
* - a typical struct table or
@ -371,6 +362,62 @@ static const MonitorRule monrules[] = {
# endif // PERTAG_PATCH
# endif // MONITOR_RULES_PATCH
/* Bar rules allow you to configure what is shown where on the bar, as well as
* introducing your own bar modules .
*
* monitor :
* - 1 show on all monitors
* 0 show on monitor 0
* ' A ' show on active monitor ( i . e . focused / selected ) ( or just - 1 for active ? )
* bar - bar index , 0 is default , 1 is extrabar
* alignment - how the module is aligned compared to other modules
* widthfunc , drawfunc , clickfunc - providing bar module width , draw and click functions
* name - does nothing , intended for visual clue and for logging / debugging
*/
static const BarRule barrules [ ] = {
/* monitor bar alignment widthfunc drawfunc clickfunc name */
# if BAR_STATUSBUTTON_PATCH
{ - 1 , 0 , BAR_ALIGN_LEFT , width_stbutton , draw_stbutton , click_stbutton , " statusbutton " } ,
# endif // BAR_STATUSBUTTON_PATCH
# if BAR_TAGS_PATCH
{ - 1 , 0 , BAR_ALIGN_LEFT , width_tags , draw_tags , click_tags , " tags " } ,
# endif // BAR_TAGS_PATCH
# if BAR_TAGGRID_PATCH
{ - 1 , 0 , BAR_ALIGN_LEFT , width_taggrid , draw_taggrid , click_taggrid , " taggrid " } ,
# endif // BAR_TAGGRID_PATCH
# if BAR_LTSYMBOL_PATCH
{ - 1 , 0 , BAR_ALIGN_LEFT , width_ltsymbol , draw_ltsymbol , click_ltsymbol , " layout " } ,
# endif // BAR_LTSYMBOL_PATCH
# if BAR_SYSTRAY_PATCH
{ 0 , 0 , BAR_ALIGN_RIGHT , width_systray , draw_systray , click_systray , " systray " } ,
# endif // BAR_SYSTRAY_PATCH
# if BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ ' A ' , 0 , BAR_ALIGN_RIGHT , width_status2d , draw_status2d , click_statuscmd , " status2d " } ,
# elif BAR_STATUS2D_PATCH
{ ' A ' , 0 , BAR_ALIGN_RIGHT , width_status2d , draw_status2d , click_status2d , " status2d " } ,
# elif BAR_STATUS_PATCH
{ ' A ' , 0 , BAR_ALIGN_RIGHT , width_status , draw_status , click_status , " status " } ,
# endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
# if BAR_AWESOMEBAR_PATCH
{ - 1 , 0 , BAR_ALIGN_NONE , width_awesomebar , draw_awesomebar , click_awesomebar , " awesomebar " } ,
# elif BAR_FANCYBAR_PATCH
{ - 1 , 0 , BAR_ALIGN_NONE , width_fancybar , draw_fancybar , click_fancybar , " fancybar " } ,
# elif BAR_WINTITLE_PATCH
{ - 1 , 0 , BAR_ALIGN_NONE , width_wintitle , draw_wintitle , click_wintitle , " wintitle " } ,
# endif // BAR_AWESOMEBAR_PATCH | BAR_FANCYBAR_PATCH BAR_WINTITLE_PATCH
# if BAR_EXTRASTATUS_PATCH
# if BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status2d_es , draw_status2d_es , click_statuscmd_es , " status2d_es " } ,
# elif BAR_STATUS2D_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status2d_es , draw_status2d_es , click_status2d , " status2d_es " } ,
# elif BAR_STATUSCMD_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status_es , draw_status_es , click_statuscmd_es , " status_es " } ,
# elif BAR_STATUS_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status_es , draw_status_es , click_status , " status_es " } ,
# endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
# endif // BAR_EXTRASTATUS_PATCH
} ;
# if DWMC_PATCH
/* signal definitions */
/* signum must be greater than 0 */
@ -467,9 +514,9 @@ static Signal signals[] = {
# if SELFRESTART_PATCH
{ " self_restart " , self_restart } ,
# endif // SELFRESTART_PATCH
# if TAGGRID_PATCH
# if BAR_ TAGGRID_PATCH
{ " switchtag " , switchtag } ,
# endif // TAGGRID_PATCH
# endif // BAR_ TAGGRID_PATCH
# if STICKY_PATCH
{ " togglesticky " , togglesticky } ,
# endif // STICKY_PATCH
@ -495,9 +542,9 @@ static Signal signals[] = {
# if TAGSWAPMON_PATCH
{ " tagswapmon " , tagswapmon } ,
# endif // TAGSWAPMON_PATCH
# if ALTERNATIVE_TAGS_PATCH
# if BAR_ ALTERNATIVE_TAGS_PATCH
{ " togglealttag " , togglealttag } ,
# endif // ALTERNATIVE_TAGS_PATCH
# endif // BAR_ ALTERNATIVE_TAGS_PATCH
# if TOGGLEFULLSCREEN_PATCH
{ " togglefullscreen " , togglefullscreen } ,
# endif // TOGGLEFULLSCREEN_PATCH
@ -522,7 +569,7 @@ static Signal signals[] = {
# if WINVIEW_PATCH
{ " winview " , winview } ,
# endif // WINVIEW_PATCH
# if XRDB_PATCH && ! VTCOLORS_PATCH
# if XRDB_PATCH && ! BAR_ VTCOLORS_PATCH
{ " xrdb " , xrdb } ,
# endif // XRDB_PATCH
# if TAGOTHERMONITOR_PATCH
@ -549,7 +596,7 @@ static const int nmaster = 1; /* number of clients in master area */
# if FLEXTILE_DELUXE_LAYOUT
static const int nstack = 0 ; /* number of clients in primary stack area */
# endif // FLEXTILE_DELUXE_LAYOUT
static const int resizehints = 1 ; /* 1 means respect size hints in tiled resizals */
static const int resizehints = 0 ; /* 1 means respect size hints in tiled resizals */
# if NROWGRID_LAYOUT
# define FORCE_VSPLIT 1
@ -746,9 +793,9 @@ static const Layout layouts[] = {
{ MOD , XK_z , ACTION # # stack , { . i = - 1 } } ,
# endif // STACKER_PATCH
# if HOLDBAR_PATCH
# if BAR_ HOLDBAR_PATCH
# define HOLDKEY 0 // replace 0 with the keysym to activate holdbar
# endif // HOLDBAR_PATCH
# endif // BAR_ HOLDBAR_PATCH
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
# define SHCMD(cmd) { .v = (const char*[]){ " / bin / sh", "-c", cmd, NULL } }
@ -767,18 +814,18 @@ static const char *dmenucmd[] = {
" -nf " , normfgcolor ,
" -sb " , selbgcolor ,
" -sf " , selfgcolor ,
# if DMENUMATCHTOP_PATCH
# if BAR_ DMENUMATCHTOP_PATCH
topbar ? NULL : " -b " ,
# endif // DMENUMATCHTOP_PATCH
# endif // BAR_ DMENUMATCHTOP_PATCH
NULL
} ;
static const char * termcmd [ ] = { " st " , NULL } ;
# if STATUSCMD_PATCH && !DWMBLOCKS_PATCH
# if BAR_ STATUSCMD_PATCH && !BAR_ DWMBLOCKS_PATCH
/* commands spawned when clicking statusbar, the mouse button pressed is exported as BUTTON */
static const char * statuscmds [ ] = { " notify-send Mouse$BUTTON " } ;
static char * statuscmd [ ] = { " /bin/sh " , " -c " , NULL , NULL } ;
# endif // STATUSCMD_PATCH | DWMBLOCKS_PATCH
# endif // BAR_ STATUSCMD_PATCH | DWMBLOCKS_PATCH
static Key keys [ ] = {
/* modifier key function argument */
@ -874,9 +921,9 @@ static Key keys[] = {
{ MODKEY | Mod4Mask , XK_Tab , shiftviewclients , { . i = - 1 } } ,
{ MODKEY | Mod4Mask , XK_backslash , shiftviewclients , { . i = + 1 } } ,
# endif // SHIFTVIEW_CLIENTS_PATCH
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
{ MODKEY | ControlMask , XK_z , showhideclient , { 0 } } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
{ MODKEY | ShiftMask , XK_c , killclient , { 0 } } ,
# if KILLUNSEL_PATCH
{ MODKEY | ShiftMask , XK_x , killunsel , { 0 } } ,
@ -891,13 +938,13 @@ static Key keys[] = {
# if FOCUSURGENT_PATCH
{ MODKEY , XK_u , focusurgent , { 0 } } ,
# endif // FOCUSURGENT_PATCH
# if HOLDBAR_PATCH
# if BAR_ HOLDBAR_PATCH
{ 0 , HOLDKEY , holdbar , { 0 } } ,
# endif // HOLDBAR_PATCH
# endif // BAR_ HOLDBAR_PATCH
# if WINVIEW_PATCH
{ MODKEY , XK_o , winview , { 0 } } ,
# endif // WINVIEW_PATCH
# if XRDB_PATCH && ! VTCOLORS_PATCH
# if XRDB_PATCH && ! BAR_ VTCOLORS_PATCH
{ MODKEY | ShiftMask , XK_F5 , xrdb , { . v = NULL } } ,
# endif // XRDB_PATCH
{ MODKEY , XK_t , setlayout , { . v = & layouts [ 0 ] } } ,
@ -995,10 +1042,10 @@ static Key keys[] = {
{ MODKEY | Mod4Mask | ControlMask , XK_comma , tagswapmon , { . i = + 1 } } ,
{ MODKEY | Mod4Mask | ControlMask , XK_period , tagswapmon , { . i = - 1 } } ,
# endif // TAGSWAPMON_PATCH
# if ALTERNATIVE_TAGS_PATCH
# if BAR_ ALTERNATIVE_TAGS_PATCH
{ MODKEY , XK_n , togglealttag , { 0 } } ,
# endif // ALTERNATIVE_TAGS_PATCH
# if TAGGRID_PATCH
# endif // BAR_ ALTERNATIVE_TAGS_PATCH
# if BAR_ TAGGRID_PATCH
{ MODKEY | ControlMask , XK_Up , switchtag , { . ui = SWITCHTAG_UP | SWITCHTAG_VIEW } } ,
{ MODKEY | ControlMask , XK_Down , switchtag , { . ui = SWITCHTAG_DOWN | SWITCHTAG_VIEW } } ,
{ MODKEY | ControlMask , XK_Right , switchtag , { . ui = SWITCHTAG_RIGHT | SWITCHTAG_VIEW } } ,
@ -1007,7 +1054,7 @@ static Key keys[] = {
{ MODKEY | Mod4Mask , XK_Down , switchtag , { . ui = SWITCHTAG_DOWN | SWITCHTAG_TAG | SWITCHTAG_VIEW } } ,
{ MODKEY | Mod4Mask , XK_Right , switchtag , { . ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } } ,
{ MODKEY | Mod4Mask , XK_Left , switchtag , { . ui = SWITCHTAG_LEFT | SWITCHTAG_TAG | SWITCHTAG_VIEW } } ,
# endif // TAGGRID_PATCH
# endif // BAR_ TAGGRID_PATCH
# if MOVEPLACE_PATCH
{ MODKEY , XK_KP_7 , moveplace , { . ui = WIN_NW } } , /* XK_KP_Home, */
{ MODKEY , XK_KP_8 , moveplace , { . ui = WIN_N } } , /* XK_KP_Up, */
@ -1148,27 +1195,27 @@ static Command commands[] = {
# endif //
static Button buttons [ ] = {
/* click event mask button function argument */
# if STATUSBUTTON_PATCH
# if BAR_ STATUSBUTTON_PATCH
{ ClkButton , 0 , Button1 , spawn , { . v = dmenucmd } } ,
# endif // STATUSBUTTON_PATCH
# endif // BAR_ STATUSBUTTON_PATCH
{ ClkLtSymbol , 0 , Button1 , setlayout , { 0 } } ,
{ ClkLtSymbol , 0 , Button3 , setlayout , { . v = & layouts [ 2 ] } } ,
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
{ ClkWinTitle , 0 , Button1 , togglewin , { 0 } } ,
{ ClkWinTitle , 0 , Button3 , showhideclient , { 0 } } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
{ ClkWinTitle , 0 , Button2 , zoom , { 0 } } ,
# if STATUSCMD_PATCH && DWMBLOCKS_PATCH
# if BAR_ STATUSCMD_PATCH && BAR_ DWMBLOCKS_PATCH
{ ClkStatusText , 0 , Button1 , sigdwmblocks , { . i = 1 } } ,
{ ClkStatusText , 0 , Button2 , sigdwmblocks , { . i = 2 } } ,
{ ClkStatusText , 0 , Button3 , sigdwmblocks , { . i = 3 } } ,
# elif STATUSCMD_PATCH
# elif BAR_ STATUSCMD_PATCH
{ ClkStatusText , 0 , Button1 , spawn , { . v = statuscmd } } ,
{ ClkStatusText , 0 , Button2 , spawn , { . v = statuscmd } } ,
{ ClkStatusText , 0 , Button3 , spawn , { . v = statuscmd } } ,
# else
{ ClkStatusText , 0 , Button2 , spawn , { . v = termcmd } } ,
# endif // STATUSCMD_PATCH
# endif // BAR_ STATUSCMD_PATCH
{ ClkClientWin , MODKEY , Button1 , movemouse , { 0 } } ,
{ ClkClientWin , MODKEY , Button2 , togglefloating , { 0 } } ,
{ ClkClientWin , MODKEY , Button3 , resizemouse , { 0 } } ,