@ -39,25 +39,18 @@ static int floatposgrid_y = 5; /* float grid rows */
static const int horizpadbar = 2 ; /* horizontal padding for statusbar */
static const int vertpadbar = 0 ; /* vertical padding for statusbar */
# endif // BAR_STATUSPADDING_PATCH
# if BAR_STATICSTATUS_PATCH && !BAR_STATUSALLMONS_PATCH
static const int statmonval = 0 ;
# endif // BAR_STATICSTATUS_PATCH
# if STATUSBUTTON_PATCH
# if BAR_STATUSBUTTON_PATCH
static const char buttonbar [ ] = " <O> " ;
# endif // STATUSBUTTON_PATCH
# if SYSTRAY_PATCH
# endif // BAR_STATUSBUTTON_PATCH
# if BAR_SYSTRAY_PATCH
static const unsigned int systrayspacing = 2 ; /* systray spacing */
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 BAR_EXTRABAR_PATCH
static const char statussep = ' ; ' ; /* separator between status bars */
static const int ebalign = 0 ; /* extrabar alignment: 0 - left, 1 - right, 2 - center */
# if BAR_STATICSTATUS_PATCH && !BAR_STATUSALLMONS_PATCH
static const int statebmonval = statmonval ;
# endif // BAR_STATICSTATUS_PATCH
# endif // BAR_EXTRABAR_PATCH
# if BAR_PANGO_PATCH
static const char font [ ] = " monospace 10 " ;
@ -101,14 +94,14 @@ static char urgfloatcolor[] = "#000000";
# endif // FLOAT_BORDER_COLOR_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 BAR_TITLECOLOR_PATCH
static char titlefgcolor [ ] = " #eeeeee " ;
@ -133,9 +126,9 @@ static const unsigned int alphas[][3] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { OPAQUE , baralpha , borderalpha } ,
# endif // URGENTBORDER_PATCH / BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { OPAQUE , baralpha , borderalpha } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_VTCOLORS_PATCH
[ SchemeTagsNorm ] = { OPAQUE , baralpha , borderalpha } ,
[ SchemeTagsSel ] = { OPAQUE , baralpha , borderalpha } ,
@ -160,9 +153,9 @@ static const int color_ptrs[][ColCount] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { 7 , 9 , 9 , 15 } ,
# endif // URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_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 } ,
@ -179,9 +172,9 @@ static char colors[][ColCount][8] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { " #000000 " , " #000000 " , " #000000 " , " #000000 " } ,
# endif // URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_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 " } ,
@ -201,9 +194,9 @@ static const int color_ptrs[][ColCount] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { 7 , 9 , 9 } ,
# endif // URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_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 } ,
@ -220,9 +213,9 @@ static char colors[][ColCount][8] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { " #000000 " , " #000000 " , " #000000 " } ,
# endif // URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_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 " } ,
@ -244,9 +237,9 @@ char *colors[][ColCount] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { urgfgcolor , urgbgcolor , urgbordercolor , urgfloatcolor } ,
# endif // URGENTBORDER_PATCH / BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { hidfgcolor , hidbgcolor , hidbordercolor , hidfloatcolor } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_TITLECOLOR_PATCH
[ SchemeTitle ] = { titlefgcolor , titlebgcolor , titlebordercolor , titlefloatcolor } ,
# endif // BAR_TITLECOLOR_PATCH
@ -266,9 +259,9 @@ char *colors[][ColCount] = {
# if URGENTBORDER_PATCH || BAR_STATUSCOLORS_PATCH
[ SchemeUrg ] = { urgfgcolor , urgbgcolor , urgbordercolor } ,
# endif // URGENTBORDER_PATCH / BAR_STATUSCOLORS_PATCH
# if AWESOMEBAR_PATCH
# if BAR_ AWESOMEBAR_PATCH
[ SchemeHid ] = { hidfgcolor , hidbgcolor , hidbordercolor } ,
# endif // AWESOMEBAR_PATCH
# endif // BAR_ AWESOMEBAR_PATCH
# if BAR_TITLECOLOR_PATCH
[ SchemeTitle ] = { titlefgcolor , titlebgcolor , titlebordercolor } ,
# endif // BAR_TITLECOLOR_PATCH
@ -297,7 +290,7 @@ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char * tagsalt [ ] = { " 1 " , " 2 " , " 3 " , " 4 " , " 5 " , " 6 " , " 7 " , " 8 " , " 9 " } ;
# endif // BAR_ALTERNATIVE_TAGS_PATCH
# if TAGGRID_PATCH
# if BAR_ TAGGRID_PATCH
/* grid of tags */
# define DRAWCLASSICTAGS 1 << 0
# define DRAWTAGGRID 1 << 1
@ -313,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
@ -369,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_EXTRABAR_PATCH
# if BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status2d_eb , draw_status2d_eb , click_statuscmd_eb , " status2d_eb " } ,
# elif BAR_STATUS2D_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status2d_eb , draw_status2d_eb , click_status2d , " status2d_eb " } ,
# elif BAR_STATUSCMD_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status_eb , draw_status_eb , click_statuscmd_eb , " status_eb " } ,
# elif BAR_STATUS_PATCH
{ ' A ' , 1 , BAR_ALIGN_CENTER , width_status_eb , draw_status_eb , click_status , " status_eb " } ,
# endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
# endif // BAR_EXTRABAR_PATCH
} ;
# if DWMC_PATCH
/* signal definitions */
/* signum must be greater than 0 */
@ -465,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
@ -547,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
@ -872,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 } } ,
@ -996,7 +1045,7 @@ static Key keys[] = {
# if BAR_ALTERNATIVE_TAGS_PATCH
{ MODKEY , XK_n , togglealttag , { 0 } } ,
# endif // BAR_ALTERNATIVE_TAGS_PATCH
# if TAGGRID_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 } } ,
@ -1005,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, */