Merge remote-tracking branch 'upstream/master'

- upstream/master onlyquitonempty + cool_autostart: adding proposed compatibility improvements ref. #194
- noborder: addressing issue reported in #193
- fodcusadjacenttag: Add selmon->sel guards for tagandviewtoleft/right to prevent segmentation faults ref. #191
- Use 'pgrep -o' instead of 'pidof -s' to get the PID of status bar
- Add a statusallmons and staticstatus easily toggleable in patches.h ref. #188
This commit is contained in:
Sravan Balaji
2021-10-30 09:50:05 -04:00
7 changed files with 127 additions and 83 deletions

View File

@@ -623,15 +623,15 @@ If you are experiencing issues then you may want to check out the [Known Issues]
- [stacker](https://dwm.suckless.org/patches/stacker/)
- provides comprehensive utilities for managing the client stack
- [~staticstatus~](https://dwm.suckless.org/patches/staticstatus/)
- ~allows the status text to be fixed to the bar on a specific monitor rather than being
drawn on the focused monitor~
- [staticstatus](https://dwm.suckless.org/patches/staticstatus/)
- allows the status text to be fixed to the bar on a specific monitor rather than being
drawn on the focused monitor
- [status2d](https://dwm.suckless.org/patches/status2d/)
- allows colors and rectangle drawing in the dwm status bar
- [~statusallmons~](https://dwm.suckless.org/patches/statuspadding/)
- ~this patch draws and updates the statusbar on all monitors~
- [statusallmons](https://dwm.suckless.org/patches/statuspadding/)
- this patch draws and updates the statusbar on all monitors
- [statusbutton](https://dwm.suckless.org/patches/statusbutton/)
- adds a clickable button to the left hand side of the statusbar

View File

@@ -52,6 +52,8 @@
- [[#ignore-xft-errors-when-drawing-text][Ignore Xft Errors When Drawing Text]]
- [[#padding][Padding]]
- [[#pango][Pango]]
- [[#static-status][Static Status]]
- [[#status-all-monitors][Status All Monitors]]
- [[#status-colors][Status Colors]]
- [[#status-padding][Status Padding]]
- [[#vt-colors][VT Colors]]
@@ -889,14 +891,14 @@ If you are experiencing issues then you may want to check out the [[https://gith
- [[https://dwm.suckless.org/patches/stacker/][stacker]]
- provides comprehensive utilities for managing the client stack
- +[[https://dwm.suckless.org/patches/staticstatus/][staticstatus]]+
- +allows the status text to be fixed to the bar on a specific monitor rather than being drawn on the focused monitor+
- [[https://dwm.suckless.org/patches/staticstatus/][staticstatus]]
- allows the status text to be fixed to the bar on a specific monitor rather than being drawn on the focused monitor
- [[https://dwm.suckless.org/patches/status2d/][status2d]]
- allows colors and rectangle drawing in the dwm status bar
- +[[https://dwm.suckless.org/patches/statuspadding/][statusallmons]]+
- +this patch draws and updates the statusbar on all monitors+
- [[https://dwm.suckless.org/patches/statuspadding/][statusallmons]]
- this patch draws and updates the statusbar on all monitors
- [[https://dwm.suckless.org/patches/statusbutton/][statusbutton]]
- adds a clickable button to the left hand side of the statusbar
@@ -1221,7 +1223,7 @@ Powerline separators are defined as:
Examples:
#+BEGIN_EXAMPLE
xsetroot -name "$(echo -e '<\x01a<\x02b<\x03c')"
xsetroot -name "$(echo -e '/\x01d/\x02d/\x03f')"
xsetroot -name "$(echo -e '/\x01d/\x02e/\x03f')"
#+END_EXAMPLE
https://gitlab.com/udiboy1209-suckless/dwm/-/commit/071f5063e8ac4280666828179f92788d893eea40#4b1a539194be7467cefbda22f675a3b7c19ceca7
@@ -1667,6 +1669,28 @@ https://dwm.suckless.org/patches/pango/
#define BAR_PANGO_PATCH 0
#+END_SRC
*** Static Status
This patch allows the status text to be fixed to the bar on a specific monitor rather than being drawn on the focused monitor.
The statusallmons patch takes precedence over this patch.
https://dwm.suckless.org/patches/staticstatus/
#+BEGIN_SRC c :tangle patches.def.h
#define BAR_STATICSTATUS_PATCH 0
#+END_SRC
*** Status All Monitors
This patch draws and updates the statusbar on all monitors.
https://dwm.suckless.org/patches/statusallmons/
#+BEGIN_SRC c :tangle patches.def.h
#define BAR_STATUSALLMONS_PATCH 0
#+END_SRC
*** Status Colors
This patch enables colored text in the status bar. It changes the way colors are defined in config.h allowing multiple color combinations for use in the status script.
@@ -3476,6 +3500,17 @@ static const int riodraw_matchpid = 1; /* 0 or 1, indicates whether to m
#endif // RIODRAW_PATCH
#+END_SRC
#+BEGIN_SRC c :tangle config.def.h
/* Status is to be shown on: -1 (all monitors), 0 (a specific monitor by index), 'A' (active monitor) */
#if BAR_STATUSALLMONS_PATCH
static const int statusmon = -1;
#elif BAR_STATICSTATUS_PATCH
static const int statusmon = 0;
#else
static const int statusmon = 'A';
#endif // BAR_STATUSALLMONS_PATCH | BAR_STATICSTATUS_PATCH
#+END_SRC
#+BEGIN_SRC c :tangle config.def.h
#if BAR_STATUSPADDING_PATCH
static const int horizpadbar = 2; /* horizontal padding for statusbar */
@@ -3983,78 +4018,78 @@ name - does nothing, intended for visual clue and for logging / debugging
#+BEGIN_SRC c :tangle config.def.h
static const BarRule barrules[] = {
/* monitor bar alignment widthfunc drawfunc clickfunc name */
/* monitor bar alignment widthfunc drawfunc clickfunc name */
{ -2 },
#if BAR_STATUSBUTTON_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, "statusbutton" },
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, "statusbutton" },
#endif // BAR_STATUSBUTTON_PATCH
#if BAR_POWERLINE_TAGS_PATCH
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, "powerline_tags" },
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, "powerline_tags" },
#endif // BAR_POWERLINE_TAGS_PATCH
#if BAR_TAGS_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, "tags" },
{ -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" },
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, "taggrid" },
#endif // BAR_TAGGRID_PATCH
#if BAR_SYSTRAY_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, "systray" },
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, "systray" },
#endif // BAR_SYSTRAY_PATCH
#if BAR_LTSYMBOL_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
#endif // BAR_LTSYMBOL_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscmd, "statuscolors" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscmd, "statuscolors" },
#elif BAR_STATUSCOLORS_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscolors, "statuscolors" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscolors, "statuscolors" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_statuscmd, "status2d" },
{ statusmon, 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" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_status2d, "status2d" },
#elif BAR_POWERLINE_STATUS_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_pwrl_status, draw_pwrl_status, click_pwrl_status, "powerline_status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_pwrl_status, draw_pwrl_status, click_pwrl_status, "powerline_status" },
#elif BAR_STATUS_PATCH && BAR_STATUSCMD_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, "status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, "status" },
#elif BAR_STATUS_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, "status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, "status" },
#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
#if XKB_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_xkb, draw_xkb, click_xkb, "xkb" },
{ 0, 0, BAR_ALIGN_RIGHT, width_xkb, draw_xkb, click_xkb, "xkb" },
#endif // XKB_PATCH
#if BAR_FLEXWINTITLE_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_flexwintitle, draw_flexwintitle, click_flexwintitle, "flexwintitle" },
{ -1, 0, BAR_ALIGN_NONE, width_flexwintitle, draw_flexwintitle, click_flexwintitle, "flexwintitle" },
#elif BAR_TABGROUPS_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_bartabgroups, draw_bartabgroups, click_bartabgroups, "bartabgroups" },
{ -1, 0, BAR_ALIGN_NONE, width_bartabgroups, draw_bartabgroups, click_bartabgroups, "bartabgroups" },
#elif BAR_AWESOMEBAR_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_awesomebar, draw_awesomebar, click_awesomebar, "awesomebar" },
{ -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" },
{ -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" },
{ -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, "wintitle" },
#endif // BAR_TABGROUPS_PATCH | BAR_AWESOMEBAR_PATCH | BAR_FANCYBAR_PATCH | BAR_WINTITLE_PATCH
#if BAR_EXTRASTATUS_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscmd_es, "statuscolors_es" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscmd_es, "statuscolors_es" },
#elif BAR_STATUSCOLORS_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscolors, "statuscolors_es" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscolors, "statuscolors_es" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_statuscmd_es, "status2d_es" },
{ statusmon, 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" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_status2d, "status2d_es" },
#elif BAR_POWERLINE_STATUS_PATCH
{ 0, 1, BAR_ALIGN_RIGHT, width_pwrl_status_es, draw_pwrl_status_es, click_pwrl_status, "powerline_status" },
{ statusmon, 1, BAR_ALIGN_RIGHT, width_pwrl_status_es, draw_pwrl_status_es, click_pwrl_status, "powerline_status" },
#elif BAR_STATUSCMD_PATCH && BAR_STATUS_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_status_es, draw_status_es, click_statuscmd_es, "status_es" },
{ statusmon, 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" },
{ statusmon, 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 BAR_FLEXWINTITLE_PATCH
#if BAR_WINTITLE_HIDDEN_PATCH
{ -1, 1, BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, "wintitle_hidden" },
{ -1, 1, BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, "wintitle_hidden" },
#endif
#if BAR_WINTITLE_FLOATING_PATCH
{ -1, 1, BAR_ALIGN_LEFT, width_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, "wintitle_floating" },
{ -1, 1, BAR_ALIGN_LEFT, width_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, "wintitle_floating" },
#endif // BAR_WINTITLE_FLOATING_PATCH
#endif // BAR_FLEXWINTITLE_PATCH
};

View File

@@ -85,6 +85,15 @@ static const int riodraw_matchpid = 1; /* 0 or 1, indicates whether to m
#endif // SWALLOW_PATCH
#endif // RIODRAW_PATCH
/* Status is to be shown on: -1 (all monitors), 0 (a specific monitor by index), 'A' (active monitor) */
#if BAR_STATUSALLMONS_PATCH
static const int statusmon = -1;
#elif BAR_STATICSTATUS_PATCH
static const int statusmon = 0;
#else
static const int statusmon = 'A';
#endif // BAR_STATUSALLMONS_PATCH | BAR_STATICSTATUS_PATCH
#if BAR_STATUSPADDING_PATCH
static const int horizpadbar = 2; /* horizontal padding for statusbar */
static const int vertpadbar = 0; /* vertical padding for statusbar */
@@ -443,78 +452,78 @@ static const Inset default_inset = {
#endif // INSETS_PATCH
static const BarRule barrules[] = {
/* monitor bar alignment widthfunc drawfunc clickfunc name */
/* monitor bar alignment widthfunc drawfunc clickfunc name */
{ -2 },
#if BAR_STATUSBUTTON_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, "statusbutton" },
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, "statusbutton" },
#endif // BAR_STATUSBUTTON_PATCH
#if BAR_POWERLINE_TAGS_PATCH
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, "powerline_tags" },
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, "powerline_tags" },
#endif // BAR_POWERLINE_TAGS_PATCH
#if BAR_TAGS_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, "tags" },
{ -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" },
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, "taggrid" },
#endif // BAR_TAGGRID_PATCH
#if BAR_SYSTRAY_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, "systray" },
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, "systray" },
#endif // BAR_SYSTRAY_PATCH
#if BAR_LTSYMBOL_PATCH
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, "layout" },
#endif // BAR_LTSYMBOL_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscmd, "statuscolors" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscmd, "statuscolors" },
#elif BAR_STATUSCOLORS_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscolors, "statuscolors" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_statuscolors, draw_statuscolors, click_statuscolors, "statuscolors" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_statuscmd, "status2d" },
{ statusmon, 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" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_status2d, "status2d" },
#elif BAR_POWERLINE_STATUS_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_pwrl_status, draw_pwrl_status, click_pwrl_status, "powerline_status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_pwrl_status, draw_pwrl_status, click_pwrl_status, "powerline_status" },
#elif BAR_STATUS_PATCH && BAR_STATUSCMD_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, "status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_statuscmd, "status" },
#elif BAR_STATUS_PATCH
{ 'A', 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, "status" },
{ statusmon, 0, BAR_ALIGN_RIGHT, width_status, draw_status, click_status, "status" },
#endif // BAR_STATUS2D_PATCH | BAR_STATUSCMD_PATCH
#if XKB_PATCH
{ 0, 0, BAR_ALIGN_RIGHT, width_xkb, draw_xkb, click_xkb, "xkb" },
{ 0, 0, BAR_ALIGN_RIGHT, width_xkb, draw_xkb, click_xkb, "xkb" },
#endif // XKB_PATCH
#if BAR_FLEXWINTITLE_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_flexwintitle, draw_flexwintitle, click_flexwintitle, "flexwintitle" },
{ -1, 0, BAR_ALIGN_NONE, width_flexwintitle, draw_flexwintitle, click_flexwintitle, "flexwintitle" },
#elif BAR_TABGROUPS_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_bartabgroups, draw_bartabgroups, click_bartabgroups, "bartabgroups" },
{ -1, 0, BAR_ALIGN_NONE, width_bartabgroups, draw_bartabgroups, click_bartabgroups, "bartabgroups" },
#elif BAR_AWESOMEBAR_PATCH
{ -1, 0, BAR_ALIGN_NONE, width_awesomebar, draw_awesomebar, click_awesomebar, "awesomebar" },
{ -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" },
{ -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" },
{ -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, "wintitle" },
#endif // BAR_TABGROUPS_PATCH | BAR_AWESOMEBAR_PATCH | BAR_FANCYBAR_PATCH | BAR_WINTITLE_PATCH
#if BAR_EXTRASTATUS_PATCH
#if BAR_STATUSCOLORS_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscmd_es, "statuscolors_es" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscmd_es, "statuscolors_es" },
#elif BAR_STATUSCOLORS_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscolors, "statuscolors_es" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_statuscolors_es, draw_statuscolors_es, click_statuscolors, "statuscolors_es" },
#elif BAR_STATUS2D_PATCH && BAR_STATUSCMD_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_statuscmd_es, "status2d_es" },
{ statusmon, 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" },
{ statusmon, 1, BAR_ALIGN_CENTER, width_status2d_es, draw_status2d_es, click_status2d, "status2d_es" },
#elif BAR_POWERLINE_STATUS_PATCH
{ 0, 1, BAR_ALIGN_RIGHT, width_pwrl_status_es, draw_pwrl_status_es, click_pwrl_status, "powerline_status" },
{ statusmon, 1, BAR_ALIGN_RIGHT, width_pwrl_status_es, draw_pwrl_status_es, click_pwrl_status, "powerline_status" },
#elif BAR_STATUSCMD_PATCH && BAR_STATUS_PATCH
{ 'A', 1, BAR_ALIGN_CENTER, width_status_es, draw_status_es, click_statuscmd_es, "status_es" },
{ statusmon, 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" },
{ statusmon, 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 BAR_FLEXWINTITLE_PATCH
#if BAR_WINTITLE_HIDDEN_PATCH
{ -1, 1, BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, "wintitle_hidden" },
{ -1, 1, BAR_ALIGN_RIGHT_RIGHT, width_wintitle_hidden, draw_wintitle_hidden, click_wintitle_hidden, "wintitle_hidden" },
#endif
#if BAR_WINTITLE_FLOATING_PATCH
{ -1, 1, BAR_ALIGN_LEFT, width_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, "wintitle_floating" },
{ -1, 1, BAR_ALIGN_LEFT, width_wintitle_floating, draw_wintitle_floating, click_wintitle_floating, "wintitle_floating" },
#endif // BAR_WINTITLE_FLOATING_PATCH
#endif // BAR_FLEXWINTITLE_PATCH
};

18
dwm.c
View File

@@ -2750,15 +2750,10 @@ quit(const Arg *arg)
XQueryTree(dpy, root, junk, junk, &junk, &n);
#if COOL_AUTOSTART_PATCH
if (n - autostart_len <= quit_empty_window_count)
#else
if (n <= quit_empty_window_count)
#endif // COOL_AUTOSTART_PATCH
{
#if RESTARTSIG_PATCH
if (arg->i)
restart = 1;
restart = arg->i;
#endif // RESTARTSIG_PATCH
running = 0;
}
@@ -2766,17 +2761,16 @@ quit(const Arg *arg)
printf("[dwm] not exiting (n=%d)\n", n);
free(junk);
#else
#else // !ONLYQUITONEMPTY_PATCH
#if RESTARTSIG_PATCH
if (arg->i)
restart = 1;
restart = arg->i;
#endif // RESTARTSIG_PATCH
running = 0;
#endif // ONLYQUITONEMPTY_PATCH
#if COOL_AUTOSTART_PATCH
/* kill child processes */
for (i = 0; i < autostart_len; i++) {
for (i = 0; i < autostart_len && !running; i++) {
if (0 < autostart_pids[i]) {
kill(autostart_pids[i], SIGTERM);
waitpid(autostart_pids[i], NULL, 0);
@@ -2843,8 +2837,8 @@ resizeclient(Client *c, int x, int y, int w, int h)
#endif // FAKEFULLSCREEN_CLIENT_PATCH
&& !c->isfloating
&& c->mon->lt[c->mon->sellt]->arrange) {
wc.width += c->bw * 2;
wc.height += c->bw * 2;
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
wc.border_width = 0;
}
#endif // NOBORDER_PATCH

View File

@@ -18,7 +18,7 @@ getstatusbarpid()
return statuspid;
}
}
if (!(fp = popen("pidof -s "STATUSBAR, "r")))
if (!(fp = popen("pgrep -o "STATUSBAR, "r")))
return -1;
fgets(buf, sizeof(buf), fp);
pclose(fp);

View File

@@ -63,7 +63,8 @@ viewtoright(const Arg *arg)
void
tagandviewtoleft(const Arg *arg)
{
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
if (selmon->sel != NULL
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
&& selmon->tagset[selmon->seltags] > 1) {
selmon->sel->tags >>= 1;
selmon->seltags ^= 1; /* toggle sel tagset */
@@ -83,7 +84,8 @@ tagandviewtoleft(const Arg *arg)
void
tagandviewtoright(const Arg *arg)
{
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
if (selmon->sel != NULL
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
selmon->sel->tags <<= 1;
selmon->seltags ^= 1; /* toggle sel tagset */

View File

@@ -91,6 +91,10 @@
#define BAR_PANGO_PATCH 0
#define BAR_STATICSTATUS_PATCH 0
#define BAR_STATUSALLMONS_PATCH 0
#define BAR_STATUSCOLORS_PATCH 0
#define BAR_STATUSPADDING_PATCH 0