sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit bbc1efc1c3d9755c66779b05d1883660d725ea07
parent 0c087815ae6dd5b6dc23d8f9971eae65e419fb8a
Author: Philippe Gras <philippe.gras@free.fr>
Date:   Wed,  3 Aug 2016 12:13:32 +0200

Merge remote-tracking branch 'origin/master'

Diffstat:
M.gitignore | 1+
Mcore.suckless.org/index.md | 1+
Mdwm.suckless.org/dwmstatus/index.md | 14++++++++------
Ddwm.suckless.org/dwmstatus/slstatus.tar.gz | 0
Adwm.suckless.org/dwmstatus/volume.c | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/index.md | 35++++++++++++++++++++++++++++-------
Adwm.suckless.org/patches/alpha.md | 24++++++++++++++++++++++++
Mdwm.suckless.org/patches/alwaysfullscreen.md | 14++++++++------
Ddwm.suckless.org/patches/argbcolor.md | 27---------------------------
Mdwm.suckless.org/patches/attachabove.md | 22+++++++++++-----------
Mdwm.suckless.org/patches/attachaside.md | 28+++++++++-------------------
Mdwm.suckless.org/patches/autoresize.md | 21++++++++++++++-------
Ddwm.suckless.org/patches/autostart.md | 15---------------
Ddwm.suckless.org/patches/azertykey.md | 20--------------------
Ddwm.suckless.org/patches/better-borders.md | 25-------------------------
Ddwm.suckless.org/patches/bottom_stack.md | 49-------------------------------------------------
Ddwm.suckless.org/patches/bottommargin.md | 13-------------
Adwm.suckless.org/patches/bottomstack.md | 31+++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/center.md | 13+++++++------
Ddwm.suckless.org/patches/centeredmaster.c | 91-------------------------------------------------------------------------------
Mdwm.suckless.org/patches/centeredmaster.md | 157++++++++++++++++++++++++++++++++-----------------------------------------------
Mdwm.suckless.org/patches/clientspertag.md | 2+-
Mdwm.suckless.org/patches/columns.md | 25++++++++-----------------
Mdwm.suckless.org/patches/combo.md | 6+++---
Mdwm.suckless.org/patches/current_desktop.md | 2+-
Mdwm.suckless.org/patches/dualstatus.md | 4++--
Ddwm.suckless.org/patches/dwm-10e232f9ace7-float_border_color2.diff | 84-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-20151110-5ed9c48-keycode.patch | 146-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-3465bed-argbcolor.diff | 269-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.0-attachabove.diff | 63---------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.0-attachaside.diff | 57---------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.0-autoresize.diff | 35-----------------------------------
Ddwm.suckless.org/patches/dwm-6.0-autostart.diff | 32--------------------------------
Ddwm.suckless.org/patches/dwm-6.0-bottommargin.diff | 26--------------------------
Ddwm.suckless.org/patches/dwm-6.0-bstack.diff | 91-------------------------------------------------------------------------------
Rdwm.suckless.org/patches/dwm-6.1-ispermanent.diff -> dwm.suckless.org/patches/dwm-6.0-ispermanent.diff | 0
Ddwm.suckless.org/patches/dwm-6.0-keycode.diff | 133-------------------------------------------------------------------------------
Mdwm.suckless.org/patches/dwm-6.0-pertag_without_bar.diff | 2+-
Ddwm.suckless.org/patches/dwm-6.0-single_window_no_border.diff | 97-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-attachabove.diff | 63---------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-better-borders.diff | 91-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-centeredmaster.diff | 59-----------------------------------------------------------
Mdwm.suckless.org/patches/dwm-6.1-cfacts.diff | 49++++++++++++++++++++++++-------------------------
Ddwm.suckless.org/patches/dwm-6.1-dwmfifo.diff | 215-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-htile.diff | 46----------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-monarg.diff | 30------------------------------
Ddwm.suckless.org/patches/dwm-6.1-single_window_no_border.diff | 99-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/dwm-6.1-swallowing.diff | 377-------------------------------------------------------------------------------
Mdwm.suckless.org/patches/dwm-6.1-systray.diff | 58+++++++++++++++++++++++++++++-----------------------------
Adwm.suckless.org/patches/dwm-alpha-6.1.diff | 253+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-argbcolor.png -> dwm.suckless.org/patches/dwm-alpha.png | 0
Adwm.suckless.org/patches/dwm-alwaysfullscreen-20160713-56a31dc.diff | 13+++++++++++++
Adwm.suckless.org/patches/dwm-alwaysfullscreen-6.1.diff | 13+++++++++++++
Adwm.suckless.org/patches/dwm-attachabove-20160713-56a31dc.diff | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-attachabove-6.0.diff | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-attachabove-6.1.diff | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-attachaside-20160718-56a31dc.diff | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-attachaside-6.1.diff | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff | 35+++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-autoresize-6.0.diff | 35+++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-autoresize-6.1.diff | 35+++++++++++++++++++++++++++++++++++
Ddwm.suckless.org/patches/dwm-azertykey.diff | 44--------------------------------------------
Adwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-bottomstack-6.1.diff | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddwm.suckless.org/patches/dwm-cdec978-alwaysfullscreen.diff | 13-------------
Adwm.suckless.org/patches/dwm-center-20160719-56a31dc.diff | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.1-center.diff -> dwm.suckless.org/patches/dwm-center-6.1.diff | 0
Adwm.suckless.org/patches/dwm-centeredmaster-20160719-56a31dc.diff | 142+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-centeredmaster-6.1.diff | 142+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-5.6.1-cpt.diff -> dwm.suckless.org/patches/dwm-clientspertag-5.6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-column_master.diff -> dwm.suckless.org/patches/dwm-columns-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-5.9-combo.diff -> dwm.suckless.org/patches/dwm-combo-5.9.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-combo.diff -> dwm.suckless.org/patches/dwm-combo-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-combo.diff -> dwm.suckless.org/patches/dwm-combo-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-5.8.2-current_desktop.diff -> dwm.suckless.org/patches/dwm-current_desktop-5.8.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-dualstatus.diff -> dwm.suckless.org/patches/dwm-dualstatus-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-dualstatus.diff -> dwm.suckless.org/patches/dwm-dualstatus-6.1.diff | 0
Adwm.suckless.org/patches/dwm-dwmfifo-6.1.diff | 217+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-emptyview.diff -> dwm.suckless.org/patches/dwm-emptyview-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-fancybar.diff -> dwm.suckless.org/patches/dwm-fancybar-6.1.diff | 0
Adwm.suckless.org/patches/dwm-fancybar-git-20160725-7af4d43.diff | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-5.8.2-fibonacci.diff -> dwm.suckless.org/patches/dwm-fibonacci-5.8.2.diff | 0
Rdwm.suckless.org/patches/flextile-5.8.2.diff -> dwm.suckless.org/patches/dwm-flextile-5.8.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-float_border_color2.diff -> dwm.suckless.org/patches/dwm-float_border_color-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-float_border_color2.diff -> dwm.suckless.org/patches/dwm-float_border_color-6.1.diff | 0
Adwm.suckless.org/patches/dwm-float_border_color2-20160731-56a31dc.diff | 90+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-focusonclick.diff -> dwm.suckless.org/patches/dwm-focusonclick-6.0.diff | 0
Adwm.suckless.org/patches/dwm-gaplessgrid-20160731-56a31dc.diff | 43+++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.1-gaplessgrid.diff -> dwm.suckless.org/patches/dwm-gaplessgrid-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-gaps.diff -> dwm.suckless.org/patches/dwm-gaps-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-5.8.2-gridmode.diff -> dwm.suckless.org/patches/dwm-gridmode-5.8.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff -> dwm.suckless.org/patches/dwm-hide_vacant_tags-6.1.diff | 0
Adwm.suckless.org/patches/dwm-hide_vacant_tags-git-20160626-7af4d43.diff | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.1-horizgrid.diff -> dwm.suckless.org/patches/dwm-horizgrid-6.1.diff | 0
Adwm.suckless.org/patches/dwm-keycode-20160702-56a31dc.diff | 133+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-keycode-6.1.diff | 133+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-keypressrelease.diff -> dwm.suckless.org/patches/dwm-keypressrelease-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-mark.diff -> dwm.suckless.org/patches/dwm-mark-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-mark-new.diff -> dwm.suckless.org/patches/dwm-mark-new-6.1.diff | 0
Adwm.suckless.org/patches/dwm-maximize_vert_horz-20160731-56a31dc.diff | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-maximize_vert_horz.diff -> dwm.suckless.org/patches/dwm-maximize_vert_horz-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-maximize_vert_horz.diff -> dwm.suckless.org/patches/dwm-maximize_vert_horz-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-5.8.2-monocle_count.diff -> dwm.suckless.org/patches/dwm-monocle_count-5.8.2.diff | 0
Adwm.suckless.org/patches/dwm-moveresize-20160731-56a31dc.diff | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-moveresize.diff -> dwm.suckless.org/patches/dwm-moveresize-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-moveresize.diff -> dwm.suckless.org/patches/dwm-moveresize-6.1.diff | 0
Adwm.suckless.org/patches/dwm-movestack-6.1.diff | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-5.7.2-nametag.diff -> dwm.suckless.org/patches/dwm-nametag-5.7.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-nametag.diff -> dwm.suckless.org/patches/dwm-nametag-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-nametag-prepend.diff -> dwm.suckless.org/patches/dwm-nametag-prepend-6.1.diff | 0
Adwm.suckless.org/patches/dwm-noborder-20160718-56a31dc.diff | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-noborder-6.1.diff | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddwm.suckless.org/patches/dwm-nofullscreen.diff | 11-----------
Rdwm.suckless.org/patches/dwm-6.0-pango.diff -> dwm.suckless.org/patches/dwm-pango-6.0.diff | 0
Adwm.suckless.org/patches/dwm-pertag-20160626-7af4d43.diff | 199+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-pertag-20160731-56a31dc.diff | 205+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-pertag.diff -> dwm.suckless.org/patches/dwm-pertag-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-pertag.diff -> dwm.suckless.org/patches/dwm-pertag-6.1.diff | 0
Adwm.suckless.org/patches/dwm-push-20160731-56a31dc.diff | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-push.diff -> dwm.suckless.org/patches/dwm-push-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-push.diff -> dwm.suckless.org/patches/dwm-push-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-5.9-pwkl.diff -> dwm.suckless.org/patches/dwm-pwkl-5.9.diff | 0
Ddwm.suckless.org/patches/dwm-r1580-col.diff | 60------------------------------------------------------------
Rdwm.suckless.org/patches/dwm-6.0-resizecorners.diff -> dwm.suckless.org/patches/dwm-resizecorners-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-resizecorners.diff -> dwm.suckless.org/patches/dwm-resizecorners-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-save_floats.diff -> dwm.suckless.org/patches/dwm-save_floats-6.0.diff | 0
Adwm.suckless.org/patches/dwm-savefloats-20160723-56a31dc.diff | 46++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-single_tagset-20160731-56a31dc.diff | 540+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-single_tagset.diff -> dwm.suckless.org/patches/dwm-single_tagset-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-5.7.2-sizehints.diff -> dwm.suckless.org/patches/dwm-sizehints-5.7.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-stacker.diff -> dwm.suckless.org/patches/dwm-stacker-6.0.diff | 0
Adwm.suckless.org/patches/dwm-statusallmons-20160731-56a31dc.diff | 29+++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-5.8.2-statusallmons.diff -> dwm.suckless.org/patches/dwm-statusallmons-5.8.2.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-statusallmons.diff -> dwm.suckless.org/patches/dwm-statusallmons-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-5.9-statuscolors.diff -> dwm.suckless.org/patches/dwm-statuscolors-5.9.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-statuscolors.diff -> dwm.suckless.org/patches/dwm-statuscolors-6.1.diff | 0
Adwm.suckless.org/patches/dwm-swallow-20160717-56a31dc.diff | 380+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-swallow-6.1.diff | 382+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-swapfocus-20160731-56a31dc.diff | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-swapfocus.diff -> dwm.suckless.org/patches/dwm-swapfocus-6.0.diff | 0
Adwm.suckless.org/patches/dwm-switchcol-6.1.diff | 47+++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-systray-20160731-56a31dc.diff | 725+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-systray.diff -> dwm.suckless.org/patches/dwm-systray-6.0.diff | 0
Adwm.suckless.org/patches/dwm-systray-git-20160626-7af4d43.diff | 685+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-tagall-20160731-56a31dc.diff | 33+++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-tagall.diff -> dwm.suckless.org/patches/dwm-tagall-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-tagall.diff -> dwm.suckless.org/patches/dwm-tagall-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-6.0-tilegap.diff -> dwm.suckless.org/patches/dwm-tilegap-6.0.diff | 0
Rdwm.suckless.org/patches/dwm-5.9-uselessgap.diff -> dwm.suckless.org/patches/dwm-uselessgap-5.9.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-uselessgap.diff -> dwm.suckless.org/patches/dwm-uselessgap-6.1.diff | 0
Rdwm.suckless.org/patches/dwm-5.9-warp.diff -> dwm.suckless.org/patches/dwm-warp-5.9.diff | 0
Rdwm.suckless.org/patches/dwm-6.1-warp.diff -> dwm.suckless.org/patches/dwm-warp-6.1.diff | 0
Adwm.suckless.org/patches/dwm-warp-git-20160626-7af4d43.diff | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-zoomswap-20160731-56a31dc.diff | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/dwm-6.0-zoomswap.diff -> dwm.suckless.org/patches/dwm-zoomswap-6.0.diff | 0
Mdwm.suckless.org/patches/dwmfifo.md | 2+-
Mdwm.suckless.org/patches/emptyview.md | 2+-
Mdwm.suckless.org/patches/exresize.md | 6++++--
Mdwm.suckless.org/patches/fancybar.md | 7++++---
Mdwm.suckless.org/patches/fancybarclickable.md | 2+-
Mdwm.suckless.org/patches/fibonacci.md | 2+-
Mdwm.suckless.org/patches/flextile.md | 14++++++++++----
Mdwm.suckless.org/patches/float_border_color.md | 7++++---
Mdwm.suckless.org/patches/focusadjacenttag.md | 6+++---
Mdwm.suckless.org/patches/focusonclick.md | 3+--
Mdwm.suckless.org/patches/gapless_grid.md | 3++-
Mdwm.suckless.org/patches/gaps.md | 2+-
Mdwm.suckless.org/patches/gestures.md | 5+++--
Mdwm.suckless.org/patches/gridmode.md | 2+-
Mdwm.suckless.org/patches/hide_vacant_tags.md | 4+++-
Rdwm.suckless.org/patches/ansistatuscolors.md -> dwm.suckless.org/patches/historical/ansistatuscolors.md | 0
Rdwm.suckless.org/patches/ansistatuscolors.png -> dwm.suckless.org/patches/historical/ansistatuscolors.png | 0
Rdwm.suckless.org/patches/autoresize.diff -> dwm.suckless.org/patches/historical/autoresize.diff | 0
Ddwm.suckless.org/patches/historical/dwm-5.6.1-attachabove.diff | 40----------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.6.1-attachaside.diff | 38--------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.7.2-attachaside.diff | 38--------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff | 93-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff | 82-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff | 98-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/historical/dwm-5.9-bstack.diff | 87-------------------------------------------------------------------------------
Ddwm.suckless.org/patches/historical/dwm-cdec978-center.diff | 58----------------------------------------------------------
Rdwm.suckless.org/patches/historical/fancybar-5.6.1.diff -> dwm.suckless.org/patches/historical/dwm-fancybar-5.6.1.diff | 0
Rdwm.suckless.org/patches/historical/flextile-5.8.1.diff -> dwm.suckless.org/patches/historical/dwm-flextile-5.8.1.diff | 0
Rdwm.suckless.org/patches/movestack-5.8.2.diff -> dwm.suckless.org/patches/historical/dwm-movestack-5.8.2.diff | 0
Adwm.suckless.org/patches/historical/dwm-pertag-5.1.diff | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rdwm.suckless.org/patches/historical/dwm-5.2-pertag.diff -> dwm.suckless.org/patches/historical/dwm-pertag-5.2.diff | 0
Rdwm.suckless.org/patches/historical/dwm-5.4-pertag.diff -> dwm.suckless.org/patches/historical/dwm-pertag-5.4.diff | 0
Rdwm.suckless.org/patches/historical/dwm-5.7.2-pertag.diff -> dwm.suckless.org/patches/historical/dwm-pertag-5.7.2.diff | 0
Rdwm.suckless.org/patches/historical/dwm-5.8.2-pertag.diff -> dwm.suckless.org/patches/historical/dwm-pertag-5.8.2.diff | 0
Rdwm.suckless.org/patches/multimon-1-added-monitor-marker-to-bar.diff -> dwm.suckless.org/patches/historical/multimon-1-added-monitor-marker-to-bar.diff | 0
Rdwm.suckless.org/patches/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff -> dwm.suckless.org/patches/historical/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff | 0
Rdwm.suckless.org/patches/multimon-3-added-reset_view-function.diff -> dwm.suckless.org/patches/historical/multimon-3-added-reset_view-function.diff | 0
Rdwm.suckless.org/patches/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff -> dwm.suckless.org/patches/historical/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff | 0
Rdwm.suckless.org/patches/multimon.md -> dwm.suckless.org/patches/historical/multimon.md | 0
Mdwm.suckless.org/patches/horizgrid.md | 2+-
Mdwm.suckless.org/patches/index.md | 63+++------------------------------------------------------------
Mdwm.suckless.org/patches/ispermanent.md | 2+-
Mdwm.suckless.org/patches/keycode.md | 4++--
Mdwm.suckless.org/patches/keypressrelease.md | 4++--
Mdwm.suckless.org/patches/mark.md | 8++++----
Mdwm.suckless.org/patches/maximize.md | 5+++--
Ddwm.suckless.org/patches/monarg.md | 18------------------
Mdwm.suckless.org/patches/monocle_count.md | 2+-
Mdwm.suckless.org/patches/moveresize.md | 7+++----
Mdwm.suckless.org/patches/movestack.md | 6++----
Mdwm.suckless.org/patches/nametag.md | 6+++---
Mdwm.suckless.org/patches/noborder.md | 19++++++++-----------
Ddwm.suckless.org/patches/nofullscreen.m4 | 19-------------------
Mdwm.suckless.org/patches/pango.md | 2+-
Mdwm.suckless.org/patches/pertag.md | 27+++++++++++++++------------
Mdwm.suckless.org/patches/push.md | 5+++--
Mdwm.suckless.org/patches/pwkl.md | 2+-
Mdwm.suckless.org/patches/resizecorners.md | 4++--
Mdwm.suckless.org/patches/save_floats.md | 4+++-
Mdwm.suckless.org/patches/single_tagset.md | 4+++-
Mdwm.suckless.org/patches/sizehints.md | 2+-
Mdwm.suckless.org/patches/stacker.md | 2+-
Mdwm.suckless.org/patches/statusallmons.md | 5+++--
Mdwm.suckless.org/patches/statuscolors.md | 4++--
Mdwm.suckless.org/patches/swallow.md | 61+++++++++++++++++++++++++++++++++++++++----------------------
Mdwm.suckless.org/patches/swapfocus.md | 3++-
Adwm.suckless.org/patches/switchcol.md | 20++++++++++++++++++++
Mdwm.suckless.org/patches/systray.md | 5++++-
Mdwm.suckless.org/patches/tagall.md | 5+++--
Mdwm.suckless.org/patches/tilegap.md | 2+-
Mdwm.suckless.org/patches/uselessgap.md | 4++--
Mdwm.suckless.org/patches/warp.md | 7++++---
Mdwm.suckless.org/patches/zoomswap.md | 3++-
Adwm.suckless.org/scripts/basic_collection.md | 9+++++++++
Mlibs.suckless.org/_werc/config | 2+-
Alibs.suckless.org/deprecated/index.md | 1+
Alibs.suckless.org/deprecated/libixp.md | 18++++++++++++++++++
Alibs.suckless.org/deprecated/r9p.md | 12++++++++++++
Dlibs.suckless.org/libixp.md | 19-------------------
Alibs.suckless.org/libzahl-paper-1.pdf | 0
Alibs.suckless.org/libzahl-refman.pdf | 0
Alibs.suckless.org/libzahl-refsheet.pdf | 0
Alibs.suckless.org/libzahl.md | 34++++++++++++++++++++++++++++++++++
Dlibs.suckless.org/r9p.md | 13-------------
Dst.suckless.org/faq.md | 5-----
Mst.suckless.org/index.md | 71++++++++++++++++++++++++++++++++---------------------------------------
Ast.suckless.org/patches/alpha.md | 33+++++++++++++++++++++++++++++++++
Dst.suckless.org/patches/argbbg.md | 26--------------------------
Dst.suckless.org/patches/boldcolor.md | 47-----------------------------------------------
Mst.suckless.org/patches/clipboard.md | 20++++++++++++--------
Mst.suckless.org/patches/copyurl.md | 9++++-----
Mst.suckless.org/patches/delkey.md | 8++++----
Mst.suckless.org/patches/externalpipe.md | 12++++++------
Mst.suckless.org/patches/hidecursor.md | 14+++++++-------
Mst.suckless.org/patches/index.md | 7++++---
Mst.suckless.org/patches/openbsd.md | 6+++---
Mst.suckless.org/patches/scrollback.md | 18+++++++++---------
Mst.suckless.org/patches/solarized.md | 28+++++++++++++++++-----------
Mst.suckless.org/patches/spoiler.md | 7++++---
Dst.suckless.org/patches/st-0.3-boldcolor.diff | 52----------------------------------------------------
Dst.suckless.org/patches/st-0.3-wordbreak.diff | 58----------------------------------------------------------
Dst.suckless.org/patches/st-0.4-wordbreak.diff | 58----------------------------------------------------------
Dst.suckless.org/patches/st-0.4.1-externalpipe.diff | 109-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.4.1-wordbreak.diff | 57---------------------------------------------------------
Dst.suckless.org/patches/st-0.5-argbbg.diff | 169-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.5-externalpipe.diff | 109-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.5-hidecursor.diff | 82-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.5-no-bold-colors.diff | 13-------------
Dst.suckless.org/patches/st-0.5-solarized-dark.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-0.5-solarized-light.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-0.5-wordbreak.diff | 52----------------------------------------------------
Dst.suckless.org/patches/st-0.6-argbbg.diff | 170-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-clipboard.diff | 13-------------
Dst.suckless.org/patches/st-0.6-copyurl.diff | 88-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-delkey.diff | 45---------------------------------------------
Dst.suckless.org/patches/st-0.6-externalpipe.diff | 75---------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-hidecursor.diff | 84-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-no-bold-colors.diff | 13-------------
Dst.suckless.org/patches/st-0.6-solarized-dark.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-solarized-light.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-0.6-spoiler.diff | 22----------------------
Rst.suckless.org/patches/st-0.4.1-argbbg.diff -> st.suckless.org/patches/st-alpha-0.4.1.diff | 0
Ast.suckless.org/patches/st-alpha-0.5.diff | 169+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-alpha-0.6.diff | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-alpha-20160727-308bfbf.diff | 188+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-alpha-s.png | 0
Ast.suckless.org/patches/st-alpha.png | 0
Dst.suckless.org/patches/st-argbbg-s.png | 0
Dst.suckless.org/patches/st-argbbg.png | 0
Ast.suckless.org/patches/st-clipboard-0.6.diff | 13+++++++++++++
Ast.suckless.org/patches/st-clipboard-20160727-308bfbf.diff | 13+++++++++++++
Ast.suckless.org/patches/st-copyurl-0.6.diff | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-copyurl-20160727-308bfbf.diff | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-delkey-0.6.diff | 45+++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-delkey-20160727-308bfbf.diff | 45+++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-externalpipe-0.4.1.diff | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-externalpipe-0.5.diff | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-externalpipe-0.6.diff | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-externalpipe-20160727-308bfbf.diff | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dst.suckless.org/patches/st-git-20150917-clipboard.diff | 13-------------
Dst.suckless.org/patches/st-git-20150917-delkey.diff | 45---------------------------------------------
Dst.suckless.org/patches/st-git-20150917-hidecursor.diff | 88-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20150917-no-bold-colors.diff | 13-------------
Dst.suckless.org/patches/st-git-20150917-solarized-dark.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-git-20150917-solarized-light.diff | 65-----------------------------------------------------------------
Dst.suckless.org/patches/st-git-20150920-openbsd.diff | 27---------------------------
Dst.suckless.org/patches/st-git-20150922-spoiler.diff | 22----------------------
Dst.suckless.org/patches/st-git-20151106-scrollback-mouse.diff | 62--------------------------------------------------------------
Dst.suckless.org/patches/st-git-20151119-solarized-dark.diff | 68--------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20151119-solarized-light.diff | 68--------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20151217-scrollback.diff | 388-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20160131-argbbg.diff | 161-------------------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20160203-scrollback-mouse-altscreen.diff | 40----------------------------------------
Dst.suckless.org/patches/st-git-20160204-externalpipe.diff | 75---------------------------------------------------------------------------
Dst.suckless.org/patches/st-git-20160209-visualbell.diff | 42------------------------------------------
Dst.suckless.org/patches/st-git-20160210-copyurl.diff | 88-------------------------------------------------------------------------------
Ast.suckless.org/patches/st-hidecursor-0.5.diff | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-hidecursor-0.6.diff | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-hidecursor-20160727-308bfbf.diff | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-no_bold_colors-0.5.diff | 13+++++++++++++
Ast.suckless.org/patches/st-no_bold_colors-0.6.diff | 13+++++++++++++
Ast.suckless.org/patches/st-no_bold_colors-20160727-308bfbf.diff | 13+++++++++++++
Ast.suckless.org/patches/st-openbsd-20160727-308bfbf.diff | 27+++++++++++++++++++++++++++
Ast.suckless.org/patches/st-scrollback-20160727-308bfbf.diff | 387+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-scrollback-mouse-20160727-308bfbf.diff | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-scrollback-mouse-altscreen-20160727-308bfbf.diff | 25+++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-both-20160727-308bfbf.diff | 189+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-dark-0.5.diff | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-dark-0.6.diff | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-dark-20160727-308bfbf.diff | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-light-0.5.diff | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-light-0.6.diff | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-solarized-light-20160727-308bfbf.diff | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ast.suckless.org/patches/st-spoiler-0.6.diff | 22++++++++++++++++++++++
Ast.suckless.org/patches/st-spoiler-20160727-308bfbf.diff | 22++++++++++++++++++++++
Ast.suckless.org/patches/st-visualbell-20160727-308bfbf.diff | 42++++++++++++++++++++++++++++++++++++++++++
Mst.suckless.org/patches/visualbell.md | 5+++--
Dst.suckless.org/patches/wordbreak.md | 29-----------------------------
Ast.suckless.org/screenshots/frign-2016-s.png | 0
Ast.suckless.org/screenshots/frign-2016.png | 0
Mst.suckless.org/screenshots/index.md | 2++
Msuckless.org/coding_style.md | 2+-
Msuckless.org/conference/2015.md | 15+++++++++++++++
Msuckless.org/conference/index.md | 29++++++++++++++++++++++++++++-
Msuckless.org/donations.md | 10+++++++++-
Msuckless.org/hacking.md | 44++++++++++++++++++++++++++++++++++++++------
Msuckless.org/index.md | 14+++++++++++---
Msuckless.org/other_projects.md | 3+++
Msuckless.org/people/maandree.md | 11+++++++----
Dsuckless.org/people/more_people.md | 74--------------------------------------------------------------------------
Asuckless.org/people/quinq.md | 11+++++++++++
Asuckless.org/people/~ more_people.md | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msuckless.org/philosophy.md | 1+
Msuckless.org/project_ideas.md | 3+++
Msuckless.org/rocks.md | 6++++++
Msuckless.org/sucks/index.md | 20+++++++++++---------
Msuckless.org/sucks/systemd.md | 4++++
Msurf.suckless.org/files/bmarks.md | 2+-
Msurf.suckless.org/files/bmarks_history.md | 2+-
Dsurf.suckless.org/files/skip_streaming_limits.md | 35-----------------------------------
Asurf.suckless.org/files/surfraw_as_searchengine.md | 28++++++++++++++++++++++++++++
Msurf.suckless.org/index.md | 5+++++
Msurf.suckless.org/patches/index.md | 31+++----------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.1.1-xmms.diff | 130-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.2.1-tok.diff | 101-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.4-follow-focus.diff | 21---------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.4-tok.diff | 103-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.4.1-multisel.diff | 60------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.4.1-xft.diff | 405-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-fuzzymatch.diff | 135-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-hide-single-newline.diff | 12------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-monarg.diff | 101-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-mouse-support.diff | 142-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-xft-debian.diff | 418-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-xft-improved.diff | 425-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.5-xft.diff | 418-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.6-line-height.diff | 99-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.6-mouse-support-msel.diff | 154-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.6-vertfull.diff | 20--------------------
Dtools.suckless.org/dmenu/patches/dmenu-4.6-xyw.diff | 87-------------------------------------------------------------------------------
Atools.suckless.org/dmenu/patches/dmenu-fuzzymatch-4.6.diff | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/dmenu/patches/dmenu-git-20151020-fuzzymatch.diff | 135-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-git-20160111-hide-single-newline.diff | 12------------
Dtools.suckless.org/dmenu/patches/dmenu-git-xft.diff | 450-------------------------------------------------------------------------------
Atools.suckless.org/dmenu/patches/dmenu-incremental-20160702-3c91eed.diff | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-instant-20160702-3c91eed.diff | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-instant-4.6.diff | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/dmenu/patches/dmenu-instant.diff | 38--------------------------------------
Atools.suckless.org/dmenu/patches/dmenu-lineheight-4.6.diff | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-mousesupport-20160702-3c91eed.diff | 156+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-mousesupport-4.6.diff | 156+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/dmenu/patches/dmenu-ms_nl.diff | 79-------------------------------------------------------------------------------
Atools.suckless.org/dmenu/patches/dmenu-navhistory-4.6.diff | 173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-nonblockingstdin-20160702-3c91eed.diff | 248+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-pipeout-20160701-3c91eed.diff | 44++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/dmenu/patches/dmenu-tip-history.diff | 149-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-tip-incremental.diff | 62--------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/dmenu-tip-non-blocking-stdin.diff | 110-------------------------------------------------------------------------------
Atools.suckless.org/dmenu/patches/dmenu-vertfull-4.6.diff | 20++++++++++++++++++++
Atools.suckless.org/dmenu/patches/dmenu-xyw-4.6.diff | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/dmenu/patches/dmenu_xmms.diff | 133-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/follow-focus.md | 12------------
Mtools.suckless.org/dmenu/patches/fuzzymatch.md | 5++---
Dtools.suckless.org/dmenu/patches/hide-single-newline.md | 19-------------------
Dtools.suckless.org/dmenu/patches/history.md | 32--------------------------------
Mtools.suckless.org/dmenu/patches/incremental.md | 2+-
Mtools.suckless.org/dmenu/patches/index.md | 30+++---------------------------
Mtools.suckless.org/dmenu/patches/instant.md | 3++-
Dtools.suckless.org/dmenu/patches/legacy/allow-kp_decimal-in-dmenu.patch | 12------------
Dtools.suckless.org/dmenu/patches/legacy/dmenu-4.0-paste.diff | 27---------------------------
Dtools.suckless.org/dmenu/patches/legacy/dmenu-4.0-vertical_meillo.diff | 221-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/legacy/dmenu_path-cls.c | 100-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/legacy/dmenu_path.c | 376-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/legacy/dmenu_path.md | 11-----------
Dtools.suckless.org/dmenu/patches/legacy/index.md | 4----
Dtools.suckless.org/dmenu/patches/legacy/kp_decimal.md | 14--------------
Dtools.suckless.org/dmenu/patches/legacy/paste.md | 23-----------------------
Dtools.suckless.org/dmenu/patches/legacy/vertical.md | 14--------------
Mtools.suckless.org/dmenu/patches/line-height.md | 4+---
Dtools.suckless.org/dmenu/patches/monarg.md | 17-----------------
Dtools.suckless.org/dmenu/patches/mouse-support-msel.md | 19-------------------
Mtools.suckless.org/dmenu/patches/mouse-support.md | 7+++++--
Dtools.suckless.org/dmenu/patches/multisel.md | 12------------
Dtools.suckless.org/dmenu/patches/multiselect_and_newline.md | 19-------------------
Atools.suckless.org/dmenu/patches/navhistory.md | 19+++++++++++++++++++
Mtools.suckless.org/dmenu/patches/non_blocking_stdin.md | 6++----
Atools.suckless.org/dmenu/patches/pipeout.md | 22++++++++++++++++++++++
Mtools.suckless.org/dmenu/patches/vertfull.md | 2+-
Dtools.suckless.org/dmenu/patches/xft.md | 29-----------------------------
Dtools.suckless.org/dmenu/patches/xmms-like_pattern_matching.md | 34----------------------------------
Dtools.suckless.org/dmenu/patches/xrdb.diff | 85-------------------------------------------------------------------------------
Dtools.suckless.org/dmenu/patches/xrdb.md | 16----------------
Mtools.suckless.org/dmenu/patches/xyw.md | 2+-
Mtools.suckless.org/farbfeld/farbfeld.svg | 2+-
Mtools.suckless.org/farbfeld/index.md | 9++++++---
Mtools.suckless.org/farbfeld/invert.c | 55+++++++++++++++++++++++++++++--------------------------
Atools.suckless.org/ii/patches/ii-1.7-ucspi.diff | 165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtools.suckless.org/ii/patches/index.md | 30+++---------------------------
Mtools.suckless.org/ii/patches/ssl.md | 2+-
Atools.suckless.org/ii/patches/ucspi.md | 20++++++++++++++++++++
Mtools.suckless.org/sent/index.md | 39+++++++++++++++++++--------------------
Mtools.suckless.org/sent/patches/index.md | 30+++---------------------------
Mtools.suckless.org/sic/patches/index.md | 30+++---------------------------
Mtools.suckless.org/slock/index.md | 8++++++++
Atools.suckless.org/slock/patches/control-clear.md | 20++++++++++++++++++++
Atools.suckless.org/slock/patches/index.md | 5+++++
Atools.suckless.org/slock/patches/pam_auth.md | 20++++++++++++++++++++
Atools.suckless.org/slock/patches/quickcancel.md | 28++++++++++++++++++++++++++++
Atools.suckless.org/slock/patches/slock-git-20160406-control-clear.diff | 26++++++++++++++++++++++++++
Atools.suckless.org/slock/patches/slock-pam_auth.diff | 137+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/slock/patches/slock-quickcancel-20160619-65b8d52.diff | 47+++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/slock/patches/slock-terminalkeys-20160618-65b8d52.diff | 27+++++++++++++++++++++++++++
Atools.suckless.org/slock/patches/terminalkeys.md | 29+++++++++++++++++++++++++++++
Mtools.suckless.org/tabbed/patches/clientnumber.md | 4++--
Mtools.suckless.org/tabbed/patches/index.md | 31+++----------------------------
Mtools.suckless.org/tabbed/patches/keycode.md | 4++--
Dtools.suckless.org/tabbed/patches/tabbed-0.6-keycode.diff | 113-------------------------------------------------------------------------------
Atools.suckless.org/tabbed/patches/tabbed-clientnumber-0.6.diff | 23+++++++++++++++++++++++
Dtools.suckless.org/tabbed/patches/tabbed-clientnumber-20160103-eb0ff62.patch | 23-----------------------
Atools.suckless.org/tabbed/patches/tabbed-clientnumber-20160702-bc23614.diff | 23+++++++++++++++++++++++
Atools.suckless.org/tabbed/patches/tabbed-keycode-0.6.diff | 113+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtools.suckless.org/tabbed/patches/tabbed-keycode-20160103-eb0ff62.patch | 110-------------------------------------------------------------------------------
Atools.suckless.org/tabbed/patches/tabbed-keycode-20160702-bc23614.diff | 110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
458 files changed, 12055 insertions(+), 12179 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ # these files are ignored by git *.html +test diff --git a/core.suckless.org/index.md b/core.suckless.org/index.md @@ -7,3 +7,4 @@ Useful external components -------------------------- * [mksh](https://www.mirbsd.org/mksh.htm) * [musl libc](http://www.musl-libc.org/) +* [one true awk](http://www.cs.princeton.edu/~bwk/btl.mirror/) diff --git a/dwm.suckless.org/dwmstatus/index.md b/dwm.suckless.org/dwmstatus/index.md @@ -17,16 +17,17 @@ This is a barebone project you can use for changing it to your needs. User submitted versions ----------------------- -Please add your own version of dwmstatus here. +Please add your own version of dwmstatus here (keeping the list sorted). -* [dwm-bar.c](https://github.com/wifiextender/dwm-bar) - Display overall usage about: cpu and cpu temperature, ram, disk, installed packages, kernel, motherboard voltage, system fans and their speed in RPM, motherboard (name, vendor, temperature), volume and time. I've wrote the code myself, so it is unique. +* [barM](barM.c) - can display all, time/date, ram usage, output of commands (the New BarMonitor). +* [dstat](https://www.umaxx.net/dl) [Screenshot](https://www.umaxx.net/dstat.png) - displays the current network throughput, CPU usage, performance settings, battery status, temperature, volume settings, as well as the current date and time (OpenBSD only, no support for Linux). +* [pinky-bar](https://github.com/wifiextender/pinky-bar) - Display overall usage about: cpu (vendor, stepping, family, temperature) and maximum clock speed regardless of the used cpu frequency governor, ram, disk, installed packages, kernel, voltage, system fans and their speed in RPM, motherboard (name, vendor, temperature), volume, time, the name of currently played song, consumed internet bandwidth, upload and download speeds, disk I/O. * [dwmsd](https://github.com/johnko/dwmsd) - a daemon that listens on localhost tcp (may be useful as a base for asynchronous updates) +* [go-dwmstatus](https://github.com/oniichaNj/go-dwmstatus) - A Go bar that prints current MPD song, load averages, time/date and battery percentage. +* [gods](https://github.com/schachmat/gods) - implemented in Go. prints network speed, cpu, ram, date/time * [profil-dwmstatus-1.0.c](profil-dwmstatus-1.0.c) - cpufreq, battery percent and date/time +* **slstatus** - suckless alternative to Bash scripts (inefficient) and Conky (bloated for this use) - it displays various system information and can be customized via config.h - [cgit](https://git.nulltime.net/slstatus), [GitHub](https://github.com/drkh5h/slstatus) * [suspend-statusbar.c](https://github.com/akozadaev/dwm-statusbar) - loadavg, wifi, battery and date. If battery goes below threshold - run suspend command -* [gods](https://github.com/schachmat/gods) - implemented in Go. prints network speed, cpu, ram, date/time -* [go-dwmstatus](https://github.com/oniichaNj/go-dwmstatus) - A Go bar that prints current MPD song, load averages, time/date and battery percentage. -* [barM](barM.c) - can display all, time/date, ram usage, output of commands (the New BarMonitor). -* slstatus - suckless statusbar - written in pure c without any system() - includes wifi percentage, battery, cpu usage and temperature, ram usage, alsa volume and time / date - [GitHub](https://github.com/drkh5h/slstatus), [Download](slstatus.tar.gz) Helper functions ---------------- @@ -34,6 +35,7 @@ Helper functions If you have simple C functions for gathering system information, please add them here as file or as code example. +* [Basic ALSA Volume API example with error checks and handling](volume.c) * [Support for ACPI battery status Linux](new-acpi-battery.c) * [Reading out a temperature from /sys](dwmstatus-temperature.c) * [Reading up-, and downspeeds of all network interfaces from /proc/net](dwmstatus-netusage.c) diff --git a/dwm.suckless.org/dwmstatus/slstatus.tar.gz b/dwm.suckless.org/dwmstatus/slstatus.tar.gz Binary files differ. diff --git a/dwm.suckless.org/dwmstatus/volume.c b/dwm.suckless.org/dwmstatus/volume.c @@ -0,0 +1,100 @@ +/* + Copyright 07/20/2016 Aaron Caffrey https://github.com/wifiextender + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + Compile with: + gcc -Wall -Wextra -O2 volume.c -o test -lasound +*/ + +#include <stdio.h> +#include <stdlib.h> + +#include <alsa/asoundlib.h> + +#define ALSA_ERR "Error: alsa failed" + +void exit_with_err(const char *); +void get_sound(void); + +int main(void) { + get_sound(); + return EXIT_SUCCESS; +} + +void +exit_with_err(const char *str1) { + printf("%s\n", str1); + exit(EXIT_FAILURE); +} + +void +get_sound(void) { + snd_mixer_t *handle = NULL; + snd_mixer_elem_t *elem = NULL; + snd_mixer_selem_id_t *s_elem = NULL; + long int vol, max, min; + + if (0 < (snd_mixer_open(&handle, 0))) { + exit_with_err(ALSA_ERR); + } + + if (0 < (snd_mixer_attach(handle, "default"))) { + goto error; + } + + if (0 < (snd_mixer_selem_register(handle, NULL, NULL))) { + goto error; + } + + if (0 < (snd_mixer_load(handle))) { + goto error; + } + + snd_mixer_selem_id_malloc(&s_elem); + if (NULL == s_elem) { + goto error; + } + + snd_mixer_selem_id_set_name(s_elem, "Master"); + if (NULL == (elem = snd_mixer_find_selem(handle, s_elem))) { + goto error; + } + + /* Use `set' to change the current volume value */ + if (0 < (snd_mixer_selem_get_playback_volume(elem, 0, &vol))) { + goto error; + } + snd_mixer_selem_get_playback_volume_range(elem, &min, &max); + + snd_mixer_selem_id_free(s_elem); + snd_mixer_close(handle); + + printf("%s %ld%%\n", "Volume set to", (vol * 100) / max); + return; + +/* stay cheesy no matter what */ +error: + if (NULL != s_elem) { + snd_mixer_selem_id_free(s_elem); + s_elem = NULL; + } + if (NULL != handle) { + snd_mixer_close(handle); + handle = NULL; + } + exit_with_err(ALSA_ERR); +} diff --git a/dwm.suckless.org/index.md b/dwm.suckless.org/index.md @@ -78,12 +78,9 @@ Miscellaneous Related discussion ------------------ -* <http://hashfire.com/?p=29> * <https://www.ghcif.de/tag/dynamic-window-manager/> (German) -* <http://musicmatze.wordpress.com/2012/02/04/mein-dwm-dynamic-window-manager/> (German) * [dwm blog post in Persian](http://efazati.blog.ir/post/DWM-%D8%B1%D8%A7%D9%87%DA%A9%D8%A7%D8%B1-%D9%85%D9%86%D8%A7%D8%B3%D8%A8%DB%8C-%D8%A8%D8%B1%D8%A7%DB%8C-%D9%85%D8%AF%DB%8C%D8%B1%DB%8C%D8%AA-%D9%BE%D9%86%D8%AC%D8%B1%D9%87-%D9%87%D8%A7-%D8%AF%D8%B1-%D9%84%DB%8C%D9%86%D9%88%DA%A9%D8%B3) * <http://www.gambaru.de/blog/2011/12/10/elitare-fenstermanager-sind-vielleicht-doch-einfacher-zu-bedienen-als-gedacht/> -* <http://fsk141.com/dwm-colors> * <http://www.linuxjournal.com/content/going-fast-dwm> * <http://www.linuxgoodies.com/review_dwm.html> * <http://www.iyiz.com/20-most-simple-and-cool-x-window-managers-for-linux/> @@ -91,14 +88,38 @@ Related discussion * <http://danielkaes.wordpress.com/2009/12/03/adding-a-pidgin-trayicon-to-dwm/> * <http://openmindlifestyle.wordpress.com/2009/11/28/howto-compile-and-configure-dwm-tiling-window-manager-on-ubuntu/> * <http://lsetc.wordpress.com/2009/11/27/gno-more-gnome/> -* <http://steveno.wordpress.com/2007/05/30/dwm-and-slim/> * <http://www.youtube.com/watch?v=F2sYPwuRPvc> * <http://houst0n.wordpress.com/2009/12/20/dwm-the-dynamic-window-manager-for-solaris/> * <http://the-monkeymind.blogspot.com/2007/03/dwm-dynamic-window-manager-home-page-at.html> * <http://tonytraductor.livejournal.com/120674.html> -* <http://www.halbmoendli.ch/blog/archive/2007/03/31/dwm-dynamic-window-manager.html> -* <http://peterstuifzand.nl/20060816212719.html> * <http://forums.debian.net/viewtopic.php?f=16&t=65110> * <http://wongdev.com/blog/dwm-tags-are-not-workspaces/> * [dwm usage and configuration page (french)](http://yeuxdelibad.net/Logiciel-libre/Suckless/dwm/index.html) - +* <http://www.youtube.com/watch?v=GQ5s6T25jCc> +* <https://srobb.net/dwm.html> +* <http://rhunter.org/blog/2012/04/17/dwm-a-tutorial-for-beginners/> +* <https://cannibalcandy.wordpress.com/2012/04/26/installing-and-configuring-dwm-under-ubuntu/> +* <http://blog.yjl.im/2011/07/two-weeks-with-dwm.html> +* <http://www.murga-linux.com/puppy/viewtopic.php?p=258224> +* <http://opensourceforu.com/2012/03/tiling-window-managers-getting-started-with-dwm/> + +related projects +---------------- +* [awesome](http://awesome.naquadah.org/) -- dwm fork with XCB, EWMH, Lua script, Xft, D-Bus, multihead.. support +* [awm](http://www.freaknet.org/alpt/src/alpt-wm/readme) -- (old) modified dwm with workspaces and /proc like interface +* [bwm](http://lists.suckless.org/dwm/0708/3085.html) -- (old) modified dwm with extensive mouse support +* [cons-wm](http://github.com/dharmatech/psilab/tree/master/cons-wm) -- minimalist wm in scheme (not tiled) +* [bug.n](https://github.com/fuhsjr00/bug.n) -- dwm for Windows written in AutoHotkey +* [dvtm](http://www.brain-dump.org/projects/dvtm/) -- virtual terminal manager (dwm on the console) +* [dwm-gtx](http://s01.de/~gottox/index.cgi/proj_dwm) -- dwm branch with Xinerama support, pointer movement, different layout +* [dwm-sprinkles](http://0mark.unserver.de/dwm-sprinkles/) -- dwm with colorfull bar, transparency, pre-configured pertag and more +* [dwm-win32](http://www.brain-dump.org/projects/dwm-win32/) -- dwm ported to windows +* [echinus](http://www.rootshell.be/~polachok/code/) -- dwm fork with EWMH, Xft support +* [gemini](http://gemini.digitalmediaplanet.net) -- terminal manager +* [i3](http://i3.zekjur.net/) -- wmii fork with XCB, multihead, vertical column, command mode +* [musca](http://aerosuidae.net/musca.html) -- inspired by dwm, more complex layout, configurable with commands, EWMH support +* [qtile](http://www.qtile.org/) -- pure python wm, used ideas from dwm +* [scrotwm](http://www.peereboom.us/scrotwm/html/scrotwm.html) -- dwm clone with multihead, config file, restart.. support +* [TAL/wm](http://talwm.sourceforge.net/) -- minimal tiled wm based on dwm (discontinued) +* [teslawm](http://teslawm.org/) -- dwm fork with multihead, mouse, stdin commands support (was dwm-rfigura) +* [xmonad](http://www.xmonad.org/) -- dwm clone in haskell diff --git a/dwm.suckless.org/patches/alpha.md b/dwm.suckless.org/patches/alpha.md @@ -0,0 +1,24 @@ +alpha +===== + +->[![Screenshot](dwm-alpha.png)](dwm-alpha.png)<- + +Description +----------- + +Allow dwm to have translucent bars, while keeping all the text on it opaque, +just like the [alpha-patch for st](http://st.suckless.org/patches/alpha). + + +Download +-------- + + * [dwm-alpha-6.1.diff](dwm-alpha-6.1.diff) + * [TODO] git port + + +Authors +------- + + * Eon S. Jeon - <esjeon@hyunmu.am> + * Laslo Hunhold - <dev@frign.de> (6.1 port) diff --git a/dwm.suckless.org/patches/alwaysfullscreen.md b/dwm.suckless.org/patches/alwaysfullscreen.md @@ -4,15 +4,17 @@ alwaysfullscreen Description ----------- -Do not allow focus to drift from the active fullscreen client when using -focusstack(). +Do not allow the focus to drift from the active fullscreen client when +using focusstack(). Download -------- -* [dwm-cdec978-alwaysfullscreen.diff](dwm-cdec978-alwaysfullscreen.diff) (323b) (20140220) +* [dwm-alwaysfullscreen-6.1.diff](dwm-alwaysfullscreen-6.1.diff) +* [dwm-alwaysfullscreen-20160713-56a31dc.diff](dwm-alwaysfullscreen-20160713-56a31dc.diff) -Author ------- +Authors +------- -* [Chris Down](https://chrisdown.name) (cdown) <chris@chrisdown.name> +* Chris Down - <chris@chrisdown.name> +* Laslo Hunhold - <dev@frign.de> (6.1, git ports) diff --git a/dwm.suckless.org/patches/argbcolor.md b/dwm.suckless.org/patches/argbcolor.md @@ -1,27 +0,0 @@ -ARGBColor -========== - -->[![Screenshot](dwm-argbcolor.png)](dwm-argbcolor.png)<- - -Description ------------ - -Allow dwm to have translucent bars, while keeping all the text on it opaque, -just like [ARGB patch for st][1]. - - -Download --------- - - * [dwm-3465bed-argbcolor.diff](dwm-3465bed-argbcolor.diff) (20160307) - - -Author ------- - - * Eon S. Jeon <esjeon@hyunmu.am> - - -[1]: http://st.suckless.org/patches/argbbg - - diff --git a/dwm.suckless.org/patches/attachabove.md b/dwm.suckless.org/patches/attachabove.md @@ -3,20 +3,20 @@ attachabove Description ----------- -`attachabove` makes new clients attach above the selected client (instead of -always becoming the new master) - basically how Xmonad does it. + +Make new clients attach above the selected client, instead of +always becoming the new master. This behaviour is known from Xmonad. Download -------- -Patches against different versions of dwm are available at -[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.1-attachabove.diff](dwm-6.1-attachabove.diff) (1829b) (20151122) - * [dwm-git-20120406-attachabove.diff](dwm-git-20120406-attachabove.diff) (1709b) - * [dwm-6.0-attachabove.diff](dwm-6.0-attachabove.diff) (1707b) (20120406) - * [dwm-5.6.1-attachabove.diff](historical/dwm-5.6.1-attachabove.diff) (1.1K) (20090817) + * [dwm-attachabove-6.0.diff](dwm-attachabove-6.0.diff) + * [dwm-attachabove-6.1.diff](dwm-attachabove-6.1.diff) + * [dwm-attachabove-20160713-56a31dc.diff](dwm-attachabove-20160713-56a31dc.diff) + +Authors +------- -Author ------- * Mate Nagy - <mnagy@port70.net> - * Rewritten by Jan Christoph Ebersbach - <jceb@e-jc.de> + * Jan Christoph Ebersbach - <jceb@e-jc.de> (6.0, 6.1 ports) + * Laslo Hunhold - <dev@frign.de> (git port) diff --git a/dwm.suckless.org/patches/attachaside.md b/dwm.suckless.org/patches/attachaside.md @@ -3,9 +3,10 @@ attachaside Description ----------- -`attachaside` makes the new client get attached and focused in the stacking + +Make new clients get attached and focused in the stacking area instead of always becoming the new master. It's basically an -[attachabove](attachabove) mod. +[attachabove](attachabove) modification. Original behaviour : +-----------------+-------+ @@ -44,23 +45,12 @@ area instead of always becoming the new master. It's basically an Download -------- -### Version updated to work with tags - -The original version of attachaside does does not attach to the stack when -windows are spawned on a tag that is not currently focused. This version is -improved to also attach to the stack on unfocused tags. - -* [dwm-6.1-attachaside-tagfix.diff](dwm-6.1-attachaside-tagfix.diff) (2.9K) (20150729) - -### Original - -* [dwm-6.0-attachaside.diff](dwm-6.0-attachaside.diff) (1,6K) (20140412) -* [dwm-5.7.2-attachaside.diff](historical/dwm-5.7.2-attachaside.diff) (1.1K) (20091215) -* [dwm-5.6.1-attachaside.diff](historical/dwm-5.6.1-attachaside.diff) (1.1K) (20090915) +* [dwm-attachaside-6.1.diff](dwm-attachaside-6.1.diff) +* [dwm-attachaside-20160718-56a31dc.diff](dwm-attachaside-20160718-56a31dc.diff) Authors ------- -* Jerome Andrieux - `<jerome at gcu dot info>` -* Version updated to work with tags by [Chris Down](https://chrisdown.name) - (cdown) <chris@chrisdown.name> -* Update to 6.0 by Vladimir Seleznev - `<me at wladmis dot org>` + +* Jerome Andrieux - <jerome@gcu.info> +* Chris Down - <chris@chrisdown.name> (6.1 port and fixes) +* Laslo Hunhold - <dev@frign.de> (git port) diff --git a/dwm.suckless.org/patches/autoresize.md b/dwm.suckless.org/patches/autoresize.md @@ -1,14 +1,21 @@ -# autoresize +autoresize +========== -## Description +Description +----------- -By default, windows that are not visible when requesting a resize/move wont get resized/moved. With this Patch, they do. +By default, windows that are not visible when requesting a resize/move +won't get resized/moved. With this patch, they will. -## Download +Download +-------- - * [autoresize.diff](autoresize.diff) autoresize.diff (07.03.2010) - * [dwm-6.0-autoresize.diff](dwm-6.0-autoresize.diff) (15.04.2013) + * [dwm-autoresize-6.0.diff](dwm-autoresize-6.0.diff) + * [dwm-autoresize-6.1.diff](dwm-autoresize-6.1.diff) + * [dwm-autoresize-20160718-56a31dc.diff](dwm-autoresize-20160718-56a31dc.diff) -## Author +Authors +------- * Stefan Mark - <0mark@unserver.de> + * Laslo Hunhold - <dev@frign.de> (6.1, git ports) diff --git a/dwm.suckless.org/patches/autostart.md b/dwm.suckless.org/patches/autostart.md @@ -1,15 +0,0 @@ -# autostart # - -## Description ## -This patch will make dwm run "~/.dwm/autostart_blocking.sh" and "~/.dwm/autostart.sh &" (in that order) before entering the handler loop. One or both of these files can be ommited. - -Be aware that dwm will not startup as long as autostart_blocking.sh is running and will stay completely unresponive until its completion. For obvious reasons it is generally a bad idea to start X-applications here :) - -## Download ## -### 6.0 - * [dwm-6.0-autostart.diff](dwm-6.0-autostart.diff) (1kb) (20121220) - * [from github](https://github.com/axelGschaider/dwm-patch-autostart.sh) - -## Author ## - * Axel Gschaider: <axel.gschaider@gmail.com> - diff --git a/dwm.suckless.org/patches/azertykey.md b/dwm.suckless.org/patches/azertykey.md @@ -1,20 +0,0 @@ -# frenchkey - -## Description - -### En français -Ce patch a pour but de remplacer les raccourcis par défaut de dwm, qui ne sont pas compatibles avec les claviers azerty (pour les français par exemple). -En somme, les chiffres 1 2 3 ... 9 0 sont remplacés par le code des touches & é ... ç à. - -La touche querty / est quand à elle remplacée par : . -Ainsi, toutes les fonctions de dwm restent accessibles malgré tout. - -Le patch est en fait une simple modification du config.h - -### English -This patch is a config.h modification to use tagging shortcuts with azerty keyboards, which have different layout for numbers and for the key / . - -## Download - - * [dwm-azertykey.diff](dwm-azertykey.diff) dwm-azertykey.diff (22.04.2011) - diff --git a/dwm.suckless.org/patches/better-borders.md b/dwm.suckless.org/patches/better-borders.md @@ -1,25 +0,0 @@ -better borders -============== - -Description ------------ - -Like [Ebersbach's patch](http://dwm.suckless.org/patches/noborder), this patch -removes the border when there is only one window visible, but this patch does -not depend on layout-specific changes and should automatically work with most -layouts. The patch also removes borders from any windows that are the same size -as the monitor and marks them full-screen even if their X properties indicate -otherwise. This eliminates nuisance borders that appear with some games and -applications while in full-screen mode. - -Thanks to Alesandar Metodiev for reporting a bug that lead to the patch being -rewritten. - -Download --------- - - * [dwm-6.1-better-borders.diff](dwm-6.1-better-borders.diff) (2015-12-27) - -Author ------- - * Eric Pruitt - `<eric dot pruitt at gmail dot com>` diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md @@ -1,49 +0,0 @@ -bottom stack -============ - -Description ------------ -`bstack` and `bstackhoriz` are two bottom stack layouts for dwm. - -Bottom Stack Tiling -------------------- - - bstack (TTT) - +-----------------+ - | | - | | - | | - +-----+-----+-----+ - | | | | - | | | | - +-----+-----+-----+ - - bstackhoriz (===) - +-----------------+ - | | - | | - | | - +-----------------+ - +-----------------+ - +-----------------+ - +-----------------+ - -Download --------- - -### 6.1 - -* `tile`-like `htile` implementation, similar to `bstack` [dwm-6.1-htile.diff](dwm-6.1-htile.diff) - -### 6.0 -* Not for use with pertag patch: [dwm-6.0-bstack.diff](dwm-6.0-bstack.diff) - -### 5.9 -* Not for use with pertag patch: [dwm-5.9-bstack.diff](historical/dwm-5.9-bstack.diff) -* For use with pertag patch: [dwm-5.9-bstack-alt.diff](historical/dwm-5.9-bstack-alt.diff) - -### 5.8 -* Not for use with pertag patch: [dwm-5.8.2-bstack.diff](historical/dwm-5.8.2-bstack.diff) -* For use with pertag patch: [dwm-5.8.2-bstack-alt.diff](historical/dwm-5.8.2-bstack-alt.diff) -* see older versions in [historical patches](historical) - diff --git a/dwm.suckless.org/patches/bottommargin.md b/dwm.suckless.org/patches/bottommargin.md @@ -1,13 +0,0 @@ -# bottommargin - -## Description - -Adds a variable margin at the bottom for status or notification bars - -## Download - - * [dwm-6.0-bottommargin.diff](dwm-6.0-bottommargin.diff) dwm-6.0-bottommargin.diff (07.06.2014) - -## Author - - * Julian A. diff --git a/dwm.suckless.org/patches/bottomstack.md b/dwm.suckless.org/patches/bottomstack.md @@ -0,0 +1,31 @@ +bottomstack +=========== + +Description +----------- + +`bstack` and `bstackhoriz` are two stack layouts for dwm. + + bstack (TTT) bstackhoriz (===) + +-----------------+ +-----------------+ + | | | | + | | | | + | | | | + +-----+-----+-----+ +-----------------+ + | | | | +-----------------+ + | | | | +-----------------+ + +-----+-----+-----+ +-----------------+ + +`bstack` can be selected with [Alt]+[u], `bstackhoriz` with [Alt]+[o]. + +Download +-------- + + * [dwm-bottomstack-6.1.diff](dwm-bottomstack-6.1.diff) + * [dwm-bottomstack-20160719-56a31dc.diff](dwm-bottomstack-20160719-56a31dc.diff) + +Authors +------- + + * Anselm R Garbe - <anselm@garbe.us> + * Laslo Hunhold - <dev@frign.de> (6.1, git ports) diff --git a/dwm.suckless.org/patches/center.md b/dwm.suckless.org/patches/center.md @@ -4,16 +4,17 @@ center Description ----------- -Adds an "iscentered" rule to automatically center clients on the current +Add an `iscentered` rule to automatically center clients on the current monitor. Download -------- -* [dwm-6.1-center.diff](dwm-6.1-center.diff) (2k) (20151114) -* [dwm-cdec978-center.diff](historical/dwm-cdec978-center.diff) (2k) (20140123) + * [dwm-center-6.1.diff](dwm-center-6.1.diff) + * [dwm-center-20160719-56a31dc.diff](dwm-center-20160719-56a31dc.diff) -Author ------- +Authors +------- -* [Chris Down](https://chrisdown.name) (cdown) <chris@chrisdown.name> + * Chris Down - <chris@chrisdown.name> + * Laslo Hunhold - <dev@frign.de> (git port) diff --git a/dwm.suckless.org/patches/centeredmaster.c b/dwm.suckless.org/patches/centeredmaster.c @@ -1,91 +0,0 @@ -void -centeredfloatingmaster(Monitor *m) { - unsigned int i, n, w, mh, mw, mx, mxo, my, myo, tx; - Client *c; - - // Count number of clients in the selected monitor - for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if(n == 0) - return; - - // initialize nmaster area - if(n > m->nmaster) { - // go mfact box in the center if more than nmaster clients - if(m->ww > m->wh) { - mw = m->nmaster ? m->ww * m->mfact : 0; - mh = m->nmaster ? m->wh * 0.9 : 0; - } else { - mh = m->nmaster ? m->wh * m->mfact : 0; - mw = m->nmaster ? m->ww * 0.9 : 0; - } - mx = mxo = (m->ww - mw) / 2; - my = myo = (m->wh - mh) / 2; - } else { - // Go fullscreen if all clients are in the master area - mh = m->wh; - mw = m->ww; - mx = mxo = 0; - my = myo = 0; - } - for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if(i < m->nmaster) { - // nmaster clients are stacked horizontally, in the center of the screen - w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i); - resize(c, m->wx + mx, m->wy + my, w - (2*c->bw), mh - (2*c->bw), False); - mx += WIDTH(c); - } else { - // Stack clients are stacked horizontally - w = (m->ww - tx) / (n - i); - resize(c, m->wx + tx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False); - tx += WIDTH(c); - } -} - -void -centeredmaster(Monitor *m) { - unsigned int i, n, h, mw, mx, my, oty, ety, tw; - Client *c; - - // Count number of clients in the selected monitor - for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if(n == 0) - return; - - // initialize areas - mw = m->ww; - mx = 0; - my = 0; - tw = mw; - - if(n > m->nmaster) { - // go mfact box in the center if more than nmaster clients - mw = m->nmaster ? m->ww * m->mfact : 0; - tw = m->ww - mw; - - if (n - m->nmaster > 1) { // only one client - mx = (m->ww - mw) / 2; - tw = (m->ww - mw) / 2; - } - } - - oty = 0; - ety = 0; - for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if(i < m->nmaster) { - // nmaster clients are stacked verticaly, in the center of the screen - h = (m->wh - my) / (MIN(n, m->nmaster) - i); - resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False); - my += HEIGHT(c); - } else { - // Stack clients are stacked verticaly - if ((i - m->nmaster) % 2 ) { - h = (m->wh - ety) / ( (1 + n - i) / 2); - resize(c, m->wx, m->wy + ety, tw - (2*c->bw), h - (2*c->bw), False); - ety += HEIGHT(c); - } else { - h = (m->wh - oty) / ((1 + n - i) / 2); - resize(c, m->wx + mx + mw, m->wy + oty, tw - (2*c->bw), h - (2*c->bw), False); - oty += HEIGHT(c); - } - } -} diff --git a/dwm.suckless.org/patches/centeredmaster.md b/dwm.suckless.org/patches/centeredmaster.md @@ -1,94 +1,63 @@ -# centeredmaster - -## `centeredmaster` - -makes the nmaster area centered -on screen, using `mfact * monitor width & height`, with the stacked windows -distributed on left and right. - -With one client in master: - - +------------------------------+ - |+--------++--------++--------+| - || || || || - || || || || - || || || || - || S2 || M || S1 || - || || || || - || || || || - || || || || - || || || || - |+--------++--------++--------+| - +------------------------------+ - -With two clients in master: - - +------------------------------+ - |+--------++--------++--------+| - || || || || - || || M1 || || - || || || || - || |+--------+| || - || |+--------+| || - || || || || - || || M2 || || - || || || || - |+--------++--------++--------+| - +------------------------------+ - -## `centeredfloatingmaster` - -makes the nmaster area centered -on screen, using `mfact * monitor width & height`, over an -horizontally tiled `stack` area, pretty much like -a "scratchpad". - -With one client in master: - - +------------------------------+ - |+--------++--------++--------+| - || || || || - || +------------------+ || - || | | || - || | | || - || | M | || - || | | || - || +------------------+ || - || || || || - |+--------++--------++--------+| - +------------------------------+ - -With two clients in master: - - +------------------------------+ - |+--------++--------++--------+| - || || || || - || +--------++--------+ || - || | || | || - || | || | || - || | M1 || M2 | || - || | || | || - || +--------++--------+ || - || || || || - |+--------++--------++--------+| - +------------------------------+ - - -I find it useful on large screens (say 1920px wide), where -`monocle` or `htile` feels either too large or makes me type in -a corner of the screen. - -With `centeredmaster`, for instance, I can set my editor in the -center, while keeping an eye on what's happening in the windows -behind (logs, tests, ...). - - - - -## Links - -* [centeredmaster.c](centeredmaster.c) - 2015/11/22 -* [dwm-6.1-centeredmaster.diff](dwm-6.1-centeredmaster.diff) - 2015/11/21 - - -[jerome](http://blog.jardinmagique.info) <jerome@gcu.info> +centeredmaster +============== + +Description +----------- + +`centeredmaster` and `centeredfloatingmaster` are two stack layouts for dwm. + +`centeredmaster` centers the nmaster area on screen, using +`mfact * monitor width & height`, with the stacked windows +distributed to the left and right. It can be selected with [Alt]+[u]. + +With one and two clients in master respectively this results in: + + +------------------------------+ +------------------------------+ + |+--------++--------++--------+| |+--------++--------++--------+| + || || || || || || || || + || || || || || || M1 || || + || || || || || || || || + || S2 || M || S1 || || |+--------+| || + || || || || || |+--------+| || + || || || || || || || || + || || || || || || M2 || || + || || || || || || || || + |+--------++--------++--------+| |+--------++--------++--------+| + +------------------------------+ +------------------------------+ + +`centeredfloatingmaster` centers the nmaster area on screen, using +`mfact * monitor width & height` over a horizontally tiled `stack` area, +comparable to a scratchpad. It can be selected with [Alt]+[o]. + +With one and two clients in master respectively this results in: + + +------------------------------+ +------------------------------+ + |+--------++--------++--------+| |+--------++--------++--------+| + || || || || || || || || + || +------------------+ || || +--------++--------+ || + || | | || || | || | || + || | | || || | || | || + || | M | || || | M1 || M2 | || + || | | || || | || | || + || +------------------+ || || +--------++--------+ || + || || || || || || || || + |+--------++--------++--------+| |+--------++--------++--------+| + +------------------------------+ +------------------------------+ + +These stack layouts can be useful on large screens, where `monocle` or +`htile` might be either too large or forcing the user to type in a corner +of the screen. +They allow for instance to center the editor while being able to keep an +eye on background processes (logs, tests,...) + +Download +-------- + + * [dwm-centeredmaster-6.1.diff](dwm-centeredmaster-6.1.diff) + * [dwm-centeredmaster-20160719-56a31dc.diff](dwm-centeredmaster-20160719-56a31dc.diff) + +Authors +------- + + * [Jérôme Andrieux](http://blog.jardinmagique.info) - <jerome@gcu.info> + * Laslo Hunhold - <dev@frign.de> (6.1, git ports) diff --git a/dwm.suckless.org/patches/clientspertag.md b/dwm.suckless.org/patches/clientspertag.md @@ -41,7 +41,7 @@ will result on swapping between the defined value and -1. ## Download - * [dwm-5.6.1-cpt.diff](dwm-5.6.1-cpt.diff) (2.9k) (20090913) + * [dwm-clientspertag-5.6.1.diff](dwm-clientspertag-5.6.1.diff) ## Maintainer diff --git a/dwm.suckless.org/patches/columns.md b/dwm.suckless.org/patches/columns.md @@ -3,27 +3,18 @@ columns Description ----------- -This patch adds an extra layout to dwm called `col` in which the windows are -arranged in colums of equal size. The number of columns is always nmaster + 1, -and the last column is a stack of leftover windows just like the normal tile -layout. + +This patch adds an extra layout to dwm called `col` in which the windows in the +master area are arranged in colums of equal size. The number of columns is +always nmaster + 1, and the last column is a stack of leftover windows just +like the normal tile layout. It effectively acts like the default tiling mode, +except provides for vertical instead of horizontal master windows. Download -------- -* [dwm-r1580-col.diff](dwm-r1580-col.diff) +* [dwm-columns-6.0.diff](dwm-columns-6.0.diff) Author ------ * Evan Gates (emg)<evan.gates@gmail.com> - -Special Version ---------------- -This patch tweaks the one above to respect the master width % (mfact in config.h) -and resizings. So instead of the entire screen divided into even columns only -the master portion is, with the remaining space becoming the last column for the -stack. It effectively acts like the default tiling mode, except provides for -vertical instead of horizontal master windows. - -* [dwm-6.0-column_master.diff](dwm-6.0-column_master.diff) - -* noah dot rosser gmail +* Noah Rosser <noah.rosser@gmail.com> diff --git a/dwm.suckless.org/patches/combo.md b/dwm.suckless.org/patches/combo.md @@ -18,9 +18,9 @@ and view so you could replace all usages if you wanted. Download -------- - * [dwm-5.9-combo.diff](dwm-5.9-combo.diff) - 2010-10-30 - * [dwm-6.0-combo.diff](dwm-6.0-combo.diff) - 2012-10-09 - * [dwm-6.1-combo.diff](dwm-6.1-combo.diff) - 2016-01-22 + * [dwm-combo-5.9.diff](dwm-combo-5.9.diff) - 2010-10-30 + * [dwm-combo-6.0.diff](dwm-combo-6.0.diff) - 2012-10-09 + * [dwm-combo-6.1.diff](dwm-combo-6.1.diff) - 2016-01-22 Author ------ diff --git a/dwm.suckless.org/patches/current_desktop.md b/dwm.suckless.org/patches/current_desktop.md @@ -23,7 +23,7 @@ ## Download - * [dwm-5.8.2-current_desktop.diff](dwm-5.8.2-current_desktop.diff) (dwm 2010604) + * [dwm-current_desktop-5.8.2.diff](dwm-current_desktop-5.8.2.diff) (dwm 2010604) ## Author diff --git a/dwm.suckless.org/patches/dualstatus.md b/dwm.suckless.org/patches/dualstatus.md @@ -11,8 +11,8 @@ xsetroot -name "top text;bottom text" Download -------- - * [dwm-6.1-dualstatus.diff](dwm-6.1-dualstatus.diff) (4683b) (20151110) - * [dwm-6.0-dualstatus.diff](dwm-6.0-dualstatus.diff) (4794b) (20130908) + * [dwm-dualstatus-6.1.diff](dwm-dualstatus-6.1.diff) (4683b) (20151110) + * [dwm-dualstatus-6.0.diff](dwm-dualstatus-6.0.diff) (4794b) (20130908) Screenshot ---------- diff --git a/dwm.suckless.org/patches/dwm-10e232f9ace7-float_border_color2.diff b/dwm.suckless.org/patches/dwm-10e232f9ace7-float_border_color2.diff @@ -1,84 +0,0 @@ -URL: http://dwm.suckless.org/patches/historical/float_border_color -float_border_color2 allows you to specify a different border color for floating -windows. - -diff -r 10e232f9ace7 config.def.h ---- a/config.def.h Sun Mar 25 17:49:35 2012 +0200 -+++ b/config.def.h Fri Apr 06 08:16:29 2012 +0200 -@@ -8,6 +8,8 @@ - static const char selbordercolor[] = "#005577"; - static const char selbgcolor[] = "#005577"; - static const char selfgcolor[] = "#eeeeee"; -+static const char floatnormbordercolor[] = "#005577"; -+static const char floatselbordercolor[] = "#005577"; - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ -diff -r 10e232f9ace7 dwm.c ---- a/dwm.c Sun Mar 25 17:49:35 2012 +0200 -+++ b/dwm.c Fri Apr 06 08:16:29 2012 +0200 -@@ -57,7 +57,7 @@ - - /* enums */ - enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ --enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ -+enum { ColBorder, ColFG, ColBG, ColBorderFloat, ColLast }; /* color */ - enum { NetSupported, NetWMName, NetWMState, - NetWMFullscreen, NetActiveWindow, NetWMWindowType, - NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ -@@ -857,7 +857,10 @@ - detachstack(c); - attachstack(c); - grabbuttons(c, True); -- XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); -+ if(c->isfloating) -+ XSetWindowBorder(dpy, c->win, dc.sel[ColBorderFloat]); -+ else -+ XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); - setfocus(c); - } - else { -@@ -1159,6 +1162,8 @@ - c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -+ if(c->isfloating) -+ XSetWindowBorder(dpy, w, dc.norm[ColBorderFloat]); - attach(c); - attachstack(c); - XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, -@@ -1633,9 +1638,11 @@ - dc.norm[ColBorder] = getcolor(normbordercolor); - dc.norm[ColBG] = getcolor(normbgcolor); - dc.norm[ColFG] = getcolor(normfgcolor); -+ dc.norm[ColBorderFloat] = getcolor(floatnormbordercolor); - dc.sel[ColBorder] = getcolor(selbordercolor); - dc.sel[ColBG] = getcolor(selbgcolor); - dc.sel[ColFG] = getcolor(selfgcolor); -+ dc.sel[ColBorderFloat] = getcolor(floatselbordercolor); - dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen)); - dc.gc = XCreateGC(dpy, root, 0, NULL); - XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); -@@ -1760,6 +1767,10 @@ - return; - selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; - if(selmon->sel->isfloating) -+ XSetWindowBorder(dpy, selmon->sel->win, dc.sel[ColBorderFloat]); -+ else -+ XSetWindowBorder(dpy, selmon->sel->win, dc.sel[ColBorder]); -+ if(selmon->sel->isfloating) - resize(selmon->sel, selmon->sel->x, selmon->sel->y, - selmon->sel->w, selmon->sel->h, False); - else if(selmon->sel->isfullscreen) -@@ -1797,7 +1808,10 @@ - if(!c) - return; - grabbuttons(c, False); -- XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); -+ if(c->isfloating) -+ XSetWindowBorder(dpy, c->win, dc.norm[ColBorderFloat]); -+ else -+ XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); - if(setfocus) { - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); - XDeleteProperty(dpy, root, netatom[NetActiveWindow]); diff --git a/dwm.suckless.org/patches/dwm-20151110-5ed9c48-keycode.patch b/dwm.suckless.org/patches/dwm-20151110-5ed9c48-keycode.patch @@ -1,146 +0,0 @@ -From 6a9c5bc422a68a40d5eb2b873fa01d59d6c5bd50 Mon Sep 17 00:00:00 2001 -From: Quentin Rameau <quinq@fifth.space> -Date: Tue, 10 Nov 2015 19:09:20 +0100 -Subject: [PATCH] Use keycodes instead of keysyms - ---- - config.def.h | 68 ++++++++++++++++++++++++++++++------------------------------ - dwm.c | 15 +++++--------- - 2 files changed, 39 insertions(+), 44 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 7054c06..f59d1eb 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -58,40 +58,40 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, - static const char *termcmd[] = { "st", NULL }; - - static Key keys[] = { -- /* modifier key function argument */ -- { MODKEY, XK_p, spawn, {.v = dmenucmd } }, -- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, -- { MODKEY, XK_b, togglebar, {0} }, -- { MODKEY, XK_j, focusstack, {.i = +1 } }, -- { MODKEY, XK_k, focusstack, {.i = -1 } }, -- { MODKEY, XK_i, incnmaster, {.i = +1 } }, -- { MODKEY, XK_d, incnmaster, {.i = -1 } }, -- { MODKEY, XK_h, setmfact, {.f = -0.05} }, -- { MODKEY, XK_l, setmfact, {.f = +0.05} }, -- { MODKEY, XK_Return, zoom, {0} }, -- { MODKEY, XK_Tab, view, {0} }, -- { MODKEY|ShiftMask, XK_c, killclient, {0} }, -- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, -- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, -- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -- { MODKEY, XK_space, setlayout, {0} }, -- { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, -- { MODKEY, XK_0, view, {.ui = ~0 } }, -- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, -- { MODKEY, XK_comma, focusmon, {.i = -1 } }, -- { MODKEY, XK_period, focusmon, {.i = +1 } }, -- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, -- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -- TAGKEYS( XK_1, 0) -- TAGKEYS( XK_2, 1) -- TAGKEYS( XK_3, 2) -- TAGKEYS( XK_4, 3) -- TAGKEYS( XK_5, 4) -- TAGKEYS( XK_6, 5) -- TAGKEYS( XK_7, 6) -- TAGKEYS( XK_8, 7) -- TAGKEYS( XK_9, 8) -- { MODKEY|ShiftMask, XK_q, quit, {0} }, -+ /* modifier key function argument */ -+ { MODKEY, 33, spawn, {.v = dmenucmd } }, // p -+ { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return -+ { MODKEY, 56, togglebar, {0} }, // b -+ { MODKEY, 44, focusstack, {.i = +1 } }, // j -+ { MODKEY, 45, focusstack, {.i = -1 } }, // k -+ { MODKEY, 31, incnmaster, {.i = +1 } }, // i -+ { MODKEY, 40, incnmaster, {.i = -1 } }, // d -+ { MODKEY, 43, setmfact, {.f = -0.05} }, // h -+ { MODKEY, 46, setmfact, {.f = +0.05} }, // l -+ { MODKEY, 36, zoom, {0} }, // Return -+ { MODKEY, 23, view, {0} }, // Tab -+ { MODKEY|ShiftMask, 54, killclient, {0} }, // c -+ { MODKEY, 28, setlayout, {.v = &layouts[0]} }, // t -+ { MODKEY, 41, setlayout, {.v = &layouts[1]} }, // f -+ { MODKEY, 58, setlayout, {.v = &layouts[2]} }, // m -+ { MODKEY, 65, setlayout, {0} }, // space -+ { MODKEY|ShiftMask, 65, togglefloating, {0} }, // space -+ { MODKEY, 19, view, {.ui = ~0 } }, // 0 -+ { MODKEY|ShiftMask, 19, tag, {.ui = ~0 } }, // 0 -+ { MODKEY, 59, focusmon, {.i = -1 } }, // comma -+ { MODKEY, 60, focusmon, {.i = +1 } }, // period -+ { MODKEY|ShiftMask, 59, tagmon, {.i = -1 } }, // comma -+ { MODKEY|ShiftMask, 60, tagmon, {.i = +1 } }, // period -+ TAGKEYS( 10, 0) // 1 -+ TAGKEYS( 11, 1) // 2 -+ TAGKEYS( 12, 2) // 3 -+ TAGKEYS( 13, 3) // 4 -+ TAGKEYS( 14, 4) // 5 -+ TAGKEYS( 15, 5) // 6 -+ TAGKEYS( 16, 6) // 7 -+ TAGKEYS( 17, 7) // 8 -+ TAGKEYS( 18, 8) // 9 -+ { MODKEY|ShiftMask, 24, quit, {0} }, // q - }; - - /* button definitions */ -diff --git a/dwm.c b/dwm.c -index 0362114..60dd817 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -31,7 +31,6 @@ - #include <sys/types.h> - #include <sys/wait.h> - #include <X11/cursorfont.h> --#include <X11/keysym.h> - #include <X11/Xatom.h> - #include <X11/Xlib.h> - #include <X11/Xproto.h> -@@ -101,7 +100,7 @@ struct Client { - - typedef struct { - unsigned int mod; -- KeySym keysym; -+ KeyCode keycode; - void (*func)(const Arg *); - const Arg arg; - } Key; -@@ -967,14 +966,12 @@ grabkeys(void) - { - unsigned int i, j; - unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; -- KeyCode code; - - XUngrabKey(dpy, AnyKey, AnyModifier, root); - for (i = 0; i < LENGTH(keys); i++) -- if ((code = XKeysymToKeycode(dpy, keys[i].keysym))) -- for (j = 0; j < LENGTH(modifiers); j++) -- XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, -- True, GrabModeAsync, GrabModeAsync); -+ for (j = 0; j < LENGTH(modifiers); j++) -+ XGrabKey(dpy, keys[i].keycode, keys[i].mod | modifiers[j], root, -+ True, GrabModeAsync, GrabModeAsync); - } - } - -@@ -1001,13 +998,11 @@ void - keypress(XEvent *e) - { - unsigned int i; -- KeySym keysym; - XKeyEvent *ev; - - ev = &e->xkey; -- keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); - for (i = 0; i < LENGTH(keys); i++) -- if (keysym == keys[i].keysym -+ if (ev->keycode == keys[i].keycode - && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) - && keys[i].func) - keys[i].func(&(keys[i].arg)); --- -2.6.2 - diff --git a/dwm.suckless.org/patches/dwm-3465bed-argbcolor.diff b/dwm.suckless.org/patches/dwm-3465bed-argbcolor.diff @@ -1,269 +0,0 @@ -From db0f6c99b236aafb33c21cc57ad4ec493ab4d3b2 Mon Sep 17 00:00:00 2001 -From: "Eon S. Jeon" <esjeon@hyunmu.am> -Date: Mon, 7 Mar 2016 20:17:24 +0900 -Subject: [PATCH] implement ARGB color support - ---- - config.def.h | 2 ++ - config.mk | 2 +- - drw.c | 22 +++++++++---------- - drw.h | 7 ++++-- - dwm.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- - 5 files changed, 78 insertions(+), 25 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 7054c06..4448d46 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -11,6 +11,8 @@ static const char normfgcolor[] = "#bbbbbb"; - static const char selbordercolor[] = "#005577"; - static const char selbgcolor[] = "#005577"; - static const char selfgcolor[] = "#eeeeee"; -+static unsigned int baralpha = 0xd0; -+static unsigned int borderalpha = OPAQUE; - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const int showbar = 1; /* 0 means no bar */ -diff --git a/config.mk b/config.mk -index 80dc936..2c62e89 100644 ---- a/config.mk -+++ b/config.mk -@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 - - # includes and libs - INCS = -I${X11INC} -I${FREETYPEINC} --LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender - - # flags - CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -diff --git a/drw.c b/drw.c -index f49200b..12e3ebc 100644 ---- a/drw.c -+++ b/drw.c -@@ -61,7 +61,7 @@ utf8decode(const char *c, long *u, size_t clen) - } - - Drw * --drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h) -+drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap) - { - Drw *drw; - -@@ -71,8 +71,11 @@ drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h - drw->root = root; - drw->w = w; - drw->h = h; -- drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen)); -- drw->gc = XCreateGC(dpy, root, 0, NULL); -+ drw->visual = visual; -+ drw->depth = depth; -+ drw->cmap = cmap; -+ drw->drawable = XCreatePixmap(dpy, root, w, h, depth); -+ drw->gc = XCreateGC(dpy, drw->drawable, 0, NULL); - drw->fontcount = 0; - XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter); - -@@ -86,7 +89,7 @@ drw_resize(Drw *drw, unsigned int w, unsigned int h) - drw->h = h; - if (drw->drawable) - XFreePixmap(drw->dpy, drw->drawable); -- drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen)); -+ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, drw->depth); - } - - void -@@ -180,16 +183,15 @@ drw_font_free(Fnt *font) - } - - Clr * --drw_clr_create(Drw *drw, const char *clrname) -+drw_clr_create(Drw *drw, const char *clrname, unsigned int alpha) - { - Clr *clr; - - clr = ecalloc(1, sizeof(Clr)); -- if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen), -- DefaultColormap(drw->dpy, drw->screen), -+ if (!XftColorAllocName(drw->dpy, drw->visual, drw->cmap, - clrname, &clr->rgb)) - die("error, cannot allocate color '%s'\n", clrname); -- clr->pix = clr->rgb.pixel; -+ clr->pix = (clr->rgb.pixel & 0x00ffffffU) | (alpha << 24); - - return clr; - } -@@ -245,9 +247,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *tex - XSetForeground(drw->dpy, drw->gc, invert ? - drw->scheme->fg->pix : drw->scheme->bg->pix); - XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h); -- d = XftDrawCreate(drw->dpy, drw->drawable, -- DefaultVisual(drw->dpy, drw->screen), -- DefaultColormap(drw->dpy, drw->screen)); -+ d = XftDrawCreate(drw->dpy, drw->drawable, drw->visual, drw->cmap); - } - - curfont = drw->fonts[0]; -diff --git a/drw.h b/drw.h -index e3b8515..1fed824 100644 ---- a/drw.h -+++ b/drw.h -@@ -30,6 +30,9 @@ typedef struct { - Display *dpy; - int screen; - Window root; -+ Visual *visual; -+ unsigned int depth; -+ Colormap cmap; - Drawable drawable; - GC gc; - ClrScheme *scheme; -@@ -43,7 +46,7 @@ typedef struct { - } Extnts; - - /* Drawable abstraction */ --Drw *drw_create(Display *, int, Window, unsigned int, unsigned int); -+Drw *drw_create(Display *, int, Window, unsigned int, unsigned int, Visual*, unsigned int, Colormap); - void drw_resize(Drw *, unsigned int, unsigned int); - void drw_free(Drw *); - -@@ -55,7 +58,7 @@ void drw_font_getexts(Fnt *, const char *, unsigned int, Extnts *); - unsigned int drw_font_getexts_width(Fnt *, const char *, unsigned int); - - /* Colour abstraction */ --Clr *drw_clr_create(Drw *, const char *); -+Clr *drw_clr_create(Drw *, const char *, unsigned int); - void drw_clr_free(Clr *); - - /* Cursor abstraction */ -diff --git a/dwm.c b/dwm.c -index ff7e096..286fb10 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -57,6 +57,8 @@ - #define TAGMASK ((1 << LENGTH(tags)) - 1) - #define TEXTW(X) (drw_text(drw, 0, 0, 0, 0, (X), 0) + drw->fonts[0]->h) - -+#define OPAQUE 0xffU -+ - /* enums */ - enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ - enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ -@@ -232,6 +234,7 @@ static Monitor *wintomon(Window w); - static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); -+static void xinitvisual(); - static void zoom(const Arg *arg); - - /* variables */ -@@ -267,6 +270,11 @@ static Drw *drw; - static Monitor *mons, *selmon; - static Window root; - -+static int useargb = 0; -+static Visual *visual; -+static int depth; -+static Colormap cmap; -+ - /* configuration, allows nested code to access above variables */ - #include "config.h" - -@@ -1561,7 +1569,8 @@ setup(void) - sw = DisplayWidth(dpy, screen); - sh = DisplayHeight(dpy, screen); - root = RootWindow(dpy, screen); -- drw = drw_create(dpy, screen, root, sw, sh); -+ xinitvisual(); -+ drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap); - drw_load_fonts(drw, fonts, LENGTH(fonts)); - if (!drw->fontcount) - die("no fonts could be loaded.\n"); -@@ -1585,12 +1594,12 @@ setup(void) - cursor[CurResize] = drw_cur_create(drw, XC_sizing); - cursor[CurMove] = drw_cur_create(drw, XC_fleur); - /* init appearance */ -- scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor); -- scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor); -- scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor); -- scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor); -- scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor); -- scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor); -+ scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor, borderalpha); -+ scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor, baralpha); -+ scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor, OPAQUE); -+ scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor, borderalpha); -+ scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor, baralpha); -+ scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor, OPAQUE); - /* init bars */ - updatebars(); - updatestatus(); -@@ -1803,15 +1812,17 @@ updatebars(void) - Monitor *m; - XSetWindowAttributes wa = { - .override_redirect = True, -- .background_pixmap = ParentRelative, -+ .background_pixel = 0, -+ .border_pixel = 0, -+ .colormap = cmap, - .event_mask = ButtonPressMask|ExposureMask - }; - for (m = mons; m; m = m->next) { - if (m->barwin) - continue; -- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), -- CopyFromParent, DefaultVisual(dpy, screen), -- CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); -+ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, depth, -+ InputOutput, visual, -+ CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa); - XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); - XMapRaised(dpy, m->barwin); - } -@@ -2112,6 +2123,43 @@ xerrorstart(Display *dpy, XErrorEvent *ee) - } - - void -+xinitvisual() -+{ -+ XVisualInfo *infos; -+ XRenderPictFormat *fmt; -+ int nitems; -+ int i; -+ -+ XVisualInfo tpl = { -+ .screen = screen, -+ .depth = 32, -+ .class = TrueColor -+ }; -+ long masks = VisualScreenMask | VisualDepthMask | VisualClassMask; -+ -+ infos = XGetVisualInfo(dpy, masks, &tpl, &nitems); -+ visual = NULL; -+ for(i = 0; i < nitems; i ++) { -+ fmt = XRenderFindVisualFormat(dpy, infos[i].visual); -+ if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { -+ visual = infos[i].visual; -+ depth = infos[i].depth; -+ cmap = XCreateColormap(dpy, root, visual, AllocNone); -+ useargb = 1; -+ break; -+ } -+ } -+ -+ XFree(infos); -+ -+ if (! visual) { -+ visual = DefaultVisual(dpy, screen); -+ depth = DefaultDepth(dpy, screen); -+ cmap = DefaultColormap(dpy, screen); -+ } -+} -+ -+void - zoom(const Arg *arg) - { - Client *c = selmon->sel; --- -2.1.4 - diff --git a/dwm.suckless.org/patches/dwm-6.0-attachabove.diff b/dwm.suckless.org/patches/dwm-6.0-attachabove.diff @@ -1,63 +0,0 @@ -Author: Jan Christoph Ebersbach <jceb@e-jc.de> -URL: http://dwm.suckless.org/patches/attachabove -attachabove makes new clients attach above the selected client (instead of -always becoming the new master) – basically how Xmonad does it. - -diff -r ec4baab78314 dwm.c ---- a/dwm.c Mon Dec 19 15:38:30 2011 +0100 -+++ b/dwm.c Fri Apr 06 08:23:34 2012 +0200 -@@ -160,6 +160,7 @@ - static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); -+static void attachabove(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -418,6 +419,19 @@ - } - - void -+attachabove(Client *c) { -+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { -+ attach(c); -+ return; -+ } -+ -+ Client *at; -+ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -@@ -1155,7 +1169,7 @@ - c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachabove(c); - attachstack(c); - XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ - setclientstate(c, NormalState); -@@ -1480,7 +1494,7 @@ - detachstack(c); - c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ -- attach(c); -+ attachabove(c); - attachstack(c); - focus(NULL); - arrange(NULL); -@@ -1900,7 +1914,7 @@ - m->clients = c->next; - detachstack(c); - c->mon = mons; -- attach(c); -+ attachabove(c); - attachstack(c); - } - if(m == selmon) diff --git a/dwm.suckless.org/patches/dwm-6.0-attachaside.diff b/dwm.suckless.org/patches/dwm-6.0-attachaside.diff @@ -1,57 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..b2aa1c8 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -146,6 +146,7 @@ static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool inter - static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); -+static void attachaside(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -401,6 +402,17 @@ attach(Client *c) { - } - - void -+attachaside(Client *c) { -+ Client *at = nexttiled(c->mon->clients); -+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) { -+ attach(c); -+ return; -+ } -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -@@ -1051,7 +1063,7 @@ manage(Window w, XWindowAttributes *wa) { - c->isfloating = c->oldstate = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachaside(c); - attachstack(c); - XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, - (unsigned char *) &(c->win), 1); -@@ -1383,7 +1395,7 @@ sendmon(Client *c, Monitor *m) { - detachstack(c); - c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ -- attach(c); -+ attachaside(c); - attachstack(c); - focus(NULL); - arrange(NULL); -@@ -1818,7 +1830,7 @@ updategeom(void) { - m->clients = c->next; - detachstack(c); - c->mon = mons; -- attach(c); -+ attachaside(c); - attachstack(c); - } - if(m == selmon) diff --git a/dwm.suckless.org/patches/dwm-6.0-autoresize.diff b/dwm.suckless.org/patches/dwm-6.0-autoresize.diff @@ -1,35 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index e3bf6f4..8a2c646 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -91,7 +91,7 @@ struct Client { - int basew, baseh, incw, inch, maxw, maxh, minw, minh; - int bw, oldbw; - unsigned int tags; -- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; - Client *next; - Client *snext; - Monitor *mon; -@@ -633,6 +633,8 @@ configurerequest(XEvent *e) { - configure(c); - if(ISVISIBLE(c)) - XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); -+ else -+ c->needresize=1; - } - else - configure(c); -@@ -1663,6 +1665,12 @@ showhide(Client *c) { - return; - if(ISVISIBLE(c)) { /* show clients top down */ - XMoveWindow(dpy, c->win, c->x, c->y); -+ if(c->needresize) { -+ c->needresize=0; -+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); -+ } else { -+ XMoveWindow(dpy, c->win, c->x, c->y); -+ } - if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) - resize(c, c->x, c->y, c->w, c->h, False); - showhide(c->snext); diff --git a/dwm.suckless.org/patches/dwm-6.0-autostart.diff b/dwm.suckless.org/patches/dwm-6.0-autostart.diff @@ -1,32 +0,0 @@ -diff -r c794a9f5ae5e dwm.c ---- a/dwm.c Sun Jul 08 09:45:53 2012 +0200 -+++ b/dwm.c Tue Oct 02 16:26:04 2012 +0200 -@@ -213,6 +213,7 @@ - static void resizemouse(const Arg *arg); - static void restack(Monitor *m); - static void run(void); -+static void runAutostart(void); - static void scan(void); - static Bool sendevent(Client *c, Atom proto); - static void sendmon(Client *c, Monitor *m); -@@ -1460,6 +1461,12 @@ - } - - void -+runAutostart(void) { -+ system("cd ~/.dwm; ./autostart_blocking.sh"); -+ system("cd ~/.dwm; ./autostart.sh &"); -+} -+ -+void - scan(void) { - unsigned int i, num; - Window d1, d2, *wins = NULL; -@@ -2178,6 +2185,7 @@ - checkotherwm(); - setup(); - scan(); -+ runAutostart(); - run(); - cleanup(); - XCloseDisplay(dpy); diff --git a/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff b/dwm.suckless.org/patches/dwm-6.0-bottommargin.diff @@ -1,26 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 77ff358..203d354 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -12,6 +12,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const Bool showbar = True; /* False means no bar */ - static const Bool topbar = True; /* False means bottom bar */ -+static const unsigned int bottommargin = 20; /* Margin at the bottom for another bar */ - - /* tagging */ - static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -diff --git a/dwm.c b/dwm.c -index 1d78655..cece290 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -1841,6 +1841,9 @@ updatebarpos(Monitor *m) { - m->wh = m->mh; - if(m->showbar) { - m->wh -= bh; -+ m->wh -= marginbottom; -+ if(!m->topbar) -+ m->wy += marginbottom; - m->by = m->topbar ? m->wy : m->wy + m->wh; - m->wy = m->topbar ? m->wy + bh : m->wy; - } diff --git a/dwm.suckless.org/patches/dwm-6.0-bstack.diff b/dwm.suckless.org/patches/dwm-6.0-bstack.diff @@ -1,91 +0,0 @@ -diff -r ec4baab78314 bstack.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/bstack.c Tue Feb 28 11:28:54 2012 -0500 -@@ -0,0 +1,33 @@ -+static void -+bstack(Monitor *m) { -+ int w, h, mh, mx, tx, ty, tw; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ if(n > m->nmaster) { -+ mh = m->nmaster ? m->mfact * m->wh : 0; -+ tw = m->ww / (n - m->nmaster); -+ ty = m->wy + mh; -+ } -+ else { -+ mh = m->wh; -+ tw = m->ww; -+ ty = m->wy; -+ } -+ for(i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if(i < m->nmaster) { -+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), False); -+ mx += WIDTH(c); -+ } -+ else { -+ h = m->wh - mh; -+ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), False); -+ if(tw != m->ww) -+ tx += WIDTH(c); -+ } -+ } -+} -diff -r ec4baab78314 bstackhoriz.c ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/bstackhoriz.c Tue Feb 28 11:28:54 2012 -0500 -@@ -0,0 +1,31 @@ -+static void -+bstackhoriz(Monitor *m) { -+ int w, mh, mx, tx, ty, th; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ if(n > m->nmaster) { -+ mh = m->nmaster ? m->mfact * m->wh : 0; -+ th = (m->wh - mh) / (n - m->nmaster); -+ ty = m->wy + mh; -+ } -+ else { -+ th = mh = m->wh; -+ ty = m->wy; -+ } -+ for(i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if(i < m->nmaster) { -+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), False); -+ mx += WIDTH(c); -+ } -+ else { -+ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), False); -+ if(th != m->wh) -+ ty += HEIGHT(c); -+ } -+ } -+} -diff -r ec4baab78314 config.def.h ---- a/config.def.h Mon Dec 19 15:38:30 2011 +0100 -+++ b/config.def.h Tue Feb 28 11:28:54 2012 -0500 -@@ -27,11 +27,15 @@ static const float mfact = 0.55; /* - static const int nmaster = 1; /* number of clients in master area */ - static const Bool resizehints = True; /* True means respect size hints in tiled resizals */ - -+#include "bstack.c" -+#include "bstackhoriz.c" - static const Layout layouts[] = { - /* symbol arrange function */ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ diff --git a/dwm.suckless.org/patches/dwm-6.1-ispermanent.diff b/dwm.suckless.org/patches/dwm-6.0-ispermanent.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-keycode.diff b/dwm.suckless.org/patches/dwm-6.0-keycode.diff @@ -1,133 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 875885b..2ef8679 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -55,40 +55,40 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb - static const char *termcmd[] = { "st", NULL }; - - static Key keys[] = { -- /* modifier key function argument */ -- { MODKEY, XK_p, spawn, {.v = dmenucmd } }, -- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, -- { MODKEY, XK_b, togglebar, {0} }, -- { MODKEY, XK_j, focusstack, {.i = +1 } }, -- { MODKEY, XK_k, focusstack, {.i = -1 } }, -- { MODKEY, XK_i, incnmaster, {.i = +1 } }, -- { MODKEY, XK_d, incnmaster, {.i = -1 } }, -- { MODKEY, XK_h, setmfact, {.f = -0.05} }, -- { MODKEY, XK_l, setmfact, {.f = +0.05} }, -- { MODKEY, XK_Return, zoom, {0} }, -- { MODKEY, XK_Tab, view, {0} }, -- { MODKEY|ShiftMask, XK_c, killclient, {0} }, -- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, -- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, -- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -- { MODKEY, XK_space, setlayout, {0} }, -- { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, -- { MODKEY, XK_0, view, {.ui = ~0 } }, -- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, -- { MODKEY, XK_comma, focusmon, {.i = -1 } }, -- { MODKEY, XK_period, focusmon, {.i = +1 } }, -- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, -- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -- TAGKEYS( XK_1, 0) -- TAGKEYS( XK_2, 1) -- TAGKEYS( XK_3, 2) -- TAGKEYS( XK_4, 3) -- TAGKEYS( XK_5, 4) -- TAGKEYS( XK_6, 5) -- TAGKEYS( XK_7, 6) -- TAGKEYS( XK_8, 7) -- TAGKEYS( XK_9, 8) -- { MODKEY|ShiftMask, XK_q, quit, {0} }, -+ /* modifier key function argument */ -+ { MODKEY, 33, spawn, {.v = dmenucmd } }, // p -+ { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return -+ { MODKEY, 56, togglebar, {0} }, // b -+ { MODKEY, 44, focusstack, {.i = +1 } }, // j -+ { MODKEY, 45, focusstack, {.i = -1 } }, // k -+ { MODKEY, 31, incnmaster, {.i = +1 } }, // i -+ { MODKEY, 40, incnmaster, {.i = -1 } }, // d -+ { MODKEY, 43, setmfact, {.f = -0.05} }, // h -+ { MODKEY, 46, setmfact, {.f = +0.05} }, // l -+ { MODKEY, 36, zoom, {0} }, // Return -+ { MODKEY, 23, view, {0} }, // Tab -+ { MODKEY|ShiftMask, 54, killclient, {0} }, // c -+ { MODKEY, 28, setlayout, {.v = &layouts[0]} }, // t -+ { MODKEY, 41, setlayout, {.v = &layouts[1]} }, // f -+ { MODKEY, 58, setlayout, {.v = &layouts[2]} }, // m -+ { MODKEY, 65, setlayout, {0} }, // space -+ { MODKEY|ShiftMask, 65, togglefloating, {0} }, // space -+ { MODKEY, 19, view, {.ui = ~0 } }, // 0 -+ { MODKEY|ShiftMask, 19, tag, {.ui = ~0 } }, // 0 -+ { MODKEY, 59, focusmon, {.i = -1 } }, // comma -+ { MODKEY, 60, focusmon, {.i = +1 } }, // period -+ { MODKEY|ShiftMask, 59, tagmon, {.i = -1 } }, // comma -+ { MODKEY|ShiftMask, 60, tagmon, {.i = +1 } }, // period -+ TAGKEYS( 10, 0) // 1 -+ TAGKEYS( 11, 1) // 2 -+ TAGKEYS( 12, 2) // 3 -+ TAGKEYS( 13, 3) // 4 -+ TAGKEYS( 14, 4) // 5 -+ TAGKEYS( 15, 5) // 6 -+ TAGKEYS( 16, 6) // 7 -+ TAGKEYS( 17, 7) // 8 -+ TAGKEYS( 18, 8) // 9 -+ { MODKEY|ShiftMask, 24, quit, {0} }, // q - }; - - /* button definitions */ -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..54ddf00 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -31,7 +31,6 @@ - #include <sys/types.h> - #include <sys/wait.h> - #include <X11/cursorfont.h> --#include <X11/keysym.h> - #include <X11/Xatom.h> - #include <X11/Xlib.h> - #include <X11/Xproto.h> -@@ -100,7 +99,7 @@ struct Client { - - typedef struct { - unsigned int mod; -- KeySym keysym; -+ KeyCode keycode; - void (*func)(const Arg *); - const Arg arg; - } Key; -@@ -945,14 +944,12 @@ grabkeys(void) { - { - unsigned int i, j; - unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; -- KeyCode code; - - XUngrabKey(dpy, AnyKey, AnyModifier, root); - for(i = 0; i < LENGTH(keys); i++) -- if((code = XKeysymToKeycode(dpy, keys[i].keysym))) -- for(j = 0; j < LENGTH(modifiers); j++) -- XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, -- True, GrabModeAsync, GrabModeAsync); -+ for(j = 0; j < LENGTH(modifiers); j++) -+ XGrabKey(dpy, keys[i].keycode, keys[i].mod | modifiers[j], root, -+ True, GrabModeAsync, GrabModeAsync); - } - } - -@@ -976,13 +973,11 @@ isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info) { - void - keypress(XEvent *e) { - unsigned int i; -- KeySym keysym; - XKeyEvent *ev; - - ev = &e->xkey; -- keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); - for(i = 0; i < LENGTH(keys); i++) -- if(keysym == keys[i].keysym -+ if(ev->keycode == keys[i].keycode - && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) - && keys[i].func) - keys[i].func(&(keys[i].arg)); diff --git a/dwm.suckless.org/patches/dwm-6.0-pertag_without_bar.diff b/dwm.suckless.org/patches/dwm-6.0-pertag_without_bar.diff @@ -1,7 +1,7 @@ Author: Jan Christoph Ebersbach <jceb@e-jc.de>, Troy Sankey <sankeytms@gmail.com> This modified pertag patch keeps the bar static. It is based on Jan -Christoph Ebersbach's dwm-6.0-pertag.diff. +Christoph Ebersbach's dwm-pertag-6.0.diff. diff --git a/dwm.c b/dwm.c index 1d78655..bd0a7d9 100644 diff --git a/dwm.suckless.org/patches/dwm-6.0-single_window_no_border.diff b/dwm.suckless.org/patches/dwm-6.0-single_window_no_border.diff @@ -1,97 +0,0 @@ -Author: Jan Christoph Ebersbach <jceb@e-jc.de> -URL: http://dwm.suckless.org/patches/noborder -This patch removes the border when there is just one window visible in tiled or -monocle layout. - -diff -r ec4baab78314 dwm.c ---- a/dwm.c Mon Dec 19 15:38:30 2011 +0100 -+++ b/dwm.c Fri Apr 06 08:23:31 2012 +0200 -@@ -1191,7 +1191,7 @@ - - void - monocle(Monitor *m) { -- unsigned int n = 0; -+ unsigned int n = 0, r = 0; - Client *c; - - for(c = m->clients; c; c = c->next) -@@ -1199,8 +1199,17 @@ - n++; - if(n > 0) /* override layout symbol */ - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); -- for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) -- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, False); -+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) { -+ /* remove border when in monocle layout */ -+ if(c->bw) { -+ c->oldbw = c->bw; -+ c->bw = 0; -+ r = 1; -+ } -+ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False); -+ if(r) -+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); -+ } - } - - void -@@ -1703,7 +1712,7 @@ - - void - tile(Monitor *m) { -- unsigned int i, n, h, mw, my, ty; -+ unsigned int i, n, h, mw, my, ty, r; - Client *c; - - for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -@@ -1714,17 +1723,36 @@ - mw = m->nmaster ? m->ww * m->mfact : 0; - else - mw = m->ww; -- for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++, r = 0) { -+ if(n == 1) { -+ if (c->bw) { -+ /* remove border when only one window is on the current tag */ -+ c->oldbw = c->bw; -+ c->bw = 0; -+ r = 1; -+ } -+ } -+ else if(!c->bw && c->oldbw) { -+ /* restore border when more than one window is displayed */ -+ c->bw = c->oldbw; -+ c->oldbw = 0; -+ r = 1; -+ } - if(i < m->nmaster) { - h = (m->wh - my) / (MIN(n, m->nmaster) - i); - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False); -+ if(r) -+ resizeclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw)); - my += HEIGHT(c); - } - else { - h = (m->wh - ty) / (n - i); - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), False); -+ if(r) -+ resizeclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw)); - ty += HEIGHT(c); - } -+ } - } - - void -@@ -1741,6 +1769,12 @@ - return; - selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; - if(selmon->sel->isfloating) -+ /* restore border when moving window into floating mode */ -+ if(!selmon->sel->bw && selmon->sel->oldbw) { -+ selmon->sel->bw = selmon->sel->oldbw; -+ selmon->sel->oldbw = 0; -+ } -+ if(selmon->sel->isfloating) - resize(selmon->sel, selmon->sel->x, selmon->sel->y, - selmon->sel->w, selmon->sel->h, False); - arrange(selmon); diff --git a/dwm.suckless.org/patches/dwm-6.1-attachabove.diff b/dwm.suckless.org/patches/dwm-6.1-attachabove.diff @@ -1,63 +0,0 @@ -Author: Jan Christoph Ebersbach <jceb@e-jc.de> -URL: http://dwm.suckless.org/patches/attachabove -attachabove makes new clients attach above the selected client (instead of -always becoming the new master) - basically how Xmonad does it. - ---- dwm/dwm.c.orig 2015-11-22 10:48:28.288368772 -0700 -+++ dwm/dwm.c 2015-11-22 10:51:45.308360761 -0700 -@@ -147,6 +147,7 @@ static int applysizehints(Client *c, int - static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); -+static void attachabove(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -406,6 +407,20 @@ attach(Client *c) - } - - void -+attachabove(Client *c) -+{ -+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { -+ attach(c); -+ return; -+ } -+ -+ Client *at; -+ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) - { - c->snext = c->mon->stack; -@@ -1076,7 +1091,7 @@ manage(Window w, XWindowAttributes *wa) - c->isfloating = c->oldstate = trans != None || c->isfixed; - if (c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachabove(c); - attachstack(c); - XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, - (unsigned char *) &(c->win), 1); -@@ -1434,7 +1449,7 @@ sendmon(Client *c, Monitor *m) - detachstack(c); - c->mon = m; - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ -- attach(c); -+ attachabove(c); - attachstack(c); - focus(NULL); - arrange(NULL); -@@ -1891,7 +1906,7 @@ updategeom(void) - m->clients = c->next; - detachstack(c); - c->mon = mons; -- attach(c); -+ attachabove(c); - attachstack(c); - } - if (m == selmon) diff --git a/dwm.suckless.org/patches/dwm-6.1-better-borders.diff b/dwm.suckless.org/patches/dwm-6.1-better-borders.diff @@ -1,91 +0,0 @@ -Author: Eric Pruitt, https://github.com/ericpruitt/ -Description: This patch makes dwm remove borders when only one, non-floating -window is visible. Additionally, any windows that are the same size as the -monitor are considered full-screen and their borders removed accordingly. - -diff --git a/dwm.c b/dwm.c -index 0362114..03fddb6 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -393,9 +393,24 @@ arrange(Monitor *m) - void - arrangemon(Monitor *m) - { -+ int n = 0; -+ Client *c; - strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol); -- if (m->lt[m->sellt]->arrange) -- m->lt[m->sellt]->arrange(m); -+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if (n > 1 || !m->lt[m->sellt]->arrange) { -+ for (c = m->clients; c; c = c->next) { -+ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) { -+ c->oldbw = c->oldbw; -+ c->bw = borderpx; -+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); -+ } -+ } -+ if (m->lt[m->sellt]->arrange) { -+ m->lt[m->sellt]->arrange(m); -+ } -+ } else { -+ monocle(m); -+ } - } - - void -@@ -1117,16 +1132,25 @@ maprequest(XEvent *e) - void - monocle(Monitor *m) - { -- unsigned int n = 0; -+ unsigned int n = 0, r = 0; - Client *c; - - for (c = m->clients; c; c = c->next) - if (ISVISIBLE(c)) - n++; -- if (n > 0) /* override layout symbol */ -+ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* override layout symbol */ - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); -- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) -- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); -+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) { -+ if (c->bw) { -+ c->oldbw = c->bw; -+ c->bw = 0; -+ r = 1; -+ } -+ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False); -+ if(r) { -+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); -+ } -+ } - } - - void -@@ -1706,9 +1730,11 @@ togglefloating(const Arg *arg) - if (selmon->sel->isfullscreen) /* no support for fullscreen windows */ - return; - selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; -- if (selmon->sel->isfloating) -- resize(selmon->sel, selmon->sel->x, selmon->sel->y, -- selmon->sel->w, selmon->sel->h, 0); -+ if (selmon->sel->isfloating) { -+ selmon->sel->oldbw = selmon->sel->bw; -+ selmon->sel->bw = borderpx; -+ resizeclient(selmon->sel, selmon->wx, selmon->wy, selmon->ww - (2 * selmon->sel->bw), selmon->wh - (2 * selmon->sel->bw)); -+ } - arrange(selmon); - } - -@@ -2003,7 +2029,8 @@ updatewindowtype(Client *c) - Atom state = getatomprop(c, netatom[NetWMState]); - Atom wtype = getatomprop(c, netatom[NetWMWindowType]); - -- if (state == netatom[NetWMFullscreen]) -+ if(state == netatom[NetWMFullscreen] || -+ (WIDTH(c) >= (c->mon->mx + c->mon->mw) && (HEIGHT(c) >= (c->mon->my + c->mon->mh)))) - setfullscreen(c, 1); - if (wtype == netatom[NetWMWindowTypeDialog]) - c->isfloating = 1; diff --git a/dwm.suckless.org/patches/dwm-6.1-centeredmaster.diff b/dwm.suckless.org/patches/dwm-6.1-centeredmaster.diff @@ -1,59 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 0362114..fa5ae4c 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -209,6 +209,7 @@ static void spawn(const Arg *arg); - static void tag(const Arg *arg); - static void tagmon(const Arg *arg); - static void tile(Monitor *); -+static void centeredmaster(Monitor *); - static void togglebar(const Arg *arg); - static void togglefloating(const Arg *arg); - static void toggletag(const Arg *arg); -@@ -1690,6 +1691,46 @@ tile(Monitor *m) - } - - void -+centeredmaster(Monitor *m) -+{ -+ unsigned int i, n, w, mh, mw, mx, mxo, my, myo, tx; -+ Client *c; -+ -+ // Count number of clients in the selected monitor -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ -+ // initialize nmaster area -+ if(n > m->nmaster) { -+ // go mfact box in the center if more than nmaster clients -+ mw = m->nmaster ? m->ww * m->mfact : 0; -+ mh = m->nmaster ? m->wh * m->mfact : 0; -+ mx = mxo = (m->ww - mw) / 2; -+ my = myo = (m->wh - mh) / 2; -+ } else { -+ // Go fullscreen if all clients are in the master area -+ mh = m->wh; -+ mw = m->ww; -+ mx = mxo = 0; -+ my = mxo = 0; -+ } -+ -+ for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ if(i < m->nmaster) { -+ // nmaster clients are stacked horizontally, in the center of the screen -+ w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy + my, w - (2*c->bw), mh - (2*c->bw), False); -+ mx += WIDTH(c); -+ } else { -+ // Stack clients are stacked horizontally -+ w = (m->ww - tx) / (n - i); -+ resize(c, m->wx + tx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False); -+ tx += WIDTH(c); -+ } -+} -+ -+void - togglebar(const Arg *arg) - { - selmon->showbar = !selmon->showbar; diff --git a/dwm.suckless.org/patches/dwm-6.1-cfacts.diff b/dwm.suckless.org/patches/dwm-6.1-cfacts.diff @@ -1,8 +1,8 @@ diff --git a/config.def.h b/config.def.h -index 875885b..809788b 100644 +index 7054c06..9878dbf 100644 --- a/config.def.h +++ b/config.def.h -@@ -65,6 +65,9 @@ static Key keys[] = { +@@ -68,6 +68,9 @@ static Key keys[] = { { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, @@ -13,10 +13,10 @@ index 875885b..809788b 100644 { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, diff --git a/dwm.c b/dwm.c -index 1bbb4b3..4ff74cc 100644 +index 0362114..881afe6 100644 --- a/dwm.c +++ b/dwm.c -@@ -86,6 +86,7 @@ typedef struct Client Client; +@@ -87,6 +87,7 @@ typedef struct Client Client; struct Client { char name[256]; float mina, maxa; @@ -24,23 +24,23 @@ index 1bbb4b3..4ff74cc 100644 int x, y, w, h; int oldx, oldy, oldw, oldh; int basew, baseh, incw, inch, maxw, maxh, minw, minh; -@@ -200,6 +201,7 @@ static void setclientstate(Client *c, long state); +@@ -201,6 +202,7 @@ static void setclientstate(Client *c, long state); static void setfocus(Client *c); - static void setfullscreen(Client *c, Bool fullscreen); + static void setfullscreen(Client *c, int fullscreen); static void setlayout(const Arg *arg); +static void setcfact(const Arg *arg); static void setmfact(const Arg *arg); static void setup(void); static void showhide(Client *c); -@@ -1027,6 +1029,7 @@ manage(Window w, XWindowAttributes *wa) { +@@ -1052,6 +1054,7 @@ manage(Window w, XWindowAttributes *wa) c->w = c->oldw = wa->width; c->h = c->oldh = wa->height; c->oldbw = wa->border_width; + c->cfact = 1.0; - if(c->x + WIDTH(c) > c->mon->mx + c->mon->mw) + if (c->x + WIDTH(c) > c->mon->mx + c->mon->mw) c->x = c->mon->mx + c->mon->mw - WIDTH(c); -@@ -1473,6 +1476,23 @@ setlayout(const Arg *arg) { +@@ -1528,6 +1531,23 @@ setlayout(const Arg *arg) drawbar(selmon); } @@ -63,38 +63,37 @@ index 1bbb4b3..4ff74cc 100644 + /* arg > 1.0 will set mfact absolutly */ void - setmfact(const Arg *arg) { -@@ -1602,9 +1622,15 @@ tagmon(const Arg *arg) { - void - tile(Monitor *m) { + setmfact(const Arg *arg) +@@ -1667,9 +1687,15 @@ void + tile(Monitor *m) + { unsigned int i, n, h, mw, my, ty; + float mfacts = 0, sfacts = 0; Client *c; -- for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) { -+ if(n < m->nmaster) +- for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) { ++ if (n < m->nmaster) + mfacts += c->cfact; + else + sfacts += c->cfact; + } - if(n == 0) + if (n == 0) return; -@@ -1614,14 +1640,16 @@ tile(Monitor *m) { +@@ -1679,13 +1705,15 @@ tile(Monitor *m) mw = m->ww; - for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if(i < m->nmaster) { + for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) + if (i < m->nmaster) { - h = (m->wh - my) / (MIN(n, m->nmaster) - i); + h = (m->wh - my) * (c->cfact / mfacts); - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False); + resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); my += HEIGHT(c); + mfacts -= c->cfact; - } - else { + } else { - h = (m->wh - ty) / (n - i); -+ h = (m->wh - ty) * (c->cfact / sfacts); - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), False); ++ h = (m->wh - ty) / (c->cfact / sfacts); + resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); ty += HEIGHT(c); + sfacts -= c->cfact; } diff --git a/dwm.suckless.org/patches/dwm-6.1-dwmfifo.diff b/dwm.suckless.org/patches/dwm-6.1-dwmfifo.diff @@ -1,215 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 875885b..c0a01fa 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -108,3 +108,65 @@ static Button buttons[] = { - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, - }; - -+static const char *dwmfifo = "/tmp/dwm.fifo"; -+static Command commands[] = { -+ { "dmenu", spawn, {.v = dmenucmd} }, -+ { "term", spawn, {.v = termcmd} }, -+ { "togglebar", togglebar, {0} }, -+ { "focusstack+", focusstack, {.i = +1} }, -+ { "focusstack-", focusstack, {.i = -1} }, -+ { "incnmaster+", incnmaster, {.i = +1} }, -+ { "incnmaster-", incnmaster, {.i = -1} }, -+ { "setmfact+", setmfact, {.f = +0.05} }, -+ { "setmfact-", setmfact, {.f = -0.05} }, -+ { "zoom", zoom, {0} }, -+ { "view", view, {0} }, -+ { "killclient", killclient, {0} }, -+ { "setlayout-tiled", setlayout, {.v = &layouts[0]} }, -+ { "setlayout-float", setlayout, {.v = &layouts[1]} }, -+ { "setlayout-mono", setlayout, {.v = &layouts[2]} }, -+ { "togglelayout", setlayout, {0} }, -+ { "togglefloating", togglefloating, {0} }, -+ { "viewall", view, {.ui = ~0} }, -+ { "tag", tag, {.ui = ~0} }, -+ { "focusmon+", focusmon, {.i = +1} }, -+ { "focusmon-", focusmon, {.i = -1} }, -+ { "tagmon+", tagmon, {.i = +1} }, -+ { "tagmon-", tagmon, {.i = -1} }, -+ { "view1", view, {.ui = 1 << 0} }, -+ { "view2", view, {.ui = 1 << 1} }, -+ { "view3", view, {.ui = 1 << 2} }, -+ { "view4", view, {.ui = 1 << 3} }, -+ { "view5", view, {.ui = 1 << 4} }, -+ { "view6", view, {.ui = 1 << 5} }, -+ { "view7", view, {.ui = 1 << 6} }, -+ { "view8", view, {.ui = 1 << 7} }, -+ { "view9", view, {.ui = 1 << 8} }, -+ { "toggleview1", toggleview, {.ui = 1 << 0} }, -+ { "toggleview2", toggleview, {.ui = 1 << 1} }, -+ { "toggleview3", toggleview, {.ui = 1 << 2} }, -+ { "toggleview4", toggleview, {.ui = 1 << 3} }, -+ { "toggleview5", toggleview, {.ui = 1 << 4} }, -+ { "toggleview6", toggleview, {.ui = 1 << 5} }, -+ { "toggleview7", toggleview, {.ui = 1 << 6} }, -+ { "toggleview8", toggleview, {.ui = 1 << 7} }, -+ { "toggleview9", toggleview, {.ui = 1 << 8} }, -+ { "tag1", tag, {.ui = 1 << 0} }, -+ { "tag2", tag, {.ui = 1 << 1} }, -+ { "tag3", tag, {.ui = 1 << 2} }, -+ { "tag4", tag, {.ui = 1 << 3} }, -+ { "tag5", tag, {.ui = 1 << 4} }, -+ { "tag6", tag, {.ui = 1 << 5} }, -+ { "tag7", tag, {.ui = 1 << 6} }, -+ { "tag8", tag, {.ui = 1 << 7} }, -+ { "tag9", tag, {.ui = 1 << 8} }, -+ { "toggletag1", toggletag, {.ui = 1 << 0} }, -+ { "toggletag2", toggletag, {.ui = 1 << 1} }, -+ { "toggletag3", toggletag, {.ui = 1 << 2} }, -+ { "toggletag4", toggletag, {.ui = 1 << 3} }, -+ { "toggletag5", toggletag, {.ui = 1 << 4} }, -+ { "toggletag6", toggletag, {.ui = 1 << 5} }, -+ { "toggletag7", toggletag, {.ui = 1 << 6} }, -+ { "toggletag8", toggletag, {.ui = 1 << 7} }, -+ { "toggletag9", toggletag, {.ui = 1 << 8} }, -+}; -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..cd7ddd1 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -21,6 +21,7 @@ - * To understand everything else, start reading main(). - */ - #include <errno.h> -+#include <fcntl.h> - #include <locale.h> - #include <stdarg.h> - #include <signal.h> -@@ -28,6 +29,8 @@ - #include <stdlib.h> - #include <string.h> - #include <unistd.h> -+#include <sys/select.h> -+#include <sys/stat.h> - #include <sys/types.h> - #include <sys/wait.h> - #include <X11/cursorfont.h> -@@ -140,6 +143,12 @@ typedef struct { - int monitor; - } Rule; - -+typedef struct { -+ const char *name; -+ void (*func)(const Arg *arg); -+ const Arg arg; -+} Command; -+ - /* function declarations */ - static void applyrules(Client *c); - static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact); -@@ -161,9 +170,11 @@ static void destroynotify(XEvent *e); - static void detach(Client *c); - static void detachstack(Client *c); - static Monitor *dirtomon(int dir); -+static void dispatchcmd(void); - static void drawbar(Monitor *m); - static void drawbars(void); - static void enternotify(XEvent *e); -+static Bool evpredicate(); - static void expose(XEvent *e); - static void focus(Client *c); - static void focusin(XEvent *e); -@@ -266,6 +277,7 @@ static Drw *drw; - static Fnt *fnt; - static Monitor *mons, *selmon; - static Window root; -+static int fifofd; - - /* configuration, allows nested code to access above variables */ - #include "config.h" -@@ -485,6 +497,7 @@ cleanup(void) { - XSync(dpy, False); - XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); - XDeleteProperty(dpy, root, netatom[NetActiveWindow]); -+ close(fifofd); - } - - void -@@ -691,6 +704,25 @@ dirtomon(int dir) { - } - - void -+dispatchcmd(void) -+{ -+ int i; -+ char buf[BUFSIZ]; -+ ssize_t n; -+ -+ n = read(fifofd, buf, sizeof(buf) - 1); -+ if (n == -1) -+ die("Failed to read from DWM fifo\n"); -+ buf[n] = '\0'; -+ for (i = 0; i < LENGTH(commands); i++) { -+ if (strcmp(commands[i].name, buf) == 0) { -+ commands[i].func(&commands[i].arg); -+ break; -+ } -+ } -+} -+ -+void - drawbar(Monitor *m) { - int x, xx, w; - unsigned int i, occ = 0, urg = 0; -@@ -768,6 +800,12 @@ enternotify(XEvent *e) { - focus(c); - } - -+Bool -+evpredicate() -+{ -+ return True; -+} -+ - void - expose(XEvent *e) { - Monitor *m; -@@ -1341,11 +1379,30 @@ restack(Monitor *m) { - void - run(void) { - XEvent ev; -+ fd_set rfds; -+ int n; -+ int dpyfd, maxfd; - /* main event loop */ - XSync(dpy, False); -- while(running && !XNextEvent(dpy, &ev)) -- if(handler[ev.type]) -- handler[ev.type](&ev); /* call handler */ -+ dpyfd = ConnectionNumber(dpy); -+ maxfd = fifofd; -+ if (dpyfd > maxfd) -+ maxfd = dpyfd; -+ maxfd++; -+ while (running) { -+ FD_ZERO(&rfds); -+ FD_SET(fifofd, &rfds); -+ FD_SET(dpyfd, &rfds); -+ n = select(maxfd, &rfds, NULL, NULL, NULL); -+ if (n > 0) { -+ if (FD_ISSET(fifofd, &rfds)) -+ dispatchcmd(); -+ if (FD_ISSET(dpyfd, &rfds)) -+ while (XCheckIfEvent(dpy, &ev, evpredicate, NULL)) -+ if (handler[ev.type]) -+ handler[ev.type](&ev); /* call handler */ -+ } -+ } - } - - void -@@ -1543,6 +1600,9 @@ setup(void) { - XSelectInput(dpy, root, wa.event_mask); - grabkeys(); - focus(NULL); -+ fifofd = open(dwmfifo, O_RDWR | O_NONBLOCK); -+ if (fifofd < 0) -+ die("Failed to open DWM fifo\n"); - } - - void diff --git a/dwm.suckless.org/patches/dwm-6.1-htile.diff b/dwm.suckless.org/patches/dwm-6.1-htile.diff @@ -1,46 +0,0 @@ - -diff --git a/dwm.c b/dwm.c -index c9fdd49..783fcdb 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -214,6 +214,7 @@ static void spawn(const Arg *arg); - static void tag(const Arg *arg); - static void tagmon(const Arg *arg); - static void tile(Monitor *); -+static void htile(Monitor *); - static void togglebar(const Arg *arg); - static void togglefloating(const Arg *arg); - static void toggletag(const Arg *arg); -@@ -1699,6 +1722,32 @@ tile(Monitor *m) { - } - - void -+htile(Monitor *m) { -+ unsigned int i, n, w, mh, mx, tx; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ -+ if(n > m->nmaster) -+ mh = m->nmaster ? m->wh * m->mfact : 0; -+ else -+ mh = m->wh; -+ for(i = mx = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ if(i < m->nmaster) { -+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); -+ resize(c, m->wx + mx, m->wy, w - (2*c->bw), mh - (2*c->bw), False); -+ mx += WIDTH(c); -+ } -+ else { -+ w = (m->ww - tx) / (n - i); -+ resize(c, m->wx + tx, m->wy + mh, w - (2*c->bw), m->wh - mh - (2*c->bw), False); -+ tx += WIDTH(c); -+ } -+} -+ -+void - togglebar(const Arg *arg) { - selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar; - updatebarpos(selmon); diff --git a/dwm.suckless.org/patches/dwm-6.1-monarg.diff b/dwm.suckless.org/patches/dwm-6.1-monarg.diff @@ -1,30 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index d9443da..28528ed 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -176,6 +176,7 @@ static void destroynotify(XEvent *e); - static void detach(Client *c); - static void detachstack(Client *c); - static Monitor *dirtomon(int dir); -+static void dmenuspawn(const Arg *arg); - static void drawbar(Monitor *m); - static void drawbars(void); - static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]); -@@ -709,6 +710,17 @@ dirtomon(int dir) { - } - - void -+dmenuspawn(const Arg *arg) { -+ char monstr[2] = "0"; -+ const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-m", monstr, "-nb", -+ normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", -+ selfgcolor, NULL }; -+ Arg a = { .v = dmenucmd }; -+ monstr[0] = '0' + selmon->num; -+ spawn(&a); -+} -+ -+void - drawbar(Monitor *m) { - int x; - unsigned int i, occ = 0, urg = 0; diff --git a/dwm.suckless.org/patches/dwm-6.1-single_window_no_border.diff b/dwm.suckless.org/patches/dwm-6.1-single_window_no_border.diff @@ -1,99 +0,0 @@ -Author: Jan Christoph Ebersbach <jceb@e-jc.de> -URL: http://dwm.suckless.org/patches/noborder -This patch removes the border when there is just one window visible in tiled or -monocle layout. - ---- dwm/dwm.c.orig 2015-11-11 19:14:39.771079356 -0800 -+++ dwm/dwm.c 2015-11-11 19:14:42.821079144 -0800 -@@ -1117,7 +1117,7 @@ maprequest(XEvent *e) - void - monocle(Monitor *m) - { -- unsigned int n = 0; -+ unsigned int n = 0, r = 0; - Client *c; - - for (c = m->clients; c; c = c->next) -@@ -1125,8 +1125,17 @@ monocle(Monitor *m) - n++; - if (n > 0) /* override layout symbol */ - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); -- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) -- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); -+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) { -+ /* remove border when in monocle layout */ -+ if(c->bw) { -+ c->oldbw = c->bw; -+ c->bw = 0; -+ r = 1; -+ } -+ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False); -+ if(r) -+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); -+ } - } - - void -@@ -1666,7 +1675,7 @@ tagmon(const Arg *arg) - void - tile(Monitor *m) - { -- unsigned int i, n, h, mw, my, ty; -+ unsigned int i, n, h, mw, my, ty, r; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -@@ -1677,16 +1686,35 @@ tile(Monitor *m) - mw = m->nmaster ? m->ww * m->mfact : 0; - else - mw = m->ww; -- for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if(n == 1) { -+ if (c->bw) { -+ /* remove border when only one window is on the cu rrent tag */ -+ c->oldbw = c->bw; -+ c->bw = 0; -+ r = 1; -+ } -+ } -+ else if(!c->bw && c->oldbw) { -+ /* restore border when more than one window is displayed */ -+ c->bw = c->oldbw; -+ c->oldbw = 0; -+ r = 1; -+ } - if (i < m->nmaster) { - h = (m->wh - my) / (MIN(n, m->nmaster) - i); - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); -+ if(r) -+ resizeclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw)); - my += HEIGHT(c); - } else { - h = (m->wh - ty) / (n - i); - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); -+ if(r) -+ resizeclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw)); - ty += HEIGHT(c); - } -+ } - } - - void -@@ -1706,9 +1734,15 @@ togglefloating(const Arg *arg) - if (selmon->sel->isfullscreen) /* no support for fullscreen windows */ - return; - selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; -- if (selmon->sel->isfloating) -+ if (selmon->sel->isfloating) { -+ /* restore border when moving window into floating mode */ -+ if(!selmon->sel->bw && selmon->sel->oldbw) { -+ selmon->sel->bw = selmon->sel->oldbw; -+ selmon->sel->oldbw = 0; -+ } - resize(selmon->sel, selmon->sel->x, selmon->sel->y, - selmon->sel->w, selmon->sel->h, 0); -+ } - arrange(selmon); - } - diff --git a/dwm.suckless.org/patches/dwm-6.1-swallowing.diff b/dwm.suckless.org/patches/dwm-6.1-swallowing.diff @@ -1,377 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 7054c06..d1140ff 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -24,9 +24,10 @@ static const Rule rules[] = { - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ -- /* class instance title tags mask isfloating monitor */ -- { "Gimp", NULL, NULL, 0, 1, -1 }, -- { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, -+ /* class instance title tags mask isfloating isterminal noswallow monitor */ -+ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, -+ { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1 }, -+ { "st-", NULL, NULL, 0, 0, 1, 1, -1 }, - }; - - /* layout(s) */ -diff --git a/dwm.c b/dwm.c -index ff7e096..b50436a 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -40,6 +40,10 @@ - #include <X11/extensions/Xinerama.h> - #endif /* XINERAMA */ - #include <X11/Xft/Xft.h> -+#ifdef SWALLOWING -+#include <X11/Xlib-xcb.h> -+#include <xcb/res.h> -+#endif - - #include "drw.h" - #include "util.h" -@@ -92,9 +96,11 @@ struct Client { - int basew, baseh, incw, inch, maxw, maxh, minw, minh; - int bw, oldbw; - unsigned int tags; -- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; -+ pid_t pid; - Client *next; - Client *snext; -+ Client *swallowing; - Monitor *mon; - Window win; - }; -@@ -138,6 +144,8 @@ typedef struct { - const char *title; - unsigned int tags; - int isfloating; -+ int isterminal; -+ int noswallow; - int monitor; - } Rule; - -@@ -170,12 +178,14 @@ static void focus(Client *c); - static void focusin(XEvent *e); - static void focusmon(const Arg *arg); - static void focusstack(const Arg *arg); -+static pid_t getparentprocess(pid_t p); - static int getrootptr(int *x, int *y); - static long getstate(Window w); - static int gettextprop(Window w, Atom atom, char *text, unsigned int size); - static void grabbuttons(Client *c, int focused); - static void grabkeys(void); - static void incnmaster(const Arg *arg); -+static int isdescprocess(pid_t p, pid_t c); - static void keypress(XEvent *e); - static void killclient(const Arg *arg); - static void manage(Window w, XWindowAttributes *wa); -@@ -206,8 +216,10 @@ static void setup(void); - static void showhide(Client *c); - static void sigchld(int unused); - static void spawn(const Arg *arg); -+static Client *swallowingclient(Window w); - static void tag(const Arg *arg); - static void tagmon(const Arg *arg); -+static Client *termforwin(const Client *c); - static void tile(Monitor *); - static void togglebar(const Arg *arg); - static void togglefloating(const Arg *arg); -@@ -227,6 +239,7 @@ static void updatewindowtype(Client *c); - static void updatetitle(Client *c); - static void updatewmhints(Client *c); - static void view(const Arg *arg); -+static pid_t winpid(Window w); - static Client *wintoclient(Window w); - static Monitor *wintomon(Window w); - static int xerror(Display *dpy, XErrorEvent *ee); -@@ -267,6 +280,10 @@ static Drw *drw; - static Monitor *mons, *selmon; - static Window root; - -+#ifdef SWALLOWING -+static xcb_connection_t *xcon; -+#endif /* SWALLOWING */ -+ - /* configuration, allows nested code to access above variables */ - #include "config.h" - -@@ -296,6 +313,7 @@ applyrules(Client *c) - && (!r->class || strstr(class, r->class)) - && (!r->instance || strstr(instance, r->instance))) - { -+ c->isterminal = r->isterminal; - c->isfloating = r->isfloating; - c->tags |= r->tags; - for (m = mons; m && m->num != r->monitor; m = m->next); -@@ -413,6 +431,46 @@ attachstack(Client *c) - } - - void -+swallow(Client *p, Client *c) -+{ -+ if (c->noswallow || c->isterminal) -+ return; -+ -+ detach(c); -+ detachstack(c); -+ -+ setclientstate(c, WithdrawnState); -+ XUnmapWindow(dpy, p->win); -+ -+ p->swallowing = c; -+ c->mon = p->mon; -+ -+ Window w = p->win; -+ p->win = c->win; -+ c->win = w; -+ updatetitle(p); -+ arrange(p->mon); -+ configure(p); -+ updateclientlist(); -+} -+ -+void -+unswallow(Client *c) -+{ -+ c->win = c->swallowing->win; -+ -+ free(c->swallowing); -+ c->swallowing = NULL; -+ -+ updatetitle(c); -+ arrange(c->mon); -+ XMapWindow(dpy, c->win); -+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); -+ configure(c); -+ setclientstate(c, NormalState); -+} -+ -+void - buttonpress(XEvent *e) - { - unsigned int i, x, click; -@@ -475,7 +533,7 @@ cleanup(void) - selmon->lt[selmon->sellt] = &foo; - for (m = mons; m; m = m->next) - while (m->stack) -- unmanage(m->stack, 0); -+ unmanage(m->stack, 0); // XXX - unmanage swallowing windows too - XUngrabKey(dpy, AnyKey, AnyModifier, root); - while (mons) - cleanupmon(mons); -@@ -666,6 +724,9 @@ destroynotify(XEvent *e) - - if ((c = wintoclient(ev->window))) - unmanage(c, 1); -+ -+ else if ((c = swallowingclient(ev->window))) -+ unmanage(c->swallowing, 1); - } - - void -@@ -1037,12 +1098,13 @@ killclient(const Arg *arg) - void - manage(Window w, XWindowAttributes *wa) - { -- Client *c, *t = NULL; -+ Client *c, *t, *term = NULL; - Window trans = None; - XWindowChanges wc; - - c = ecalloc(1, sizeof(Client)); - c->win = w; -+ c->pid = winpid(w); - updatetitle(c); - if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) { - c->mon = t->mon; -@@ -1050,7 +1112,9 @@ manage(Window w, XWindowAttributes *wa) - } else { - c->mon = selmon; - applyrules(c); -+ term = termforwin(c); - } -+ - /* geometry */ - c->x = c->oldx = wa->x; - c->y = c->oldy = wa->y; -@@ -1092,6 +1156,8 @@ manage(Window w, XWindowAttributes *wa) - c->mon->sel = c; - arrange(c->mon); - XMapWindow(dpy, c->win); -+ if (term) -+ swallow(term, c); - focus(NULL); - } - -@@ -1763,6 +1829,20 @@ unmanage(Client *c, int destroyed) - Monitor *m = c->mon; - XWindowChanges wc; - -+ if (c->swallowing) { -+ unswallow(c); -+ return; -+ } -+ -+ Client *s = swallowingclient(c->win); -+ if (s) { -+ free(s->swallowing); -+ s->swallowing = NULL; -+ arrange(m); -+ focus(NULL); -+ return; -+ } -+ - /* The server grab construct avoids race conditions. */ - detach(c); - detachstack(c); -@@ -1778,9 +1858,12 @@ unmanage(Client *c, int destroyed) - XUngrabServer(dpy); - } - free(c); -- focus(NULL); -- updateclientlist(); -- arrange(m); -+ -+ if (!s) { -+ arrange(m); -+ focus(NULL); -+ updateclientlist(); -+ } - } - - void -@@ -2045,16 +2128,118 @@ view(const Arg *arg) - arrange(selmon); - } - -+pid_t -+winpid(Window w) -+{ -+ pid_t result = 0; -+ -+#ifdef SWALLOWING -+ xcb_res_client_id_spec_t spec = {0}; -+ spec.client = w; -+ spec.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID; -+ -+ xcb_generic_error_t *e = NULL; -+ xcb_res_query_client_ids_cookie_t c = xcb_res_query_client_ids(xcon, 1, &spec); -+ xcb_res_query_client_ids_reply_t *r = xcb_res_query_client_ids_reply(xcon, c, &e); -+ -+ if (!r) -+ return (pid_t)0; -+ -+ xcb_res_client_id_value_iterator_t i = xcb_res_query_client_ids_ids_iterator(r); -+ for (; i.rem; xcb_res_client_id_value_next(&i)) { -+ spec = i.data->spec; -+ if (spec.mask & XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID) { -+ uint32_t *t = xcb_res_client_id_value_value(i.data); -+ result = *t; -+ break; -+ } -+ } -+ -+ free(r); -+#endif /* SWALLOWING */ -+ -+ if (result == (pid_t)-1) -+ result = 0; -+ return result; -+} -+ -+pid_t -+getparentprocess(pid_t p) -+{ -+ unsigned int v = 0; -+ -+#ifdef __linux__ -+ FILE *f; -+ char buf[256]; -+ snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)p); -+ -+ if (!(f = fopen(buf, "r"))) -+ return 0; -+ -+ fscanf(f, "%*u %*s %*c %u", &v); -+ fclose(f); -+#endif /* __linux__ */ -+ -+ return (pid_t)v; -+} -+ -+int -+isdescprocess(pid_t p, pid_t c) -+{ -+ while (p != c && c != 0) -+ c = getparentprocess(c); -+ -+ return (int)c; -+} -+ -+Client * -+termforwin(const Client *w) -+{ -+ Client *c; -+ Monitor *m; -+ -+ if (!w->pid || w->isterminal) -+ return NULL; -+ -+ for (m = mons; m; m = m->next) { -+ for (c = m->clients; c; c = c->next) { -+ if (c->isterminal && !c->swallowing && c->pid && isdescprocess(c->pid, w->pid)) -+ return c; -+ } -+ } -+ -+ return NULL; -+} -+ -+Client * -+swallowingclient(Window w) -+{ -+ Client *c; -+ Monitor *m; -+ -+ for (m = mons; m; m = m->next) { -+ for (c = m->clients; c; c = c->next) { -+ if (c->swallowing && c->swallowing->win == w) -+ return c; -+ } -+ } -+ -+ return NULL; -+} -+ - Client * - wintoclient(Window w) - { - Client *c; - Monitor *m; - -- for (m = mons; m; m = m->next) -- for (c = m->clients; c; c = c->next) -+ for (m = mons; m; m = m->next) { -+ for (c = m->clients; c; c = c->next) { - if (c->win == w) - return c; -+ } -+ } -+ - return NULL; - } - -@@ -2136,6 +2321,10 @@ main(int argc, char *argv[]) - fputs("warning: no locale support\n", stderr); - if (!(dpy = XOpenDisplay(NULL))) - die("dwm: cannot open display\n"); -+#ifdef SWALLOWING -+ if (!(xcon = XGetXCBConnection(dpy))) -+ die("dwm: cannot get xcb connection\n"); -+#endif - checkotherwm(); - setup(); - scan(); diff --git a/dwm.suckless.org/patches/dwm-6.1-systray.diff b/dwm.suckless.org/patches/dwm-6.1-systray.diff @@ -14,7 +14,7 @@ index 7054c06..8393a58 100644 static const int topbar = 1; /* 0 means bottom bar */ diff --git a/dwm.c b/dwm.c -index 0362114..e574573 100644 +index ff7e096..cf0b3a9 100644 --- a/dwm.c +++ b/dwm.c @@ -57,12 +57,30 @@ @@ -201,16 +201,16 @@ index 0362114..e574573 100644 if (!c) return; if (cme->message_type == netatom[NetWMState]) { -@@ -577,7 +660,7 @@ configurenotify(XEvent *e) - drw_resize(drw, sw, bh); - updatebars(); - for (m = mons; m; m = m->next) +@@ -581,7 +664,7 @@ configurenotify(XEvent *e) + for (c = m->clients; c; c = c->next) + if (c->isfullscreen) + resizeclient(c, m->mx, m->my, m->mw, m->mh); - XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); + resizebarwin(m); + } focus(NULL); arrange(NULL); - } -@@ -661,6 +744,11 @@ destroynotify(XEvent *e) +@@ -666,6 +749,11 @@ destroynotify(XEvent *e) if ((c = wintoclient(ev->window))) unmanage(c, 1); @@ -222,7 +222,7 @@ index 0362114..e574573 100644 } void -@@ -710,6 +798,7 @@ drawbar(Monitor *m) +@@ -715,6 +803,7 @@ drawbar(Monitor *m) dx = (drw->fonts[0]->ascent + drw->fonts[0]->descent + 2) / 4; @@ -230,7 +230,7 @@ index 0362114..e574573 100644 for (c = m->clients; c; c = c->next) { occ |= c->tags; if (c->isurgent) -@@ -732,6 +821,9 @@ drawbar(Monitor *m) +@@ -737,6 +826,9 @@ drawbar(Monitor *m) if (m == selmon) { /* status is only drawn on selected monitor */ w = TEXTW(stext); x = m->ww - w; @@ -240,7 +240,7 @@ index 0362114..e574573 100644 if (x < xx) { x = xx; w = m->ww - xx; -@@ -760,6 +852,7 @@ drawbars(void) +@@ -765,6 +857,7 @@ drawbars(void) for (m = mons; m; m = m->next) drawbar(m); @@ -248,7 +248,7 @@ index 0362114..e574573 100644 } void -@@ -787,8 +880,11 @@ expose(XEvent *e) +@@ -792,8 +885,11 @@ expose(XEvent *e) Monitor *m; XExposeEvent *ev = &e->xexpose; @@ -261,7 +261,7 @@ index 0362114..e574573 100644 } void -@@ -875,10 +971,17 @@ getatomprop(Client *c, Atom prop) +@@ -880,10 +976,17 @@ getatomprop(Client *c, Atom prop) unsigned long dl; unsigned char *p = NULL; Atom da, atom = None; @@ -280,7 +280,7 @@ index 0362114..e574573 100644 XFree(p); } return atom; -@@ -912,6 +1015,15 @@ getstate(Window w) +@@ -917,6 +1020,15 @@ getstate(Window w) return result; } @@ -296,7 +296,7 @@ index 0362114..e574573 100644 int gettextprop(Window w, Atom atom, char *text, unsigned int size) { -@@ -1018,7 +1130,7 @@ killclient(const Arg *arg) +@@ -1023,7 +1135,7 @@ killclient(const Arg *arg) { if (!selmon->sel) return; @@ -305,7 +305,7 @@ index 0362114..e574573 100644 XGrabServer(dpy); XSetErrorHandler(xerrordummy); XSetCloseDownMode(dpy, DestroyAll); -@@ -1105,6 +1217,12 @@ maprequest(XEvent *e) +@@ -1110,6 +1222,12 @@ maprequest(XEvent *e) { static XWindowAttributes wa; XMapRequestEvent *ev = &e->xmaprequest; @@ -318,7 +318,7 @@ index 0362114..e574573 100644 if (!XGetWindowAttributes(dpy, ev->window, &wa)) return; -@@ -1232,6 +1350,16 @@ propertynotify(XEvent *e) +@@ -1237,6 +1355,16 @@ propertynotify(XEvent *e) Window trans; XPropertyEvent *ev = &e->xproperty; @@ -335,7 +335,7 @@ index 0362114..e574573 100644 if ((ev->window == root) && (ev->atom == XA_WM_NAME)) updatestatus(); else if (ev->state == PropertyDelete) -@@ -1283,6 +1411,19 @@ recttomon(int x, int y, int w, int h) +@@ -1288,6 +1416,19 @@ recttomon(int x, int y, int w, int h) } void @@ -355,7 +355,7 @@ index 0362114..e574573 100644 resize(Client *c, int x, int y, int w, int h, int interact) { if (applysizehints(c, &x, &y, &w, &h, interact)) -@@ -1290,6 +1431,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) +@@ -1295,6 +1436,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) } void @@ -370,7 +370,7 @@ index 0362114..e574573 100644 resizeclient(Client *c, int x, int y, int w, int h) { XWindowChanges wc; -@@ -1362,6 +1511,18 @@ resizemouse(const Arg *arg) +@@ -1367,6 +1516,18 @@ resizemouse(const Arg *arg) } void @@ -389,7 +389,7 @@ index 0362114..e574573 100644 restack(Monitor *m) { Client *c; -@@ -1450,26 +1611,36 @@ setclientstate(Client *c, long state) +@@ -1455,26 +1616,36 @@ setclientstate(Client *c, long state) } int @@ -437,7 +437,7 @@ index 0362114..e574573 100644 } return exists; } -@@ -1483,7 +1654,7 @@ setfocus(Client *c) +@@ -1488,7 +1659,7 @@ setfocus(Client *c) XA_WINDOW, 32, PropModeReplace, (unsigned char *) &(c->win), 1); } @@ -446,7 +446,7 @@ index 0362114..e574573 100644 } void -@@ -1569,12 +1740,18 @@ setup(void) +@@ -1574,12 +1745,18 @@ setup(void) wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False); netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); @@ -465,7 +465,7 @@ index 0362114..e574573 100644 /* init cursors */ cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); cursor[CurResize] = drw_cur_create(drw, XC_sizing); -@@ -1586,6 +1763,8 @@ setup(void) +@@ -1591,6 +1768,8 @@ setup(void) scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor); scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor); scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor); @@ -474,7 +474,7 @@ index 0362114..e574573 100644 /* init bars */ updatebars(); updatestatus(); -@@ -1645,6 +1824,22 @@ spawn(const Arg *arg) +@@ -1650,6 +1829,22 @@ spawn(const Arg *arg) } } @@ -497,7 +497,7 @@ index 0362114..e574573 100644 void tag(const Arg *arg) { -@@ -1694,7 +1889,18 @@ togglebar(const Arg *arg) +@@ -1699,7 +1894,18 @@ togglebar(const Arg *arg) { selmon->showbar = !selmon->showbar; updatebarpos(selmon); @@ -517,7 +517,7 @@ index 0362114..e574573 100644 arrange(selmon); } -@@ -1790,11 +1996,17 @@ unmapnotify(XEvent *e) +@@ -1795,11 +2001,17 @@ unmapnotify(XEvent *e) else unmanage(c, 0); } @@ -535,7 +535,7 @@ index 0362114..e574573 100644 Monitor *m; XSetWindowAttributes wa = { .override_redirect = True, -@@ -1804,10 +2016,15 @@ updatebars(void) +@@ -1809,10 +2021,15 @@ updatebars(void) for (m = mons; m; m = m->next) { if (m->barwin) continue; @@ -552,7 +552,7 @@ index 0362114..e574573 100644 XMapRaised(dpy, m->barwin); } } -@@ -1998,6 +2215,117 @@ updatestatus(void) +@@ -2003,6 +2220,117 @@ updatestatus(void) } void @@ -670,7 +670,7 @@ index 0362114..e574573 100644 updatewindowtype(Client *c) { Atom state = getatomprop(c, netatom[NetWMState]); -@@ -2070,6 +2398,16 @@ wintomon(Window w) +@@ -2075,6 +2403,16 @@ wintomon(Window w) return selmon; } diff --git a/dwm.suckless.org/patches/dwm-alpha-6.1.diff b/dwm.suckless.org/patches/dwm-alpha-6.1.diff @@ -0,0 +1,253 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..4448d46 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -11,6 +11,8 @@ static const char normfgcolor[] = "#bbbbbb"; + static const char selbordercolor[] = "#005577"; + static const char selbgcolor[] = "#005577"; + static const char selfgcolor[] = "#eeeeee"; ++static unsigned int baralpha = 0xd0; ++static unsigned int borderalpha = OPAQUE; + static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + static const int showbar = 1; /* 0 means no bar */ +diff --git a/config.mk b/config.mk +index 4eefb71..de25d2a 100644 +--- a/config.mk ++++ b/config.mk +@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 + + # includes and libs + INCS = -I${X11INC} -I${FREETYPEINC} +-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ++LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender + + # flags + CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +diff --git a/drw.c b/drw.c +index f49200b..12e3ebc 100644 +--- a/drw.c ++++ b/drw.c +@@ -61,7 +61,7 @@ utf8decode(const char *c, long *u, size_t clen) + } + + Drw * +-drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h) ++drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap) + { + Drw *drw; + +@@ -71,8 +71,11 @@ drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h + drw->root = root; + drw->w = w; + drw->h = h; +- drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen)); +- drw->gc = XCreateGC(dpy, root, 0, NULL); ++ drw->visual = visual; ++ drw->depth = depth; ++ drw->cmap = cmap; ++ drw->drawable = XCreatePixmap(dpy, root, w, h, depth); ++ drw->gc = XCreateGC(dpy, drw->drawable, 0, NULL); + drw->fontcount = 0; + XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter); + +@@ -86,7 +89,7 @@ drw_resize(Drw *drw, unsigned int w, unsigned int h) + drw->h = h; + if (drw->drawable) + XFreePixmap(drw->dpy, drw->drawable); +- drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen)); ++ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, drw->depth); + } + + void +@@ -180,16 +183,15 @@ drw_font_free(Fnt *font) + } + + Clr * +-drw_clr_create(Drw *drw, const char *clrname) ++drw_clr_create(Drw *drw, const char *clrname, unsigned int alpha) + { + Clr *clr; + + clr = ecalloc(1, sizeof(Clr)); +- if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen), +- DefaultColormap(drw->dpy, drw->screen), ++ if (!XftColorAllocName(drw->dpy, drw->visual, drw->cmap, + clrname, &clr->rgb)) + die("error, cannot allocate color '%s'\n", clrname); +- clr->pix = clr->rgb.pixel; ++ clr->pix = (clr->rgb.pixel & 0x00ffffffU) | (alpha << 24); + + return clr; + } +@@ -245,9 +247,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *tex + XSetForeground(drw->dpy, drw->gc, invert ? + drw->scheme->fg->pix : drw->scheme->bg->pix); + XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h); +- d = XftDrawCreate(drw->dpy, drw->drawable, +- DefaultVisual(drw->dpy, drw->screen), +- DefaultColormap(drw->dpy, drw->screen)); ++ d = XftDrawCreate(drw->dpy, drw->drawable, drw->visual, drw->cmap); + } + + curfont = drw->fonts[0]; +diff --git a/drw.h b/drw.h +index e3b8515..1fed824 100644 +--- a/drw.h ++++ b/drw.h +@@ -30,6 +30,9 @@ typedef struct { + Display *dpy; + int screen; + Window root; ++ Visual *visual; ++ unsigned int depth; ++ Colormap cmap; + Drawable drawable; + GC gc; + ClrScheme *scheme; +@@ -43,7 +46,7 @@ typedef struct { + } Extnts; + + /* Drawable abstraction */ +-Drw *drw_create(Display *, int, Window, unsigned int, unsigned int); ++Drw *drw_create(Display *, int, Window, unsigned int, unsigned int, Visual*, unsigned int, Colormap); + void drw_resize(Drw *, unsigned int, unsigned int); + void drw_free(Drw *); + +@@ -55,7 +58,7 @@ void drw_font_getexts(Fnt *, const char *, unsigned int, Extnts *); + unsigned int drw_font_getexts_width(Fnt *, const char *, unsigned int); + + /* Colour abstraction */ +-Clr *drw_clr_create(Drw *, const char *); ++Clr *drw_clr_create(Drw *, const char *, unsigned int); + void drw_clr_free(Clr *); + + /* Cursor abstraction */ +diff --git a/dwm.c b/dwm.c +index 0362114..17fe373 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -57,6 +57,8 @@ + #define TAGMASK ((1 << LENGTH(tags)) - 1) + #define TEXTW(X) (drw_text(drw, 0, 0, 0, 0, (X), 0) + drw->fonts[0]->h) + ++#define OPAQUE 0xffU ++ + /* enums */ + enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ + enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ +@@ -232,6 +234,7 @@ static Monitor *wintomon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); ++static void xinitvisual(); + static void zoom(const Arg *arg); + + /* variables */ +@@ -267,6 +270,11 @@ static Drw *drw; + static Monitor *mons, *selmon; + static Window root; + ++static int useargb = 0; ++static Visual *visual; ++static int depth; ++static Colormap cmap; ++ + /* configuration, allows nested code to access above variables */ + #include "config.h" + +@@ -1556,7 +1564,8 @@ setup(void) + sw = DisplayWidth(dpy, screen); + sh = DisplayHeight(dpy, screen); + root = RootWindow(dpy, screen); +- drw = drw_create(dpy, screen, root, sw, sh); ++ xinitvisual(); ++ drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap); + drw_load_fonts(drw, fonts, LENGTH(fonts)); + if (!drw->fontcount) + die("no fonts could be loaded.\n"); +@@ -1580,12 +1589,12 @@ setup(void) + cursor[CurResize] = drw_cur_create(drw, XC_sizing); + cursor[CurMove] = drw_cur_create(drw, XC_fleur); + /* init appearance */ +- scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor); +- scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor); +- scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor); +- scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor); +- scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor); +- scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor); ++ scheme[SchemeNorm].border = drw_clr_create(drw, normbordercolor, borderalpha); ++ scheme[SchemeNorm].bg = drw_clr_create(drw, normbgcolor, baralpha); ++ scheme[SchemeNorm].fg = drw_clr_create(drw, normfgcolor, OPAQUE); ++ scheme[SchemeSel].border = drw_clr_create(drw, selbordercolor, borderalpha); ++ scheme[SchemeSel].bg = drw_clr_create(drw, selbgcolor, baralpha); ++ scheme[SchemeSel].fg = drw_clr_create(drw, selfgcolor, OPAQUE); + /* init bars */ + updatebars(); + updatestatus(); +@@ -1798,15 +1807,17 @@ updatebars(void) + Monitor *m; + XSetWindowAttributes wa = { + .override_redirect = True, +- .background_pixmap = ParentRelative, ++ .background_pixel = 0, ++ .border_pixel = 0, ++ .colormap = cmap, + .event_mask = ButtonPressMask|ExposureMask + }; + for (m = mons; m; m = m->next) { + if (m->barwin) + continue; +- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), +- CopyFromParent, DefaultVisual(dpy, screen), +- CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); ++ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, depth, ++ InputOutput, visual, ++ CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa); + XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); + XMapRaised(dpy, m->barwin); + } +@@ -2107,6 +2118,43 @@ xerrorstart(Display *dpy, XErrorEvent *ee) + } + + void ++xinitvisual() ++{ ++ XVisualInfo *infos; ++ XRenderPictFormat *fmt; ++ int nitems; ++ int i; ++ ++ XVisualInfo tpl = { ++ .screen = screen, ++ .depth = 32, ++ .class = TrueColor ++ }; ++ long masks = VisualScreenMask | VisualDepthMask | VisualClassMask; ++ ++ infos = XGetVisualInfo(dpy, masks, &tpl, &nitems); ++ visual = NULL; ++ for(i = 0; i < nitems; i ++) { ++ fmt = XRenderFindVisualFormat(dpy, infos[i].visual); ++ if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { ++ visual = infos[i].visual; ++ depth = infos[i].depth; ++ cmap = XCreateColormap(dpy, root, visual, AllocNone); ++ useargb = 1; ++ break; ++ } ++ } ++ ++ XFree(infos); ++ ++ if (! visual) { ++ visual = DefaultVisual(dpy, screen); ++ depth = DefaultDepth(dpy, screen); ++ cmap = DefaultColormap(dpy, screen); ++ } ++} ++ ++void + zoom(const Arg *arg) + { + Client *c = selmon->sel; diff --git a/dwm.suckless.org/patches/dwm-argbcolor.png b/dwm.suckless.org/patches/dwm-alpha.png Binary files differ. diff --git a/dwm.suckless.org/patches/dwm-alwaysfullscreen-20160713-56a31dc.diff b/dwm.suckless.org/patches/dwm-alwaysfullscreen-20160713-56a31dc.diff @@ -0,0 +1,13 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..aa1b407 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -849,7 +849,7 @@ focusstack(const Arg *arg) + { + Client *c = NULL, *i; + +- if (!selmon->sel) ++ if (!selmon->sel || selmon->sel->isfullscreen) + return; + if (arg->i > 0) { + for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); diff --git a/dwm.suckless.org/patches/dwm-alwaysfullscreen-6.1.diff b/dwm.suckless.org/patches/dwm-alwaysfullscreen-6.1.diff @@ -0,0 +1,13 @@ +diff --git a/dwm.c b/dwm.c +index 0362114..a5cab76 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -847,7 +847,7 @@ focusstack(const Arg *arg) + { + Client *c = NULL, *i; + +- if (!selmon->sel) ++ if (!selmon->sel || selmon->sel->isfullscreen) + return; + if (arg->i > 0) { + for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); diff --git a/dwm.suckless.org/patches/dwm-attachabove-20160713-56a31dc.diff b/dwm.suckless.org/patches/dwm-attachabove-20160713-56a31dc.diff @@ -0,0 +1,60 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..5a380e6 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -148,6 +148,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachabove(Client *c); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -408,6 +409,20 @@ attach(Client *c) + } + + void ++attachabove(Client *c) ++{ ++ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { ++ attach(c); ++ return; ++ } ++ ++ Client *at; ++ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); ++ c->next = at->next; ++ at->next = c; ++} ++ ++void + attachstack(Client *c) + { + c->snext = c->mon->stack; +@@ -1079,7 +1094,7 @@ manage(Window w, XWindowAttributes *wa) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) + XRaiseWindow(dpy, c->win); +- attach(c); ++ attachabove(c); + attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); +@@ -1437,7 +1452,7 @@ sendmon(Client *c, Monitor *m) + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); ++ attachabove(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1890,7 +1905,7 @@ updategeom(void) + m->clients = c->next; + detachstack(c); + c->mon = mons; +- attach(c); ++ attachabove(c); + attachstack(c); + } + if (m == selmon) diff --git a/dwm.suckless.org/patches/dwm-attachabove-6.0.diff b/dwm.suckless.org/patches/dwm-attachabove-6.0.diff @@ -0,0 +1,59 @@ +diff --git a/dwm.c b/dwm.c +index 1d78655..a9e0ea4 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -160,6 +160,7 @@ static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool inter + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachabove(Client *c); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -418,6 +419,19 @@ attach(Client *c) { + } + + void ++attachabove(Client *c) { ++ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { ++ attach(c); ++ return; ++ } ++ ++ Client *at; ++ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); ++ c->next = at->next; ++ at->next = c; ++} ++ ++void + attachstack(Client *c) { + c->snext = c->mon->stack; + c->mon->stack = c; +@@ -1155,7 +1169,7 @@ manage(Window w, XWindowAttributes *wa) { + c->isfloating = c->oldstate = trans != None || c->isfixed; + if(c->isfloating) + XRaiseWindow(dpy, c->win); +- attach(c); ++ attachabove(c); + attachstack(c); + XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ + setclientstate(c, NormalState); +@@ -1480,7 +1494,7 @@ sendmon(Client *c, Monitor *m) { + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); ++ attachabove(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1900,7 +1914,7 @@ updategeom(void) { + m->clients = c->next; + detachstack(c); + c->mon = mons; +- attach(c); ++ attachabove(c); + attachstack(c); + } + if(m == selmon) diff --git a/dwm.suckless.org/patches/dwm-attachabove-6.1.diff b/dwm.suckless.org/patches/dwm-attachabove-6.1.diff @@ -0,0 +1,60 @@ +diff --git a/dwm.c b/dwm.c +index 0362114..413ec1f 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -147,6 +147,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachabove(Client *c); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -406,6 +407,20 @@ attach(Client *c) + } + + void ++attachabove(Client *c) ++{ ++ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { ++ attach(c); ++ return; ++ } ++ ++ Client *at; ++ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next); ++ c->next = at->next; ++ at->next = c; ++} ++ ++void + attachstack(Client *c) + { + c->snext = c->mon->stack; +@@ -1076,7 +1091,7 @@ manage(Window w, XWindowAttributes *wa) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) + XRaiseWindow(dpy, c->win); +- attach(c); ++ attachabove(c); + attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); +@@ -1434,7 +1449,7 @@ sendmon(Client *c, Monitor *m) + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); ++ attachabove(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1891,7 +1906,7 @@ updategeom(void) + m->clients = c->next; + detachstack(c); + c->mon = mons; +- attach(c); ++ attachabove(c); + attachstack(c); + } + if (m == selmon) diff --git a/dwm.suckless.org/patches/dwm-attachaside-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-attachaside-20160718-56a31dc.diff @@ -0,0 +1,92 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..58a86fa 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -49,7 +49,8 @@ + #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) + #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ + * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) +-#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) ++#define ISVISIBLEONTAG(C, T) ((C->tags & T)) ++#define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags]) + #define LENGTH(X) (sizeof X / sizeof X[0]) + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) + #define WIDTH(X) ((X)->w + 2 * (X)->bw) +@@ -148,6 +149,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachaside(Client *c); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -185,6 +187,7 @@ static void maprequest(XEvent *e); + static void monocle(Monitor *m); + static void motionnotify(XEvent *e); + static void movemouse(const Arg *arg); ++static Client *nexttagged(Client *c); + static Client *nexttiled(Client *c); + static void pop(Client *); + static void propertynotify(XEvent *e); +@@ -408,6 +411,17 @@ attach(Client *c) + } + + void ++attachaside(Client *c) { ++ Client *at = nexttagged(c); ++ if(!at) { ++ attach(c); ++ return; ++ } ++ c->next = at->next; ++ at->next = c; ++} ++ ++void + attachstack(Client *c) + { + c->snext = c->mon->stack; +@@ -1079,7 +1093,7 @@ manage(Window w, XWindowAttributes *wa) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) + XRaiseWindow(dpy, c->win); +- attach(c); ++ attachaside(c); + attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); +@@ -1213,6 +1227,16 @@ movemouse(const Arg *arg) + } + + Client * ++nexttagged(Client *c) { ++ Client *walked = c->mon->clients; ++ for(; ++ walked && (walked->isfloating || !ISVISIBLEONTAG(walked, c->tags)); ++ walked = walked->next ++ ); ++ return walked; ++} ++ ++Client * + nexttiled(Client *c) + { + for (; c && (c->isfloating || !ISVISIBLE(c)); c = c->next); +@@ -1437,7 +1461,7 @@ sendmon(Client *c, Monitor *m) + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); ++ attachaside(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1890,7 +1914,7 @@ updategeom(void) + m->clients = c->next; + detachstack(c); + c->mon = mons; +- attach(c); ++ attachaside(c); + attachstack(c); + } + if (m == selmon) diff --git a/dwm.suckless.org/patches/dwm-attachaside-6.1.diff b/dwm.suckless.org/patches/dwm-attachaside-6.1.diff @@ -0,0 +1,92 @@ +diff --git a/dwm.c b/dwm.c +index 0362114..be7e7a6 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -49,7 +49,8 @@ + #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) + #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ + * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) +-#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) ++#define ISVISIBLEONTAG(C, T) ((C->tags & T)) ++#define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags]) + #define LENGTH(X) (sizeof X / sizeof X[0]) + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) + #define WIDTH(X) ((X)->w + 2 * (X)->bw) +@@ -147,6 +148,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachaside(Client *c); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -184,6 +186,7 @@ static void maprequest(XEvent *e); + static void monocle(Monitor *m); + static void motionnotify(XEvent *e); + static void movemouse(const Arg *arg); ++static Client *nexttagged(Client *c); + static Client *nexttiled(Client *c); + static void pop(Client *); + static void propertynotify(XEvent *e); +@@ -406,6 +409,17 @@ attach(Client *c) + } + + void ++attachaside(Client *c) { ++ Client *at = nexttagged(c); ++ if(!at) { ++ attach(c); ++ return; ++ } ++ c->next = at->next; ++ at->next = c; ++} ++ ++void + attachstack(Client *c) + { + c->snext = c->mon->stack; +@@ -1076,7 +1090,7 @@ manage(Window w, XWindowAttributes *wa) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) + XRaiseWindow(dpy, c->win); +- attach(c); ++ attachaside(c); + attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); +@@ -1210,6 +1224,16 @@ movemouse(const Arg *arg) + } + + Client * ++nexttagged(Client *c) { ++ Client *walked = c->mon->clients; ++ for(; ++ walked && (walked->isfloating || !ISVISIBLEONTAG(walked, c->tags)); ++ walked = walked->next ++ ); ++ return walked; ++} ++ ++Client * + nexttiled(Client *c) + { + for (; c && (c->isfloating || !ISVISIBLE(c)); c = c->next); +@@ -1434,7 +1458,7 @@ sendmon(Client *c, Monitor *m) + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); ++ attachaside(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1891,7 +1915,7 @@ updategeom(void) + m->clients = c->next; + detachstack(c); + c->mon = mons; +- attach(c); ++ attachaside(c); + attachstack(c); + } + if (m == selmon) diff --git a/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff @@ -0,0 +1,35 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..3002925 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -93,7 +93,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; + Client *next; + Client *snext; + Monitor *mon; +@@ -625,6 +625,8 @@ configurerequest(XEvent *e) + configure(c); + if (ISVISIBLE(c)) + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ else ++ c->needresize = 1; + } else + configure(c); + } else { +@@ -1610,6 +1612,12 @@ showhide(Client *c) + if (ISVISIBLE(c)) { + /* show clients top down */ + XMoveWindow(dpy, c->win, c->x, c->y); ++ if (c->needresize) { ++ c->needresize = 0; ++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ } else { ++ XMoveWindow(dpy, c->win, c->x, c->y); ++ } + if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) + resize(c, c->x, c->y, c->w, c->h, 0); + showhide(c->snext); diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.0.diff b/dwm.suckless.org/patches/dwm-autoresize-6.0.diff @@ -0,0 +1,35 @@ +diff --git a/dwm.c b/dwm.c +index 1d78655..6c61aab 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -90,7 +90,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; + Client *next; + Client *snext; + Monitor *mon; +@@ -626,6 +626,8 @@ configurerequest(XEvent *e) { + configure(c); + if(ISVISIBLE(c)) + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ else ++ c->needresize=1; + } + else + configure(c); +@@ -1644,6 +1646,12 @@ showhide(Client *c) { + return; + if(ISVISIBLE(c)) { /* show clients top down */ + XMoveWindow(dpy, c->win, c->x, c->y); ++ if(c->needresize) { ++ c->needresize=0; ++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ } else { ++ XMoveWindow(dpy, c->win, c->x, c->y); ++ } + if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) + resize(c, c->x, c->y, c->w, c->h, False); + showhide(c->snext); diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.1.diff b/dwm.suckless.org/patches/dwm-autoresize-6.1.diff @@ -0,0 +1,35 @@ +diff --git a/dwm.c b/dwm.c +index 0362114..e4e8514 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -92,7 +92,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; + Client *next; + Client *snext; + Monitor *mon; +@@ -621,6 +621,8 @@ configurerequest(XEvent *e) + configure(c); + if (ISVISIBLE(c)) + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ else ++ c->needresize = 1; + } else + configure(c); + } else { +@@ -1611,6 +1613,12 @@ showhide(Client *c) + if (ISVISIBLE(c)) { + /* show clients top down */ + XMoveWindow(dpy, c->win, c->x, c->y); ++ if (c->needresize) { ++ c->needresize = 0; ++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ } else { ++ XMoveWindow(dpy, c->win, c->x, c->y); ++ } + if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) + resize(c, c->x, c->y, c->w, c->h, 0); + showhide(c->snext); diff --git a/dwm.suckless.org/patches/dwm-azertykey.diff b/dwm.suckless.org/patches/dwm-azertykey.diff @@ -1,44 +0,0 @@ -diff -up dwm-5.8.2//config.def.h dwm-5.8.2-fr//config.def.h ---- dwm-5.8.2//config.def.h 2010-06-04 12:39:15.000000000 +0200 -+++ dwm-5.8.2-fr//config.def.h 2011-04-21 08:49:36.000000000 +0200 -@@ -65,21 +65,21 @@ static Key keys[] = { - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, -- { MODKEY, XK_0, view, {.ui = ~0 } }, -- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, -+ { MODKEY, XK_agrave, view, {.ui = ~0 } }, -+ { MODKEY|ShiftMask, XK_agrave, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, -- { MODKEY, XK_period, focusmon, {.i = +1 } }, -+ { MODKEY, XK_semicolon, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, -- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -- TAGKEYS( XK_1, 0) -- TAGKEYS( XK_2, 1) -- TAGKEYS( XK_3, 2) -- TAGKEYS( XK_4, 3) -- TAGKEYS( XK_5, 4) -- TAGKEYS( XK_6, 5) -- TAGKEYS( XK_7, 6) -- TAGKEYS( XK_8, 7) -- TAGKEYS( XK_9, 8) -+ { MODKEY|ShiftMask, XK_semicolon, tagmon, {.i = +1 } }, -+ TAGKEYS( XK_ampersand, 0) -+ TAGKEYS( XK_eacute, 1) -+ TAGKEYS( XK_quotedbl, 2) -+ TAGKEYS( XK_apostrophe, 3) -+ TAGKEYS( XK_parenleft, 4) -+ TAGKEYS( XK_minus, 5) -+ TAGKEYS( XK_egrave, 6) -+ TAGKEYS( XK_underscore, 7) -+ TAGKEYS( XK_ccedilla, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, - }; - -@@ -99,4 +99,3 @@ static Button buttons[] = { - { ClkTagBar, MODKEY, Button1, tag, {0} }, - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, - }; -- -Seulement dans dwm-5.8.2/: config.def.h.rej diff --git a/dwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff b/dwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff @@ -0,0 +1,101 @@ +diff --git a/config.def.h b/config.def.h +index fd77a07..c3a044b 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -41,6 +41,8 @@ static const Layout layouts[] = { + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "TTT", bstack }, ++ { "===", bstackhoriz }, + }; + + /* key definitions */ +@@ -76,6 +78,8 @@ static Key keys[] = { + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, ++ { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff --git a/dwm.c b/dwm.c +index b2bc9bd..8b74165 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -234,6 +234,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); ++static void bstack(Monitor *m); ++static void bstackhoriz(Monitor *m); + + /* variables */ + static const char broken[] = "broken"; +@@ -2138,3 +2140,65 @@ main(int argc, char *argv[]) + XCloseDisplay(dpy); + return EXIT_SUCCESS; + } ++ ++static void ++bstack(Monitor *m) { ++ int w, h, mh, mx, tx, ty, tw; ++ unsigned int i, n; ++ Client *c; ++ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ if (n > m->nmaster) { ++ mh = m->nmaster ? m->mfact * m->wh : 0; ++ tw = m->ww / (n - m->nmaster); ++ ty = m->wy + mh; ++ } else { ++ mh = m->wh; ++ tw = m->ww; ++ ty = m->wy; ++ } ++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { ++ if (i < m->nmaster) { ++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ h = m->wh - mh; ++ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0); ++ if (tw != m->ww) ++ tx += WIDTH(c); ++ } ++ } ++} ++ ++static void ++bstackhoriz(Monitor *m) { ++ int w, mh, mx, tx, ty, th; ++ unsigned int i, n; ++ Client *c; ++ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ if (n > m->nmaster) { ++ mh = m->nmaster ? m->mfact * m->wh : 0; ++ th = (m->wh - mh) / (n - m->nmaster); ++ ty = m->wy + mh; ++ } else { ++ th = mh = m->wh; ++ ty = m->wy; ++ } ++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { ++ if (i < m->nmaster) { ++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0); ++ if (th != m->wh) ++ ty += HEIGHT(c); ++ } ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-bottomstack-6.1.diff b/dwm.suckless.org/patches/dwm-bottomstack-6.1.diff @@ -0,0 +1,101 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..554f1db 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -39,6 +39,8 @@ static const Layout layouts[] = { + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "TTT", bstack }, ++ { "===", bstackhoriz }, + }; + + /* key definitions */ +@@ -74,6 +76,8 @@ static Key keys[] = { + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, ++ { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff --git a/dwm.c b/dwm.c +index 0362114..c313b5e 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -233,6 +233,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); ++static void bstack(Monitor *m); ++static void bstackhoriz(Monitor *m); + + /* variables */ + static const char broken[] = "broken"; +@@ -2139,3 +2141,65 @@ main(int argc, char *argv[]) + XCloseDisplay(dpy); + return EXIT_SUCCESS; + } ++ ++static void ++bstack(Monitor *m) { ++ int w, h, mh, mx, tx, ty, tw; ++ unsigned int i, n; ++ Client *c; ++ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ if (n > m->nmaster) { ++ mh = m->nmaster ? m->mfact * m->wh : 0; ++ tw = m->ww / (n - m->nmaster); ++ ty = m->wy + mh; ++ } else { ++ mh = m->wh; ++ tw = m->ww; ++ ty = m->wy; ++ } ++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { ++ if (i < m->nmaster) { ++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ h = m->wh - mh; ++ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0); ++ if (tw != m->ww) ++ tx += WIDTH(c); ++ } ++ } ++} ++ ++static void ++bstackhoriz(Monitor *m) { ++ int w, mh, mx, tx, ty, th; ++ unsigned int i, n; ++ Client *c; ++ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ if (n > m->nmaster) { ++ mh = m->nmaster ? m->mfact * m->wh : 0; ++ th = (m->wh - mh) / (n - m->nmaster); ++ ty = m->wy + mh; ++ } else { ++ th = mh = m->wh; ++ ty = m->wy; ++ } ++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { ++ if (i < m->nmaster) { ++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0); ++ if (th != m->wh) ++ ty += HEIGHT(c); ++ } ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-cdec978-alwaysfullscreen.diff b/dwm.suckless.org/patches/dwm-cdec978-alwaysfullscreen.diff @@ -1,13 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..fe5069d 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -829,7 +829,7 @@ void - focusstack(const Arg *arg) { - Client *c = NULL, *i; - -- if(!selmon->sel) -+ if(!selmon->sel || selmon->sel->isfullscreen) - return; - if(arg->i > 0) { - for(c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); diff --git a/dwm.suckless.org/patches/dwm-center-20160719-56a31dc.diff b/dwm.suckless.org/patches/dwm-center-20160719-56a31dc.diff @@ -0,0 +1,58 @@ +diff --git a/config.def.h b/config.def.h +index fd77a07..5bf4860 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -26,9 +26,9 @@ static const Rule rules[] = { + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + */ +- /* class instance title tags mask isfloating monitor */ +- { "Gimp", NULL, NULL, 0, 1, -1 }, +- { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, ++ /* class instance title tags mask iscentered isfloating monitor */ ++ { "Gimp", NULL, NULL, 0, 0, 1, -1 }, ++ { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1 }, + }; + + /* layout(s) */ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..72c9497 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -93,7 +93,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen; + Client *next; + Client *snext; + Monitor *mon; +@@ -138,6 +138,7 @@ typedef struct { + const char *instance; + const char *title; + unsigned int tags; ++ int iscentered; + int isfloating; + int monitor; + } Rule; +@@ -298,6 +299,7 @@ applyrules(Client *c) + && (!r->class || strstr(class, r->class)) + && (!r->instance || strstr(instance, r->instance))) + { ++ c->iscentered = r->iscentered; + c->isfloating = r->isfloating; + c->tags |= r->tags; + for (m = mons; m && m->num != r->monitor; m = m->next); +@@ -1066,6 +1068,11 @@ manage(Window w, XWindowAttributes *wa) + && (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my); + c->bw = borderpx; + ++ if(c->iscentered) { ++ c->x = (c->mon->mw - WIDTH(c)) / 2; ++ c->y = (c->mon->mh - HEIGHT(c)) / 2; ++ } ++ + wc.border_width = c->bw; + XConfigureWindow(dpy, w, CWBorderWidth, &wc); + XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); diff --git a/dwm.suckless.org/patches/dwm-6.1-center.diff b/dwm.suckless.org/patches/dwm-center-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-centeredmaster-20160719-56a31dc.diff b/dwm.suckless.org/patches/dwm-centeredmaster-20160719-56a31dc.diff @@ -0,0 +1,142 @@ +diff --git a/config.def.h b/config.def.h +index fd77a07..f025619 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -41,6 +41,8 @@ static const Layout layouts[] = { + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "|M|", centeredmaster }, ++ { ">M>", centeredfloatingmaster }, + }; + + /* key definitions */ +@@ -76,6 +78,8 @@ static Key keys[] = { + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, ++ { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff --git a/dwm.c b/dwm.c +index b2bc9bd..9ecabae 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -234,6 +234,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); ++static void centeredmaster(Monitor *m); ++static void centeredfloatingmaster(Monitor *m); + + /* variables */ + static const char broken[] = "broken"; +@@ -2138,3 +2140,106 @@ main(int argc, char *argv[]) + XCloseDisplay(dpy); + return EXIT_SUCCESS; + } ++ ++void ++centeredmaster(Monitor *m) ++{ ++ unsigned int i, n, h, mw, mx, my, oty, ety, tw; ++ Client *c; ++ ++ /* count number of clients in the selected monitor */ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ ++ /* initialize areas */ ++ mw = m->ww; ++ mx = 0; ++ my = 0; ++ tw = mw; ++ ++ if (n > m->nmaster) { ++ /* go mfact box in the center if more than nmaster clients */ ++ mw = m->nmaster ? m->ww * m->mfact : 0; ++ tw = m->ww - mw; ++ ++ if (n - m->nmaster > 1) { ++ /* only one client */ ++ mx = (m->ww - mw) / 2; ++ tw = (m->ww - mw) / 2; ++ } ++ } ++ ++ oty = 0; ++ ety = 0; ++ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ if (i < m->nmaster) { ++ /* nmaster clients are stacked vertically, in the center ++ * of the screen */ ++ h = (m->wh - my) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), ++ h - (2*c->bw), 0); ++ my += HEIGHT(c); ++ } else { ++ /* stack clients are stacked vertically */ ++ if ((i - m->nmaster) % 2 ) { ++ h = (m->wh - ety) / ( (1 + n - i) / 2); ++ resize(c, m->wx, m->wy + ety, tw - (2*c->bw), ++ h - (2*c->bw), 0); ++ ety += HEIGHT(c); ++ } else { ++ h = (m->wh - oty) / ((1 + n - i) / 2); ++ resize(c, m->wx + mx + mw, m->wy + oty, ++ tw - (2*c->bw), h - (2*c->bw), 0); ++ oty += HEIGHT(c); ++ } ++ } ++} ++ ++void ++centeredfloatingmaster(Monitor *m) ++{ ++ unsigned int i, n, w, mh, mw, mx, mxo, my, myo, tx; ++ Client *c; ++ ++ /* count number of clients in the selected monitor */ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ ++ /* initialize nmaster area */ ++ if (n > m->nmaster) { ++ /* go mfact box in the center if more than nmaster clients */ ++ if (m->ww > m->wh) { ++ mw = m->nmaster ? m->ww * m->mfact : 0; ++ mh = m->nmaster ? m->wh * 0.9 : 0; ++ } else { ++ mh = m->nmaster ? m->wh * m->mfact : 0; ++ mw = m->nmaster ? m->ww * 0.9 : 0; ++ } ++ mx = mxo = (m->ww - mw) / 2; ++ my = myo = (m->wh - mh) / 2; ++ } else { ++ /* go fullscreen if all clients are in the master area */ ++ mh = m->wh; ++ mw = m->ww; ++ mx = mxo = 0; ++ my = myo = 0; ++ } ++ ++ for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ if (i < m->nmaster) { ++ /* nmaster clients are stacked horizontally, in the center ++ * of the screen */ ++ w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy + my, w - (2*c->bw), ++ mh - (2*c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ /* stack clients are stacked horizontally */ ++ w = (m->ww - tx) / (n - i); ++ resize(c, m->wx + tx, m->wy, w - (2*c->bw), ++ m->wh - (2*c->bw), 0); ++ tx += WIDTH(c); ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-centeredmaster-6.1.diff b/dwm.suckless.org/patches/dwm-centeredmaster-6.1.diff @@ -0,0 +1,142 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..527b214 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -39,6 +39,8 @@ static const Layout layouts[] = { + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "|M|", centeredmaster }, ++ { ">M>", centeredfloatingmaster }, + }; + + /* key definitions */ +@@ -74,6 +76,8 @@ static Key keys[] = { + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, ++ { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff --git a/dwm.c b/dwm.c +index 0362114..1e81412 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -233,6 +233,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); ++static void centeredmaster(Monitor *m); ++static void centeredfloatingmaster(Monitor *m); + + /* variables */ + static const char broken[] = "broken"; +@@ -2139,3 +2141,106 @@ main(int argc, char *argv[]) + XCloseDisplay(dpy); + return EXIT_SUCCESS; + } ++ ++void ++centeredmaster(Monitor *m) ++{ ++ unsigned int i, n, h, mw, mx, my, oty, ety, tw; ++ Client *c; ++ ++ /* count number of clients in the selected monitor */ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ ++ /* initialize areas */ ++ mw = m->ww; ++ mx = 0; ++ my = 0; ++ tw = mw; ++ ++ if (n > m->nmaster) { ++ /* go mfact box in the center if more than nmaster clients */ ++ mw = m->nmaster ? m->ww * m->mfact : 0; ++ tw = m->ww - mw; ++ ++ if (n - m->nmaster > 1) { ++ /* only one client */ ++ mx = (m->ww - mw) / 2; ++ tw = (m->ww - mw) / 2; ++ } ++ } ++ ++ oty = 0; ++ ety = 0; ++ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ if (i < m->nmaster) { ++ /* nmaster clients are stacked vertically, in the center ++ * of the screen */ ++ h = (m->wh - my) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw), ++ h - (2*c->bw), 0); ++ my += HEIGHT(c); ++ } else { ++ /* stack clients are stacked vertically */ ++ if ((i - m->nmaster) % 2 ) { ++ h = (m->wh - ety) / ( (1 + n - i) / 2); ++ resize(c, m->wx, m->wy + ety, tw - (2*c->bw), ++ h - (2*c->bw), 0); ++ ety += HEIGHT(c); ++ } else { ++ h = (m->wh - oty) / ((1 + n - i) / 2); ++ resize(c, m->wx + mx + mw, m->wy + oty, ++ tw - (2*c->bw), h - (2*c->bw), 0); ++ oty += HEIGHT(c); ++ } ++ } ++} ++ ++void ++centeredfloatingmaster(Monitor *m) ++{ ++ unsigned int i, n, w, mh, mw, mx, mxo, my, myo, tx; ++ Client *c; ++ ++ /* count number of clients in the selected monitor */ ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if (n == 0) ++ return; ++ ++ /* initialize nmaster area */ ++ if (n > m->nmaster) { ++ /* go mfact box in the center if more than nmaster clients */ ++ if (m->ww > m->wh) { ++ mw = m->nmaster ? m->ww * m->mfact : 0; ++ mh = m->nmaster ? m->wh * 0.9 : 0; ++ } else { ++ mh = m->nmaster ? m->wh * m->mfact : 0; ++ mw = m->nmaster ? m->ww * 0.9 : 0; ++ } ++ mx = mxo = (m->ww - mw) / 2; ++ my = myo = (m->wh - mh) / 2; ++ } else { ++ /* go fullscreen if all clients are in the master area */ ++ mh = m->wh; ++ mw = m->ww; ++ mx = mxo = 0; ++ my = myo = 0; ++ } ++ ++ for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ if (i < m->nmaster) { ++ /* nmaster clients are stacked horizontally, in the center ++ * of the screen */ ++ w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i); ++ resize(c, m->wx + mx, m->wy + my, w - (2*c->bw), ++ mh - (2*c->bw), 0); ++ mx += WIDTH(c); ++ } else { ++ /* stack clients are stacked horizontally */ ++ w = (m->ww - tx) / (n - i); ++ resize(c, m->wx + tx, m->wy, w - (2*c->bw), ++ m->wh - (2*c->bw), 0); ++ tx += WIDTH(c); ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-5.6.1-cpt.diff b/dwm.suckless.org/patches/dwm-clientspertag-5.6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-column_master.diff b/dwm.suckless.org/patches/dwm-columns-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-5.9-combo.diff b/dwm.suckless.org/patches/dwm-combo-5.9.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-combo.diff b/dwm.suckless.org/patches/dwm-combo-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-combo.diff b/dwm.suckless.org/patches/dwm-combo-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-5.8.2-current_desktop.diff b/dwm.suckless.org/patches/dwm-current_desktop-5.8.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-dualstatus.diff b/dwm.suckless.org/patches/dwm-dualstatus-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-dualstatus.diff b/dwm.suckless.org/patches/dwm-dualstatus-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff b/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff @@ -0,0 +1,217 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..9f4ef79 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -111,3 +111,65 @@ static Button buttons[] = { + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + }; + ++static const char *dwmfifo = "/tmp/dwm.fifo"; ++static Command commands[] = { ++ { "dmenu", spawn, {.v = dmenucmd} }, ++ { "term", spawn, {.v = termcmd} }, ++ { "togglebar", togglebar, {0} }, ++ { "focusstack+", focusstack, {.i = +1} }, ++ { "focusstack-", focusstack, {.i = -1} }, ++ { "incnmaster+", incnmaster, {.i = +1} }, ++ { "incnmaster-", incnmaster, {.i = -1} }, ++ { "setmfact+", setmfact, {.f = +0.05} }, ++ { "setmfact-", setmfact, {.f = -0.05} }, ++ { "zoom", zoom, {0} }, ++ { "view", view, {0} }, ++ { "killclient", killclient, {0} }, ++ { "setlayout-tiled", setlayout, {.v = &layouts[0]} }, ++ { "setlayout-float", setlayout, {.v = &layouts[1]} }, ++ { "setlayout-mono", setlayout, {.v = &layouts[2]} }, ++ { "togglelayout", setlayout, {0} }, ++ { "togglefloating", togglefloating, {0} }, ++ { "viewall", view, {.ui = ~0} }, ++ { "tag", tag, {.ui = ~0} }, ++ { "focusmon+", focusmon, {.i = +1} }, ++ { "focusmon-", focusmon, {.i = -1} }, ++ { "tagmon+", tagmon, {.i = +1} }, ++ { "tagmon-", tagmon, {.i = -1} }, ++ { "view1", view, {.ui = 1 << 0} }, ++ { "view2", view, {.ui = 1 << 1} }, ++ { "view3", view, {.ui = 1 << 2} }, ++ { "view4", view, {.ui = 1 << 3} }, ++ { "view5", view, {.ui = 1 << 4} }, ++ { "view6", view, {.ui = 1 << 5} }, ++ { "view7", view, {.ui = 1 << 6} }, ++ { "view8", view, {.ui = 1 << 7} }, ++ { "view9", view, {.ui = 1 << 8} }, ++ { "toggleview1", toggleview, {.ui = 1 << 0} }, ++ { "toggleview2", toggleview, {.ui = 1 << 1} }, ++ { "toggleview3", toggleview, {.ui = 1 << 2} }, ++ { "toggleview4", toggleview, {.ui = 1 << 3} }, ++ { "toggleview5", toggleview, {.ui = 1 << 4} }, ++ { "toggleview6", toggleview, {.ui = 1 << 5} }, ++ { "toggleview7", toggleview, {.ui = 1 << 6} }, ++ { "toggleview8", toggleview, {.ui = 1 << 7} }, ++ { "toggleview9", toggleview, {.ui = 1 << 8} }, ++ { "tag1", tag, {.ui = 1 << 0} }, ++ { "tag2", tag, {.ui = 1 << 1} }, ++ { "tag3", tag, {.ui = 1 << 2} }, ++ { "tag4", tag, {.ui = 1 << 3} }, ++ { "tag5", tag, {.ui = 1 << 4} }, ++ { "tag6", tag, {.ui = 1 << 5} }, ++ { "tag7", tag, {.ui = 1 << 6} }, ++ { "tag8", tag, {.ui = 1 << 7} }, ++ { "tag9", tag, {.ui = 1 << 8} }, ++ { "toggletag1", toggletag, {.ui = 1 << 0} }, ++ { "toggletag2", toggletag, {.ui = 1 << 1} }, ++ { "toggletag3", toggletag, {.ui = 1 << 2} }, ++ { "toggletag4", toggletag, {.ui = 1 << 3} }, ++ { "toggletag5", toggletag, {.ui = 1 << 4} }, ++ { "toggletag6", toggletag, {.ui = 1 << 5} }, ++ { "toggletag7", toggletag, {.ui = 1 << 6} }, ++ { "toggletag8", toggletag, {.ui = 1 << 7} }, ++ { "toggletag9", toggletag, {.ui = 1 << 8} }, ++}; +diff --git a/dwm.c b/dwm.c +index 0362114..5c45d2a 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -21,6 +21,7 @@ + * To understand everything else, start reading main(). + */ + #include <errno.h> ++#include <fcntl.h> + #include <locale.h> + #include <signal.h> + #include <stdarg.h> +@@ -28,6 +29,8 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <sys/select.h> ++#include <sys/stat.h> + #include <sys/types.h> + #include <sys/wait.h> + #include <X11/cursorfont.h> +@@ -141,6 +144,12 @@ typedef struct { + int monitor; + } Rule; + ++typedef struct { ++ const char *name; ++ void (*func)(const Arg *arg); ++ const Arg arg; ++} Command; ++ + /* function declarations */ + static void applyrules(Client *c); + static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); +@@ -162,9 +171,11 @@ static void destroynotify(XEvent *e); + static void detach(Client *c); + static void detachstack(Client *c); + static Monitor *dirtomon(int dir); ++static void dispatchcmd(void); + static void drawbar(Monitor *m); + static void drawbars(void); + static void enternotify(XEvent *e); ++static Bool evpredicate(); + static void expose(XEvent *e); + static void focus(Client *c); + static void focusin(XEvent *e); +@@ -266,6 +277,7 @@ static Display *dpy; + static Drw *drw; + static Monitor *mons, *selmon; + static Window root; ++static int fifofd; + + /* configuration, allows nested code to access above variables */ + #include "config.h" +@@ -490,6 +502,7 @@ cleanup(void) + XSync(dpy, False); + XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); ++ close(fifofd); + } + + void +@@ -702,6 +715,25 @@ dirtomon(int dir) + } + + void ++dispatchcmd(void) ++{ ++ int i; ++ char buf[BUFSIZ]; ++ ssize_t n; ++ ++ n = read(fifofd, buf, sizeof(buf) - 1); ++ if (n == -1) ++ die("Failed to read() from DWM fifo %s:", dwmfifo); ++ buf[n] = '\0'; ++ for (i = 0; i < LENGTH(commands); i++) { ++ if (strcmp(commands[i].name, buf) == 0) { ++ commands[i].func(&commands[i].arg); ++ break; ++ } ++ } ++} ++ ++void + drawbar(Monitor *m) + { + int x, xx, w, dx; +@@ -781,6 +813,12 @@ enternotify(XEvent *e) + focus(c); + } + ++Bool ++evpredicate() ++{ ++ return True; ++} ++ + void + expose(XEvent *e) + { +@@ -1390,11 +1428,30 @@ void + run(void) + { + XEvent ev; +- /* main event loop */ +- XSync(dpy, False); +- while (running && !XNextEvent(dpy, &ev)) +- if (handler[ev.type]) +- handler[ev.type](&ev); /* call handler */ ++ fd_set rfds; ++ int n; ++ int dpyfd, maxfd; ++ /* main event loop */ ++ XSync(dpy, False); ++ dpyfd = ConnectionNumber(dpy); ++ maxfd = fifofd; ++ if (dpyfd > maxfd) ++ maxfd = dpyfd; ++ maxfd++; ++ while (running) { ++ FD_ZERO(&rfds); ++ FD_SET(fifofd, &rfds); ++ FD_SET(dpyfd, &rfds); ++ n = select(maxfd, &rfds, NULL, NULL, NULL); ++ if (n > 0) { ++ if (FD_ISSET(fifofd, &rfds)) ++ dispatchcmd(); ++ if (FD_ISSET(dpyfd, &rfds)) ++ while (XCheckIfEvent(dpy, &ev, evpredicate, NULL)) ++ if (handler[ev.type]) ++ handler[ev.type](&ev); /* call handler */ ++ } ++ } + } + + void +@@ -1601,6 +1658,9 @@ setup(void) + XSelectInput(dpy, root, wa.event_mask); + grabkeys(); + focus(NULL); ++ fifofd = open(dwmfifo, O_RDWR | O_NONBLOCK); ++ if (fifofd < 0) ++ die("Failed to open() DWM fifo %s:", dwmfifo); + } + + void diff --git a/dwm.suckless.org/patches/dwm-6.0-emptyview.diff b/dwm.suckless.org/patches/dwm-emptyview-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-fancybar.diff b/dwm.suckless.org/patches/dwm-fancybar-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-fancybar-git-20160725-7af4d43.diff b/dwm.suckless.org/patches/dwm-fancybar-git-20160725-7af4d43.diff @@ -0,0 +1,74 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..32e94a7 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -708,10 +708,10 @@ dirtomon(int dir) + void + drawbar(Monitor *m) + { +- int x, w, sw = 0; ++ int x, w, sw = 0, tw, mw, ew = 0; + int boxs = drw->fonts->h / 9; + int boxw = drw->fonts->h / 6 + 2; +- unsigned int i, occ = 0, urg = 0; ++ unsigned int i, occ = 0, urg = 0, n = 0; + Client *c; + + /* draw status first so it can be overdrawn by tags later */ +@@ -722,6 +722,8 @@ drawbar(Monitor *m) + } + + for (c = m->clients; c; c = c->next) { ++ if (ISVISIBLE(c)) ++ n++; + occ |= c->tags; + if (c->isurgent) + urg |= c->tags; +@@ -742,15 +744,39 @@ drawbar(Monitor *m) + x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); + + if ((w = m->ww - sw - x) > bh) { +- if (m->sel) { +- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); +- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); +- if (m->sel->isfloating) +- drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); +- } else { +- drw_setscheme(drw, scheme[SchemeNorm]); +- drw_rect(drw, x, 0, w, bh, 1, 1); ++ if (n > 0) { ++ tw = TEXTW(m->sel->name); ++ mw = (tw >= w || n == 1) ? 0 : (w - tw) / (n - 1); ++ ++ i = 0; ++ for (c = m->clients; c; c = c->next) { ++ if (!ISVISIBLE(c) || c == m->sel) ++ continue; ++ tw = TEXTW(c->name); ++ if(tw < mw) ++ ew += (mw - tw); ++ else ++ i++; ++ } ++ if (i > 0) ++ mw += ew / i; ++ ++ for (c = m->clients; c; c = c->next) { ++ if (!ISVISIBLE(c)) ++ continue; ++ tw = MIN(m->sel == c ? w : mw, TEXTW(c->name)); ++ ++ drw_setscheme(drw, scheme[m->sel == c ? SchemeSel : SchemeNorm]); ++ if (tw > 0) /* trap special handling of 0 in drw_text */ ++ drw_text(drw, x, 0, tw, bh, lrpad / 2, c->name, 0); ++ if (c->isfloating) ++ drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0); ++ x += tw; ++ w -= tw; ++ } + } ++ drw_setscheme(drw, scheme[SchemeNorm]); ++ drw_rect(drw, x, 0, w, bh, 1, 1); + } + drw_map(drw, m->barwin, 0, 0, m->ww, bh); + } diff --git a/dwm.suckless.org/patches/dwm-5.8.2-fibonacci.diff b/dwm.suckless.org/patches/dwm-fibonacci-5.8.2.diff diff --git a/dwm.suckless.org/patches/flextile-5.8.2.diff b/dwm.suckless.org/patches/dwm-flextile-5.8.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-float_border_color2.diff b/dwm.suckless.org/patches/dwm-float_border_color-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-float_border_color2.diff b/dwm.suckless.org/patches/dwm-float_border_color-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-float_border_color2-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-float_border_color2-20160731-56a31dc.diff @@ -0,0 +1,90 @@ +URL: http://dwm.suckless.org/patches/historical/float_border_color +float_border_color2 allows you to specify a different border color for floating +windows. + +Index: dwm/config.def.h +=================================================================== +--- dwm/config.def.h.orig ++++ dwm/config.def.h +@@ -12,10 +12,10 @@ static const char col_gray2[] = "# + static const char col_gray3[] = "#bbbbbb"; + static const char col_gray4[] = "#eeeeee"; + static const char col_cyan[] = "#005577"; +-static const char *colors[SchemeLast][3] = { +- /* fg bg border */ +- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, +- [SchemeSel] = { col_gray4, col_cyan, col_cyan }, ++static const char *colors[SchemeLast][4] = { ++ /* fg bg border float */ ++ [SchemeNorm] = { col_gray3, col_gray1, col_gray2, col_gray2 }, ++ [SchemeSel] = { col_gray4, col_cyan, col_gray2, col_cyan }, + }; + + /* tagging */ +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -57,6 +57,7 @@ + #define TAGMASK ((1 << LENGTH(tags)) - 1) + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) + #define ColBorder 2 ++#define ColFloat 3 + + /* enums */ + enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ +@@ -809,7 +810,10 @@ focus(Client *c) + detachstack(c); + attachstack(c); + grabbuttons(c, 1); +- XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); ++ if(c->isfloating) ++ XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel); ++ else ++ XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); + setfocus(c); + } else { + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); +@@ -1068,7 +1072,10 @@ manage(Window w, XWindowAttributes *wa) + + wc.border_width = c->bw; + XConfigureWindow(dpy, w, CWBorderWidth, &wc); +- XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); ++ if(c->isfloating) ++ XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel); ++ else ++ XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); + configure(c); /* propagates border_width, if size doesn't change */ + updatewindowtype(c); + updatesizehints(c); +@@ -1079,6 +1086,8 @@ manage(Window w, XWindowAttributes *wa) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) + XRaiseWindow(dpy, c->win); ++ if(c->isfloating) ++ XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel); + attach(c); + attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, +@@ -1583,8 +1592,8 @@ setup(void) + cursor[CurResize] = drw_cur_create(drw, XC_sizing); + cursor[CurMove] = drw_cur_create(drw, XC_fleur); + /* init appearance */ +- scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 3); +- scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 3); ++ scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 4); ++ scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 4); + /* init bars */ + updatebars(); + updatestatus(); +@@ -1706,6 +1715,10 @@ togglefloating(const Arg *arg) + return; + selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; + if (selmon->sel->isfloating) ++ XSetWindowBorder(dpy, selmon->sel->win, scheme[SchemeSel][ColFloat].pixel); ++ else ++ XSetWindowBorder(dpy, selmon->sel->win, scheme[SchemeSel][ColBorder].pixel); ++ if(selmon->sel->isfloating) + resize(selmon->sel, selmon->sel->x, selmon->sel->y, + selmon->sel->w, selmon->sel->h, 0); + arrange(selmon); diff --git a/dwm.suckless.org/patches/dwm-6.0-focusonclick.diff b/dwm.suckless.org/patches/dwm-focusonclick-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-gaplessgrid-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-gaplessgrid-20160731-56a31dc.diff @@ -0,0 +1,43 @@ +URL: http://dwm.suckless.org/patches/gapless_grid +Add gapless grid layout. + +Index: dwm/gaplessgrid.c +=================================================================== +--- /dev/null ++++ dwm/gaplessgrid.c +@@ -0,0 +1,35 @@ ++void ++gaplessgrid(Monitor *m) { ++ unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch; ++ Client *c; ++ ++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) ; ++ if(n == 0) ++ return; ++ ++ /* grid dimensions */ ++ for(cols = 0; cols <= n/2; cols++) ++ if(cols*cols >= n) ++ break; ++ if(n == 5) /* set layout against the general calculation: not 1:2:2, but 2:3 */ ++ cols = 2; ++ rows = n/cols; ++ ++ /* window geometries */ ++ cw = cols ? m->ww / cols : m->ww; ++ cn = 0; /* current column number */ ++ rn = 0; /* current row number */ ++ for(i = 0, c = nexttiled(m->clients); c; i++, c = nexttiled(c->next)) { ++ if(i/rows + 1 > cols - n%cols) ++ rows = n/cols + 1; ++ ch = rows ? m->wh / rows : m->wh; ++ cx = m->wx + cn*cw; ++ cy = m->wy + rn*ch; ++ resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, False); ++ rn++; ++ if(rn >= rows) { ++ rn = 0; ++ cn++; ++ } ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-6.1-gaplessgrid.diff b/dwm.suckless.org/patches/dwm-gaplessgrid-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-gaps.diff b/dwm.suckless.org/patches/dwm-gaps-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff b/dwm.suckless.org/patches/dwm-gridmode-5.8.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff b/dwm.suckless.org/patches/dwm-hide_vacant_tags-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-hide_vacant_tags-git-20160626-7af4d43.diff b/dwm.suckless.org/patches/dwm-hide_vacant_tags-git-20160626-7af4d43.diff @@ -0,0 +1,52 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..d9a333a 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -417,7 +417,7 @@ attachstack(Client *c) + void + buttonpress(XEvent *e) + { +- unsigned int i, x, click; ++ unsigned int i, x, click, occ = 0; + Arg arg = {0}; + Client *c; + Monitor *m; +@@ -432,9 +432,13 @@ buttonpress(XEvent *e) + } + if (ev->window == selmon->barwin) { + i = x = 0; +- do ++ for (c = m->clients; c; c = c->next) ++ occ |= c->tags == 255 ? 0 : c->tags; ++ do { ++ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) ++ continue; + x += TEXTW(tags[i]); +- while (ev->x >= x && ++i < LENGTH(tags)); ++ } while (ev->x >= x && ++i < LENGTH(tags)); + if (i < LENGTH(tags)) { + click = ClkTagBar; + arg.ui = 1 << i; +@@ -722,19 +726,17 @@ drawbar(Monitor *m) + } + + for (c = m->clients; c; c = c->next) { +- occ |= c->tags; ++ occ |= c->tags == 255 ? 0 : c->tags; + if (c->isurgent) + urg |= c->tags; + } + x = 0; + for (i = 0; i < LENGTH(tags); i++) { ++ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) ++ continue; + w = TEXTW(tags[i]); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); +- if (occ & 1 << i) +- drw_rect(drw, x + boxs, boxs, boxw, boxw, +- m == selmon && selmon->sel && selmon->sel->tags & 1 << i, +- urg & 1 << i); + x += w; + } + w = blw = TEXTW(m->ltsymbol); diff --git a/dwm.suckless.org/patches/dwm-6.1-horizgrid.diff b/dwm.suckless.org/patches/dwm-horizgrid-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-keycode-20160702-56a31dc.diff b/dwm.suckless.org/patches/dwm-keycode-20160702-56a31dc.diff @@ -0,0 +1,133 @@ +diff --git a/config.def.h b/config.def.h +index fd77a07..7a568df 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -60,40 +60,40 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, + static const char *termcmd[] = { "st", NULL }; + + static Key keys[] = { +- /* modifier key function argument */ +- { MODKEY, XK_p, spawn, {.v = dmenucmd } }, +- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, +- { MODKEY, XK_b, togglebar, {0} }, +- { MODKEY, XK_j, focusstack, {.i = +1 } }, +- { MODKEY, XK_k, focusstack, {.i = -1 } }, +- { MODKEY, XK_i, incnmaster, {.i = +1 } }, +- { MODKEY, XK_d, incnmaster, {.i = -1 } }, +- { MODKEY, XK_h, setmfact, {.f = -0.05} }, +- { MODKEY, XK_l, setmfact, {.f = +0.05} }, +- { MODKEY, XK_Return, zoom, {0} }, +- { MODKEY, XK_Tab, view, {0} }, +- { MODKEY|ShiftMask, XK_c, killclient, {0} }, +- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, +- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, +- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, +- { MODKEY, XK_space, setlayout, {0} }, +- { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, +- { MODKEY, XK_0, view, {.ui = ~0 } }, +- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, +- { MODKEY, XK_comma, focusmon, {.i = -1 } }, +- { MODKEY, XK_period, focusmon, {.i = +1 } }, +- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, +- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, +- TAGKEYS( XK_1, 0) +- TAGKEYS( XK_2, 1) +- TAGKEYS( XK_3, 2) +- TAGKEYS( XK_4, 3) +- TAGKEYS( XK_5, 4) +- TAGKEYS( XK_6, 5) +- TAGKEYS( XK_7, 6) +- TAGKEYS( XK_8, 7) +- TAGKEYS( XK_9, 8) +- { MODKEY|ShiftMask, XK_q, quit, {0} }, ++ /* modifier key function argument */ ++ { MODKEY, 33, spawn, {.v = dmenucmd } }, // p ++ { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return ++ { MODKEY, 56, togglebar, {0} }, // b ++ { MODKEY, 44, focusstack, {.i = +1 } }, // j ++ { MODKEY, 45, focusstack, {.i = -1 } }, // k ++ { MODKEY, 31, incnmaster, {.i = +1 } }, // i ++ { MODKEY, 40, incnmaster, {.i = -1 } }, // d ++ { MODKEY, 43, setmfact, {.f = -0.05} }, // h ++ { MODKEY, 46, setmfact, {.f = +0.05} }, // l ++ { MODKEY, 36, zoom, {0} }, // Return ++ { MODKEY, 23, view, {0} }, // Tab ++ { MODKEY|ShiftMask, 54, killclient, {0} }, // c ++ { MODKEY, 28, setlayout, {.v = &layouts[0]} }, // t ++ { MODKEY, 41, setlayout, {.v = &layouts[1]} }, // f ++ { MODKEY, 58, setlayout, {.v = &layouts[2]} }, // m ++ { MODKEY, 65, setlayout, {0} }, // space ++ { MODKEY|ShiftMask, 65, togglefloating, {0} }, // space ++ { MODKEY, 19, view, {.ui = ~0 } }, // 0 ++ { MODKEY|ShiftMask, 19, tag, {.ui = ~0 } }, // 0 ++ { MODKEY, 59, focusmon, {.i = -1 } }, // comma ++ { MODKEY, 60, focusmon, {.i = +1 } }, // period ++ { MODKEY|ShiftMask, 59, tagmon, {.i = -1 } }, // comma ++ { MODKEY|ShiftMask, 60, tagmon, {.i = +1 } }, // period ++ TAGKEYS( 10, 0) // 1 ++ TAGKEYS( 11, 1) // 2 ++ TAGKEYS( 12, 2) // 3 ++ TAGKEYS( 13, 3) // 4 ++ TAGKEYS( 14, 4) // 5 ++ TAGKEYS( 15, 5) // 6 ++ TAGKEYS( 16, 6) // 7 ++ TAGKEYS( 17, 7) // 8 ++ TAGKEYS( 18, 8) // 9 ++ { MODKEY|ShiftMask, 24, quit, {0} }, // q + }; + + /* button definitions */ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..f36285a 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -31,7 +31,6 @@ + #include <sys/types.h> + #include <sys/wait.h> + #include <X11/cursorfont.h> +-#include <X11/keysym.h> + #include <X11/Xatom.h> + #include <X11/Xlib.h> + #include <X11/Xproto.h> +@@ -102,7 +101,7 @@ struct Client { + + typedef struct { + unsigned int mod; +- KeySym keysym; ++ KeyCode keycode; + void (*func)(const Arg *); + const Arg arg; + } Key; +@@ -969,14 +968,12 @@ grabkeys(void) + { + unsigned int i, j; + unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; +- KeyCode code; + + XUngrabKey(dpy, AnyKey, AnyModifier, root); + for (i = 0; i < LENGTH(keys); i++) +- if ((code = XKeysymToKeycode(dpy, keys[i].keysym))) +- for (j = 0; j < LENGTH(modifiers); j++) +- XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, +- True, GrabModeAsync, GrabModeAsync); ++ for (j = 0; j < LENGTH(modifiers); j++) ++ XGrabKey(dpy, keys[i].keycode, keys[i].mod | modifiers[j], root, ++ True, GrabModeAsync, GrabModeAsync); + } + } + +@@ -1003,13 +1000,11 @@ void + keypress(XEvent *e) + { + unsigned int i; +- KeySym keysym; + XKeyEvent *ev; + + ev = &e->xkey; +- keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); + for (i = 0; i < LENGTH(keys); i++) +- if (keysym == keys[i].keysym ++ if (ev->keycode == keys[i].keycode + && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) + && keys[i].func) + keys[i].func(&(keys[i].arg)); diff --git a/dwm.suckless.org/patches/dwm-keycode-6.1.diff b/dwm.suckless.org/patches/dwm-keycode-6.1.diff @@ -0,0 +1,133 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..f59d1eb 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -58,40 +58,40 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, + static const char *termcmd[] = { "st", NULL }; + + static Key keys[] = { +- /* modifier key function argument */ +- { MODKEY, XK_p, spawn, {.v = dmenucmd } }, +- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, +- { MODKEY, XK_b, togglebar, {0} }, +- { MODKEY, XK_j, focusstack, {.i = +1 } }, +- { MODKEY, XK_k, focusstack, {.i = -1 } }, +- { MODKEY, XK_i, incnmaster, {.i = +1 } }, +- { MODKEY, XK_d, incnmaster, {.i = -1 } }, +- { MODKEY, XK_h, setmfact, {.f = -0.05} }, +- { MODKEY, XK_l, setmfact, {.f = +0.05} }, +- { MODKEY, XK_Return, zoom, {0} }, +- { MODKEY, XK_Tab, view, {0} }, +- { MODKEY|ShiftMask, XK_c, killclient, {0} }, +- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, +- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, +- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, +- { MODKEY, XK_space, setlayout, {0} }, +- { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, +- { MODKEY, XK_0, view, {.ui = ~0 } }, +- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, +- { MODKEY, XK_comma, focusmon, {.i = -1 } }, +- { MODKEY, XK_period, focusmon, {.i = +1 } }, +- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, +- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, +- TAGKEYS( XK_1, 0) +- TAGKEYS( XK_2, 1) +- TAGKEYS( XK_3, 2) +- TAGKEYS( XK_4, 3) +- TAGKEYS( XK_5, 4) +- TAGKEYS( XK_6, 5) +- TAGKEYS( XK_7, 6) +- TAGKEYS( XK_8, 7) +- TAGKEYS( XK_9, 8) +- { MODKEY|ShiftMask, XK_q, quit, {0} }, ++ /* modifier key function argument */ ++ { MODKEY, 33, spawn, {.v = dmenucmd } }, // p ++ { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return ++ { MODKEY, 56, togglebar, {0} }, // b ++ { MODKEY, 44, focusstack, {.i = +1 } }, // j ++ { MODKEY, 45, focusstack, {.i = -1 } }, // k ++ { MODKEY, 31, incnmaster, {.i = +1 } }, // i ++ { MODKEY, 40, incnmaster, {.i = -1 } }, // d ++ { MODKEY, 43, setmfact, {.f = -0.05} }, // h ++ { MODKEY, 46, setmfact, {.f = +0.05} }, // l ++ { MODKEY, 36, zoom, {0} }, // Return ++ { MODKEY, 23, view, {0} }, // Tab ++ { MODKEY|ShiftMask, 54, killclient, {0} }, // c ++ { MODKEY, 28, setlayout, {.v = &layouts[0]} }, // t ++ { MODKEY, 41, setlayout, {.v = &layouts[1]} }, // f ++ { MODKEY, 58, setlayout, {.v = &layouts[2]} }, // m ++ { MODKEY, 65, setlayout, {0} }, // space ++ { MODKEY|ShiftMask, 65, togglefloating, {0} }, // space ++ { MODKEY, 19, view, {.ui = ~0 } }, // 0 ++ { MODKEY|ShiftMask, 19, tag, {.ui = ~0 } }, // 0 ++ { MODKEY, 59, focusmon, {.i = -1 } }, // comma ++ { MODKEY, 60, focusmon, {.i = +1 } }, // period ++ { MODKEY|ShiftMask, 59, tagmon, {.i = -1 } }, // comma ++ { MODKEY|ShiftMask, 60, tagmon, {.i = +1 } }, // period ++ TAGKEYS( 10, 0) // 1 ++ TAGKEYS( 11, 1) // 2 ++ TAGKEYS( 12, 2) // 3 ++ TAGKEYS( 13, 3) // 4 ++ TAGKEYS( 14, 4) // 5 ++ TAGKEYS( 15, 5) // 6 ++ TAGKEYS( 16, 6) // 7 ++ TAGKEYS( 17, 7) // 8 ++ TAGKEYS( 18, 8) // 9 ++ { MODKEY|ShiftMask, 24, quit, {0} }, // q + }; + + /* button definitions */ +diff --git a/dwm.c b/dwm.c +index 0362114..60dd817 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -31,7 +31,6 @@ + #include <sys/types.h> + #include <sys/wait.h> + #include <X11/cursorfont.h> +-#include <X11/keysym.h> + #include <X11/Xatom.h> + #include <X11/Xlib.h> + #include <X11/Xproto.h> +@@ -101,7 +100,7 @@ struct Client { + + typedef struct { + unsigned int mod; +- KeySym keysym; ++ KeyCode keycode; + void (*func)(const Arg *); + const Arg arg; + } Key; +@@ -967,14 +966,12 @@ grabkeys(void) + { + unsigned int i, j; + unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; +- KeyCode code; + + XUngrabKey(dpy, AnyKey, AnyModifier, root); + for (i = 0; i < LENGTH(keys); i++) +- if ((code = XKeysymToKeycode(dpy, keys[i].keysym))) +- for (j = 0; j < LENGTH(modifiers); j++) +- XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, +- True, GrabModeAsync, GrabModeAsync); ++ for (j = 0; j < LENGTH(modifiers); j++) ++ XGrabKey(dpy, keys[i].keycode, keys[i].mod | modifiers[j], root, ++ True, GrabModeAsync, GrabModeAsync); + } + } + +@@ -1001,13 +998,11 @@ void + keypress(XEvent *e) + { + unsigned int i; +- KeySym keysym; + XKeyEvent *ev; + + ev = &e->xkey; +- keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); + for (i = 0; i < LENGTH(keys); i++) +- if (keysym == keys[i].keysym ++ if (ev->keycode == keys[i].keycode + && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) + && keys[i].func) + keys[i].func(&(keys[i].arg)); diff --git a/dwm.suckless.org/patches/dwm-6.0-keypressrelease.diff b/dwm.suckless.org/patches/dwm-keypressrelease-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-mark.diff b/dwm.suckless.org/patches/dwm-mark-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-mark-new.diff b/dwm.suckless.org/patches/dwm-mark-new-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-maximize_vert_horz-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-maximize_vert_horz-20160731-56a31dc.diff @@ -0,0 +1,77 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/maximize +These patches provide helper functions for moving and resizing floating windows +using keybindings. + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -93,7 +93,7 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; + Client *next; + Client *snext; + Monitor *mon; +@@ -1075,6 +1075,8 @@ manage(Window w, XWindowAttributes *wa) + updatewmhints(c); + XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); + grabbuttons(c, 0); ++ c->wasfloating = 0; ++ c->ismax = 0; + if (!c->isfloating) + c->isfloating = c->oldstate = trans != None || c->isfixed; + if (c->isfloating) +Index: dwm/maximize.c +=================================================================== +--- /dev/null ++++ dwm/maximize.c +@@ -0,0 +1,45 @@ ++void ++maximize(int x, int y, int w, int h) { ++ XEvent ev; ++ ++ if(!selmon->sel || selmon->sel->isfixed) ++ return; ++ XRaiseWindow(dpy, selmon->sel->win); ++ if(!selmon->sel->ismax) { ++ if(!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating) ++ selmon->sel->wasfloating = True; ++ else { ++ togglefloating(NULL); ++ selmon->sel->wasfloating = False; ++ } ++ selmon->sel->oldx = selmon->sel->x; ++ selmon->sel->oldy = selmon->sel->y; ++ selmon->sel->oldw = selmon->sel->w; ++ selmon->sel->oldh = selmon->sel->h; ++ resize(selmon->sel, x, y, w, h, True); ++ selmon->sel->ismax = True; ++ } ++ else { ++ resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, True); ++ if(!selmon->sel->wasfloating) ++ togglefloating(NULL); ++ selmon->sel->ismax = False; ++ } ++ drawbar(selmon); ++ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); ++} ++ ++void ++togglemaximize(const Arg *arg) { ++ maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx); ++} ++ ++void ++toggleverticalmax(const Arg *arg) { ++ maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx); ++} ++ ++void ++togglehorizontalmax(const Arg *arg) { ++ maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h); ++} diff --git a/dwm.suckless.org/patches/dwm-6.0-maximize_vert_horz.diff b/dwm.suckless.org/patches/dwm-maximize_vert_horz-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-maximize_vert_horz.diff b/dwm.suckless.org/patches/dwm-maximize_vert_horz-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-5.8.2-monocle_count.diff b/dwm.suckless.org/patches/dwm-monocle_count-5.8.2.diff diff --git a/dwm.suckless.org/patches/dwm-moveresize-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-moveresize-20160731-56a31dc.diff @@ -0,0 +1,74 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/moveresize +These patches provide helper functions for moving and resizing floating windows +using keybindings. + +Index: dwm/moveresize.c +=================================================================== +--- /dev/null ++++ dwm/moveresize.c +@@ -0,0 +1,64 @@ ++void ++moveresize(const Arg *arg) { ++ /* only floating windows can be moved */ ++ Client *c; ++ c = selmon->sel; ++ int x, y, w, h, nx, ny, nw, nh, ox, oy, ow, oh; ++ char xAbs, yAbs, wAbs, hAbs; ++ int msx, msy, dx, dy, nmx, nmy; ++ unsigned int dui; ++ Window dummy; ++ ++ if (!c || !arg) ++ return; ++ if (selmon->lt[selmon->sellt]->arrange && !c->isfloating) ++ return; ++ if(sscanf((char *)arg->v, "%d%c %d%c %d%c %d%c", &x, &xAbs, &y, &yAbs, &w, &wAbs, &h, &hAbs) != 8) ++ return; ++ /* compute new window position; prevent window from be positioned outside the current monitor */ ++ nw = c->w + w; ++ if(wAbs == 'W') ++ nw = w < selmon->mw - 2 * c->bw ? w : selmon->mw - 2 * c->bw; ++ ++ nh = c->h + h; ++ if(hAbs == 'H') ++ nh = h < selmon->mh - 2 * c->bw ? h : selmon->mh - 2 * c->bw; ++ ++ nx = c->x + x; ++ if(xAbs == 'X') { ++ if(x < selmon->mx) ++ nx = selmon->mx; ++ else if(x > selmon->mx + selmon->mw) ++ nx = selmon->mx + selmon->mw - nw - 2 * c->bw; ++ else ++ nx = x; ++ } ++ ++ ny = c->y + y; ++ if(yAbs == 'Y') { ++ if(y < selmon->my) ++ ny = selmon->my; ++ else if(y > selmon->my + selmon->mh) ++ ny = selmon->my + selmon->mh - nh - 2 * c->bw; ++ else ++ ny = y; ++ } ++ ++ ox = c->x; ++ oy = c->y; ++ ow = c->w; ++ oh = c->h; ++ ++ XRaiseWindow(dpy, c->win); ++ Bool xqp = XQueryPointer(dpy, root, &dummy, &dummy, &msx, &msy, &dx, &dy, &dui); ++ resize(c, nx, ny, nw, nh, True); ++ ++ /* move cursor along with the window to avoid problems caused by the sloppy focus */ ++ if (xqp && ox <= msx && (ox + ow) >= msx && oy <= msy && (oy + oh) >= msy) ++ { ++ nmx = c->x - ox + c->w - ow; ++ nmy = c->y - oy + c->h - oh; ++ XWarpPointer(dpy, None, None, 0, 0, 0, 0, nmx, nmy); ++ } ++} ++ diff --git a/dwm.suckless.org/patches/dwm-6.0-moveresize.diff b/dwm.suckless.org/patches/dwm-moveresize-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-moveresize.diff b/dwm.suckless.org/patches/dwm-moveresize-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-movestack-6.1.diff b/dwm.suckless.org/patches/dwm-movestack-6.1.diff @@ -0,0 +1,73 @@ +diff -r 050d521d66d8 config.def.h +--- a/config.def.h Tue Aug 24 13:13:20 2010 +0100 ++++ b/config.def.h Sun Sep 05 18:43:07 2010 +0200 +@@ -57,6 +57,7 @@ + static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; + static const char *termcmd[] = { "st", NULL }; + ++#include "movestack.c" + static Key keys[] = { + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, +@@ -68,6 +69,8 @@ + { MODKEY, XK_d, incnmaster, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, ++ { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, ++ { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, + { MODKEY, XK_Return, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_c, killclient, {0} }, +diff -r 050d521d66d8 movestack.c +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/movestack.c Sun Sep 05 18:43:07 2010 +0200 +@@ -0,0 +1,49 @@ ++void ++movestack(const Arg *arg) { ++ Client *c = NULL, *p = NULL, *pc = NULL, *i; ++ ++ if(arg->i > 0) { ++ /* find the client after selmon->sel */ ++ for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ if(!c) ++ for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ ++ } ++ else { ++ /* find the client before selmon->sel */ ++ for(i = selmon->clients; i != selmon->sel; i = i->next) ++ if(ISVISIBLE(i) && !i->isfloating) ++ c = i; ++ if(!c) ++ for(; i; i = i->next) ++ if(ISVISIBLE(i) && !i->isfloating) ++ c = i; ++ } ++ /* find the client before selmon->sel and c */ ++ for(i = selmon->clients; i && (!p || !pc); i = i->next) { ++ if(i->next == selmon->sel) ++ p = i; ++ if(i->next == c) ++ pc = i; ++ } ++ ++ /* swap c and selmon->sel selmon->clients in the selmon->clients list */ ++ if(c && c != selmon->sel) { ++ Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next; ++ selmon->sel->next = c->next==selmon->sel?c:c->next; ++ c->next = temp; ++ ++ if(p && p != c) ++ p->next = c; ++ if(pc && pc != selmon->sel) ++ pc->next = selmon->sel; ++ ++ if(selmon->sel == selmon->clients) ++ selmon->clients = c; ++ else if(c == selmon->clients) ++ selmon->clients = selmon->sel; ++ ++ arrange(selmon); ++ } ++} ++ diff --git a/dwm.suckless.org/patches/dwm-5.7.2-nametag.diff b/dwm.suckless.org/patches/dwm-nametag-5.7.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-nametag.diff b/dwm.suckless.org/patches/dwm-nametag-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-nametag-prepend.diff b/dwm.suckless.org/patches/dwm-nametag-prepend-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-noborder-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-noborder-20160718-56a31dc.diff @@ -0,0 +1,71 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..d3e1970 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -395,9 +395,24 @@ arrange(Monitor *m) + void + arrangemon(Monitor *m) + { ++ int n = 0; ++ Client *c; + strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol); +- if (m->lt[m->sellt]->arrange) +- m->lt[m->sellt]->arrange(m); ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m->sellt]->arrange) { ++ for (c = m->clients; c; c = c->next) { ++ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) { ++ c->oldbw = c->bw; ++ c->bw = borderpx; ++ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); ++ } ++ } ++ if (m->lt[m->sellt]->arrange) { ++ m->lt[m->sellt]->arrange(m); ++ } ++ } else { ++ monocle(m); ++ } + } + + void +@@ -1126,10 +1141,19 @@ monocle(Monitor *m) + for (c = m->clients; c; c = c->next) + if (ISVISIBLE(c)) + n++; +- if (n > 0) /* override layout symbol */ ++ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* override layout symbol */ + snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); +- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) +- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); ++ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) { ++ // I'm not sure, but calling resize with the border width subtractions ++ // fixes a glitch where windows would not redraw until they were ++ // manually resized after restarting dwm. ++ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False); ++ if (c->bw) { ++ c->oldbw = c->bw; ++ c->bw = 0; ++ resizeclient(c, m->wx, m->wy, m->ww, m->wh); ++ } ++ } + } + + void +@@ -1705,9 +1729,14 @@ togglefloating(const Arg *arg) + if (selmon->sel->isfullscreen) /* no support for fullscreen windows */ + return; + selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; +- if (selmon->sel->isfloating) ++ if (selmon->sel->isfloating) { ++ if (selmon->sel->bw != borderpx) { ++ selmon->sel->oldbw = selmon->sel->bw; ++ selmon->sel->bw = borderpx; ++ } + resize(selmon->sel, selmon->sel->x, selmon->sel->y, +- selmon->sel->w, selmon->sel->h, 0); ++ selmon->sel->w - selmon->sel->bw * 2, selmon->sel->h - selmon->sel->bw * 2, 0); ++ } + arrange(selmon); + } + diff --git a/dwm.suckless.org/patches/dwm-noborder-6.1.diff b/dwm.suckless.org/patches/dwm-noborder-6.1.diff @@ -0,0 +1,71 @@ +diff --git a/dwm.c b/dwm.c +index 0362114..e3209e5 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -393,9 +393,24 @@ arrange(Monitor *m) + void + arrangemon(Monitor *m) + { ++ int n = 0; ++ Client *c; + strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol); +- if (m->lt[m->sellt]->arrange) +- m->lt[m->sellt]->arrange(m); ++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m->sellt]->arrange) { ++ for (c = m->clients; c; c = c->next) { ++ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) { ++ c->oldbw = c->bw; ++ c->bw = borderpx; ++ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw)); ++ } ++ } ++ if (m->lt[m->sellt]->arrange) { ++ m->lt[m->sellt]->arrange(m); ++ } ++ } else { ++ monocle(m); ++ } + } + + void +@@ -1123,10 +1138,19 @@ monocle(Monitor *m) + for (c = m->clients; c; c = c->next) + if (ISVISIBLE(c)) + n++; +- if (n > 0) /* override layout symbol */ ++ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* override layout symbol */ + snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); +- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) +- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); ++ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) { ++ // I'm not sure, but calling resize with the border width subtractions ++ // fixes a glitch where windows would not redraw until they were ++ // manually resized after restarting dwm. ++ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False); ++ if (c->bw) { ++ c->oldbw = c->bw; ++ c->bw = 0; ++ resizeclient(c, m->wx, m->wy, m->ww, m->wh); ++ } ++ } + } + + void +@@ -1706,9 +1730,14 @@ togglefloating(const Arg *arg) + if (selmon->sel->isfullscreen) /* no support for fullscreen windows */ + return; + selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; +- if (selmon->sel->isfloating) ++ if (selmon->sel->isfloating) { ++ if (selmon->sel->bw != borderpx) { ++ selmon->sel->oldbw = selmon->sel->bw; ++ selmon->sel->bw = borderpx; ++ } + resize(selmon->sel, selmon->sel->x, selmon->sel->y, +- selmon->sel->w, selmon->sel->h, 0); ++ selmon->sel->w - selmon->sel->bw * 2, selmon->sel->h - selmon->sel->bw * 2, 0); ++ } + arrange(selmon); + } + diff --git a/dwm.suckless.org/patches/dwm-nofullscreen.diff b/dwm.suckless.org/patches/dwm-nofullscreen.diff @@ -1,11 +0,0 @@ ---- dwm.c 2014-03-05 21:51:42.716156981 +0100 -+++ dwm.c-nofullscreen 2014-03-05 21:52:45.598560519 +0100 -@@ -1441,7 +1441,7 @@ setfullscreen(Client *c, Bool fullscreen - c->oldstate = c->isfloating; - c->oldbw = c->bw; - c->bw = 0; -- c->isfloating = True; -+ //c->isfloating = True; - resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); - XRaiseWindow(dpy, c->win); - } diff --git a/dwm.suckless.org/patches/dwm-6.0-pango.diff b/dwm.suckless.org/patches/dwm-pango-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-pertag-20160626-7af4d43.diff b/dwm.suckless.org/patches/dwm-pertag-20160626-7af4d43.diff @@ -0,0 +1,199 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..3022d78 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -112,6 +112,7 @@ typedef struct { + void (*arrange)(Monitor *); + } Layout; + ++typedef struct Pertag Pertag; + struct Monitor { + char ltsymbol[16]; + float mfact; +@@ -131,6 +132,7 @@ struct Monitor { + Monitor *next; + Window barwin; + const Layout *lt[2]; ++ Pertag *pertag; + }; + + typedef struct { +@@ -272,6 +274,16 @@ static Window root; + /* configuration, allows nested code to access above variables */ + #include "config.h" + ++struct Pertag { ++ unsigned int curtag, prevtag; /* current and previous tag */ ++ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */ ++ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */ ++ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */ ++ const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */ ++ int showbars[LENGTH(tags) + 1]; /* display bar for the current tag */ ++ Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */ ++}; ++ + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; + +@@ -525,6 +537,7 @@ clientmessage(XEvent *e) + { + XClientMessageEvent *cme = &e->xclient; + Client *c = wintoclient(cme->window); ++ int i; + + if (!c) + return; +@@ -536,6 +549,8 @@ clientmessage(XEvent *e) + if (!ISVISIBLE(c)) { + c->mon->seltags ^= 1; + c->mon->tagset[c->mon->seltags] = c->tags; ++ for(i=0; !(c->tags & 1 << i); i++); ++ view(&(Arg){.ui = 1 << i}); + } + pop(c); + } +@@ -644,6 +659,7 @@ Monitor * + createmon(void) + { + Monitor *m; ++ int i; + + m = ecalloc(1, sizeof(Monitor)); + m->tagset[0] = m->tagset[1] = 1; +@@ -654,6 +670,27 @@ createmon(void) + m->lt[0] = &layouts[0]; + m->lt[1] = &layouts[1 % LENGTH(layouts)]; + strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); ++ if (!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Pertag)); ++ m->pertag->curtag = m->pertag->prevtag = 1; ++ for(i=0; i <= LENGTH(tags); i++) { ++ /* init nmaster */ ++ m->pertag->nmasters[i] = m->nmaster; ++ ++ /* init mfacts */ ++ m->pertag->mfacts[i] = m->mfact; ++ ++ /* init layouts */ ++ m->pertag->ltidxs[i][0] = m->lt[0]; ++ m->pertag->ltidxs[i][1] = m->lt[1]; ++ m->pertag->sellts[i] = m->sellt; ++ ++ /* init showbar */ ++ m->pertag->showbars[i] = m->showbar; ++ ++ /* swap focus and zoomswap*/ ++ m->pertag->prevzooms[i] = NULL; ++ } + return m; + } + +@@ -983,7 +1020,7 @@ grabkeys(void) + void + incnmaster(const Arg *arg) + { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0); + arrange(selmon); + } + +@@ -1520,10 +1557,13 @@ setfullscreen(Client *c, int fullscreen) + void + setlayout(const Arg *arg) + { +- if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) +- selmon->sellt ^= 1; ++ if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) { ++ selmon->pertag->sellts[selmon->pertag->curtag] ^= 1; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ } + if (arg && arg->v) +- selmon->lt[selmon->sellt] = (Layout *)arg->v; ++ selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); + if (selmon->sel) + arrange(selmon); +@@ -1542,7 +1582,7 @@ setmfact(const Arg *arg) + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; + if (f < 0.1 || f > 0.9) + return; +- selmon->mfact = f; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f; + arrange(selmon); + } + +@@ -1691,7 +1731,7 @@ tile(Monitor *m) + void + togglebar(const Arg *arg) + { +- selmon->showbar = !selmon->showbar; ++ selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar; + updatebarpos(selmon); + XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); + arrange(selmon); +@@ -1730,9 +1770,29 @@ void + toggleview(const Arg *arg) + { + unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); ++ int i; + + if (newtagset) { ++ if (newtagset == ~0) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = 0; ++ } ++ /* test if the user did not select the same tag */ ++ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ for (i=0; !(newtagset & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } + selmon->tagset[selmon->seltags] = newtagset; ++ ++ /* apply settings for this view */ ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } +@@ -2030,11 +2090,33 @@ updatewmhints(Client *c) + void + view(const Arg *arg) + { ++ int i; ++ unsigned int tmptag; ++ + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; + selmon->seltags ^= 1; /* toggle sel tagset */ +- if (arg->ui & TAGMASK) ++ if (arg->ui & TAGMASK) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; ++ if (arg->ui == ~0) ++ selmon->pertag->curtag = 0; ++ else { ++ for (i=0; !(arg->ui & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } ++ } else { ++ tmptag = selmon->pertag->prevtag; ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = tmptag; ++ } ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } diff --git a/dwm.suckless.org/patches/dwm-pertag-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-pertag-20160731-56a31dc.diff @@ -0,0 +1,205 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/pertag +This patch keeps layout, mwfact, barpos and nmaster per tag. + +Contributors: +- Carlos Pita, thanks for debugging NetActiveWindow issues and sending a patch + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -112,6 +112,7 @@ typedef struct { + void (*arrange)(Monitor *); + } Layout; + ++typedef struct Pertag Pertag; + struct Monitor { + char ltsymbol[16]; + float mfact; +@@ -131,6 +132,7 @@ struct Monitor { + Monitor *next; + Window barwin; + const Layout *lt[2]; ++ Pertag *pertag; + }; + + typedef struct { +@@ -272,6 +274,16 @@ static Window root; + /* configuration, allows nested code to access above variables */ + #include "config.h" + ++struct Pertag { ++ unsigned int curtag, prevtag; /* current and previous tag */ ++ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */ ++ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */ ++ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */ ++ const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */ ++ Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */ ++ Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */ ++}; ++ + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; + +@@ -525,6 +537,7 @@ clientmessage(XEvent *e) + { + XClientMessageEvent *cme = &e->xclient; + Client *c = wintoclient(cme->window); ++ int i; + + if (!c) + return; +@@ -536,6 +549,8 @@ clientmessage(XEvent *e) + if (!ISVISIBLE(c)) { + c->mon->seltags ^= 1; + c->mon->tagset[c->mon->seltags] = c->tags; ++ for(i=0; !(c->tags & 1 << i); i++); ++ view(&(Arg){.ui = 1 << i}); + } + pop(c); + } +@@ -644,6 +659,7 @@ Monitor * + createmon(void) + { + Monitor *m; ++ int i; + + m = ecalloc(1, sizeof(Monitor)); + m->tagset[0] = m->tagset[1] = 1; +@@ -654,6 +670,27 @@ createmon(void) + m->lt[0] = &layouts[0]; + m->lt[1] = &layouts[1 % LENGTH(layouts)]; + strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); ++ if(!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Pertag)); ++ m->pertag->curtag = m->pertag->prevtag = 1; ++ for(i=0; i <= LENGTH(tags); i++) { ++ /* init nmaster */ ++ m->pertag->nmasters[i] = m->nmaster; ++ ++ /* init mfacts */ ++ m->pertag->mfacts[i] = m->mfact; ++ ++ /* init layouts */ ++ m->pertag->ltidxs[i][0] = m->lt[0]; ++ m->pertag->ltidxs[i][1] = m->lt[1]; ++ m->pertag->sellts[i] = m->sellt; ++ ++ /* init showbar */ ++ m->pertag->showbars[i] = m->showbar; ++ ++ /* swap focus and zoomswap*/ ++ m->pertag->prevzooms[i] = NULL; ++ } + return m; + } + +@@ -983,7 +1020,7 @@ grabkeys(void) + void + incnmaster(const Arg *arg) + { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0); + arrange(selmon); + } + +@@ -1520,10 +1557,13 @@ setfullscreen(Client *c, int fullscreen) + void + setlayout(const Arg *arg) + { +- if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) +- selmon->sellt ^= 1; ++ if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) { ++ selmon->pertag->sellts[selmon->pertag->curtag] ^= 1; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ } + if (arg && arg->v) +- selmon->lt[selmon->sellt] = (Layout *)arg->v; ++ selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); + if (selmon->sel) + arrange(selmon); +@@ -1542,7 +1582,7 @@ setmfact(const Arg *arg) + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; + if (f < 0.1 || f > 0.9) + return; +- selmon->mfact = f; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f; + arrange(selmon); + } + +@@ -1691,7 +1731,7 @@ tile(Monitor *m) + void + togglebar(const Arg *arg) + { +- selmon->showbar = !selmon->showbar; ++ selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar; + updatebarpos(selmon); + XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); + arrange(selmon); +@@ -1730,9 +1770,29 @@ void + toggleview(const Arg *arg) + { + unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); ++ int i; + + if (newtagset) { ++ if(newtagset == ~0) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = 0; ++ } ++ /* test if the user did not select the same tag */ ++ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ for (i=0; !(newtagset & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } + selmon->tagset[selmon->seltags] = newtagset; ++ ++ /* apply settings for this view */ ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } +@@ -2030,11 +2090,32 @@ updatewmhints(Client *c) + void + view(const Arg *arg) + { ++ int i; ++ unsigned int tmptag; + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; + selmon->seltags ^= 1; /* toggle sel tagset */ +- if (arg->ui & TAGMASK) ++ if (arg->ui & TAGMASK) { ++ selmon->pertag->prevtag = selmon->pertag->curtag; + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; ++ if (arg->ui == ~0) ++ selmon->pertag->curtag = 0; ++ else { ++ for (i=0; !(arg->ui & 1 << i); i++) ; ++ selmon->pertag->curtag = i + 1; ++ } ++ } else { ++ tmptag = selmon->pertag->prevtag; ++ selmon->pertag->prevtag = selmon->pertag->curtag; ++ selmon->pertag->curtag = tmptag; ++ } ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; ++ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; ++ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; ++ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; ++ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; ++ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) ++ togglebar(NULL); + focus(NULL); + arrange(selmon); + } diff --git a/dwm.suckless.org/patches/dwm-6.0-pertag.diff b/dwm.suckless.org/patches/dwm-pertag-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-pertag.diff b/dwm.suckless.org/patches/dwm-pertag-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-push-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-push-20160731-56a31dc.diff @@ -0,0 +1,75 @@ +URL: http://dwm.suckless.org/patches/push +pushup and pushdown provide a way to move clients inside the clients list. + +Index: dwm/push.c +=================================================================== +--- /dev/null ++++ dwm/push.c +@@ -0,0 +1,67 @@ ++Client * ++nextc(Client *c, float f) { ++ if(!f) ++ return nexttiled(c); ++ ++ for(; c && !ISVISIBLE(c); c = c->next); ++ return c; ++} ++ ++static Client * ++prevc(Client *c, float f) { ++ Client *p, *r; ++ ++ for(p = selmon->clients, r = NULL; c && p && p != c; p = p->next) ++ if((f || !p->isfloating) && ISVISIBLE(p)) ++ r = p; ++ return r; ++} ++ ++static void ++pushup(const Arg *arg) { ++ Client *sel = selmon->sel; ++ Client *c; ++ ++ if(!sel || (sel->isfloating && !arg->f)) ++ return; ++ if((c = prevc(sel, arg->f))) { ++ /* attach before c */ ++ detach(sel); ++ sel->next = c; ++ if(selmon->clients == c) ++ selmon->clients = sel; ++ else { ++ for(c = selmon->clients; c->next != sel->next; c = c->next); ++ c->next = sel; ++ } ++ } else { ++ /* move to the end */ ++ for(c = sel; c->next; c = c->next); ++ detach(sel); ++ sel->next = NULL; ++ c->next = sel; ++ } ++ focus(sel); ++ arrange(selmon); ++} ++ ++static void ++pushdown(const Arg *arg) { ++ Client *sel = selmon->sel; ++ Client *c; ++ ++ if(!sel || (sel->isfloating && !arg->f)) ++ return; ++ if((c = nextc(sel->next, arg->f))) { ++ /* attach after c */ ++ detach(sel); ++ sel->next = c->next; ++ c->next = sel; ++ } else { ++ /* move to the front */ ++ detach(sel); ++ attach(sel); ++ } ++ focus(sel); ++ arrange(selmon); ++} diff --git a/dwm.suckless.org/patches/dwm-6.0-push.diff b/dwm.suckless.org/patches/dwm-push-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-push.diff b/dwm.suckless.org/patches/dwm-push-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-5.9-pwkl.diff b/dwm.suckless.org/patches/dwm-pwkl-5.9.diff diff --git a/dwm.suckless.org/patches/dwm-r1580-col.diff b/dwm.suckless.org/patches/dwm-r1580-col.diff @@ -1,60 +0,0 @@ -diff -r cfcfa05033e3 config.def.h ---- a/config.def.h Fri Oct 28 23:45:12 2011 +0100 -+++ b/config.def.h Fri Oct 28 18:57:59 2011 -0700 -@@ -32,6 +32,7 @@ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "|||", col }, - }; - - /* key definitions */ -@@ -66,6 +67,7 @@ - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -+ { MODKEY, XK_c, setlayout, {.v = &layouts[3]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, -diff -r cfcfa05033e3 dwm.c ---- a/dwm.c Fri Oct 28 23:45:12 2011 +0100 -+++ b/dwm.c Fri Oct 28 18:57:59 2011 -0700 -@@ -165,6 +165,7 @@ - static void cleanupmon(Monitor *mon); - static void clearurgent(Client *c); - static void clientmessage(XEvent *e); -+static void col(Monitor *); - static void configure(Client *c); - static void configurenotify(XEvent *e); - static void configurerequest(XEvent *e); -@@ -1658,6 +1659,29 @@ - } - - void -+col(Monitor *m) { -+ unsigned int i, n, h, w, x, y; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ -+ for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { -+ if(i < m->nmaster) { -+ w = (m->ww - x) / (MIN(n, m->nmaster) + (n > m->nmaster) - i); -+ resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False); -+ x += WIDTH(c); -+ } -+ else { -+ h = (m->wh - y) / (n - i); -+ resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False); -+ y += HEIGHT(c); -+ } -+ } -+} -+ -+void - tile(Monitor *m) { - unsigned int i, n, h, mw, my, ty; - Client *c; diff --git a/dwm.suckless.org/patches/dwm-6.0-resizecorners.diff b/dwm.suckless.org/patches/dwm-resizecorners-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-resizecorners.diff b/dwm.suckless.org/patches/dwm-resizecorners-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-save_floats.diff b/dwm.suckless.org/patches/dwm-save_floats-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-savefloats-20160723-56a31dc.diff b/dwm.suckless.org/patches/dwm-savefloats-20160723-56a31dc.diff @@ -0,0 +1,46 @@ +diff --git a/dwm.c b/dwm.c +index cfea881..87a23c4 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -107,6 +107,7 @@ struct Client { + char name[256]; + float mina, maxa; + int x, y, w, h; ++ int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */ + int oldx, oldy, oldw, oldh; + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; +@@ -1205,10 +1206,10 @@ manage(Window w, XWindowAttributes *wa) + c = ecalloc(1, sizeof(Client)); + c->win = w; + /* geometry */ +- c->x = c->oldx = wa->x; +- c->y = c->oldy = wa->y; +- c->w = c->oldw = wa->width; +- c->h = c->oldh = wa->height; ++ c->sfx = c->x = c->oldx = wa->x; ++ c->sfy = c->y = c->oldy = wa->y; ++ c->sfw = c->w = c->oldw = wa->width; ++ c->sfh = c->h = c->oldh = wa->height; + c->oldbw = wa->border_width; + + updatetitle(c); +@@ -1976,8 +1977,16 @@ togglefloating(const Arg *arg) + return; + selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; + if (selmon->sel->isfloating) +- resize(selmon->sel, selmon->sel->x, selmon->sel->y, +- selmon->sel->w, selmon->sel->h, 0); ++ /* restore last know float dimentions */ ++ resize(selmon->sel, selmon->sel->sfx, selmon->sel->sfy, ++ selmon->sel->sfw, selmon->sel->sfh, 0); ++ else { ++ /* save last known float dimentions */ ++ selmon->sel->sfx = selmon->sel->x; ++ selmon->sel->sfy = selmon->sel->y; ++ selmon->sel->sfw = selmon->sel->w; ++ selmon->sel->sfh = selmon->sel->h; ++ } + arrange(selmon); + } + diff --git a/dwm.suckless.org/patches/dwm-single_tagset-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-single_tagset-20160731-56a31dc.diff @@ -0,0 +1,540 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/single_tagset +This patch addresses the multi-monitor setup. Instead of having separate tags +for every monitor there is just one list of tags for all monitors. Instead of +moving windows from one monitor to the other, the desired tag from the +other monitor can just be selected and all windows will be drawn on the +current monitor. + +Several deep changes needed to be made: +1. Macro ISVISIBLE expects a second parameter, the monitor +2. Monitor->clients and Monitor->stack were moved to the global variable + Clientlist cl. All monitors refer to this one list. +3. A new method attachclients was added. When changing between tags this + function ensures that all clients are pointing to the right monitor. + +Please be aware that this patch probably breaks any other patch! + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -49,7 +49,7 @@ + #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) + #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ + * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) +-#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) ++#define ISVISIBLE(C, M) ((C->tags & M->tagset[M->seltags])) + #define LENGTH(X) (sizeof X / sizeof X[0]) + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) + #define WIDTH(X) ((X)->w + 2 * (X)->bw) +@@ -83,6 +83,7 @@ typedef struct { + const Arg arg; + } Button; + ++typedef struct Clientlist Clientlist; + typedef struct Monitor Monitor; + typedef struct Client Client; + struct Client { +@@ -125,9 +126,8 @@ struct Monitor { + unsigned int tagset[2]; + int showbar; + int topbar; +- Client *clients; ++ Clientlist *cl; + Client *sel; +- Client *stack; + Monitor *next; + Window barwin; + const Layout *lt[2]; +@@ -142,12 +142,18 @@ typedef struct { + int monitor; + } Rule; + ++struct Clientlist { ++ Client *clients; ++ Client *stack; ++}; ++ + /* function declarations */ + static void applyrules(Client *c); + static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); + static void arrange(Monitor *m); + static void arrangemon(Monitor *m); + static void attach(Client *c); ++static void attachclients(Monitor *m); + static void attachstack(Client *c); + static void buttonpress(XEvent *e); + static void checkotherwm(void); +@@ -185,7 +191,7 @@ static void maprequest(XEvent *e); + static void monocle(Monitor *m); + static void motionnotify(XEvent *e); + static void movemouse(const Arg *arg); +-static Client *nexttiled(Client *c); ++static Client *nexttiled(Client *c, Monitor *m); + static void pop(Client *); + static void propertynotify(XEvent *e); + static void quit(const Arg *arg); +@@ -268,6 +274,7 @@ static Display *dpy; + static Drw *drw; + static Monitor *mons, *selmon; + static Window root; ++static Clientlist *cl; + + /* configuration, allows nested code to access above variables */ + #include "config.h" +@@ -300,7 +307,7 @@ applyrules(Client *c) + { + c->isfloating = r->isfloating; + c->tags |= r->tags; +- for (m = mons; m && m->num != r->monitor; m = m->next); ++ for (m = mons; m && (m->tagset[m->seltags] & c->tags) == 0; m = m->next) ; + if (m) + c->mon = m; + } +@@ -382,9 +389,9 @@ void + arrange(Monitor *m) + { + if (m) +- showhide(m->stack); ++ showhide(m->cl->stack); + else for (m = mons; m; m = m->next) +- showhide(m->stack); ++ showhide(m->cl->stack); + if (m) { + arrangemon(m); + restack(m); +@@ -403,15 +410,48 @@ arrangemon(Monitor *m) + void + attach(Client *c) + { +- c->next = c->mon->clients; +- c->mon->clients = c; ++ c->next = c->mon->cl->clients; ++ c->mon->cl->clients = c; ++} ++ ++void ++attachclients(Monitor *m) { ++ /* attach clients to the specified monitor */ ++ Monitor *tm; ++ Client *c; ++ unsigned int utags = 0; ++ Bool rmons = False; ++ if(!m) ++ return; ++ ++ /* collect information about the tags in use */ ++ for (tm = mons; tm; tm = tm->next) ++ if(tm != m) ++ utags |= m->tagset[m->seltags]; ++ ++ for (c = m->cl->clients; c; c = c->next) ++ if(ISVISIBLE(c, m)) { ++ /* if client is also visible on other tags that are displayed on ++ * other monitors, remove these tags */ ++ if(c->tags & utags) { ++ c->tags = c->tags & m->tagset[m->seltags]; ++ rmons = True; ++ } ++ unfocus(c, True); ++ c->mon = m; ++ } ++ ++ if (rmons) ++ for (tm = mons; tm; tm = tm->next) ++ if(tm != m) ++ arrange(tm); + } + + void + attachstack(Client *c) + { +- c->snext = c->mon->stack; +- c->mon->stack = c; ++ c->snext = c->mon->cl->stack; ++ c->mon->cl->stack = c; + } + + void +@@ -476,8 +516,8 @@ cleanup(void) + view(&a); + selmon->lt[selmon->sellt] = &foo; + for (m = mons; m; m = m->next) +- while (m->stack) +- unmanage(m->stack, 0); ++ while (m->cl->stack) ++ unmanage(m->cl->stack, 0); + XUngrabKey(dpy, AnyKey, AnyModifier, root); + while (mons) + cleanupmon(mons); +@@ -533,7 +573,7 @@ clientmessage(XEvent *e) + setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */ + || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen))); + } else if (cme->message_type == netatom[NetActiveWindow]) { +- if (!ISVISIBLE(c)) { ++ if (!ISVISIBLE(c, c->mon)) { + c->mon->seltags ^= 1; + c->mon->tagset[c->mon->seltags] = c->tags; + } +@@ -577,7 +617,7 @@ configurenotify(XEvent *e) + drw_resize(drw, sw, bh); + updatebars(); + for (m = mons; m; m = m->next) { +- for (c = m->clients; c; c = c->next) ++ for (c = m->cl->clients; c; c = c->next) + if (c->isfullscreen) + resizeclient(c, m->mx, m->my, m->mw, m->mh); + XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); +@@ -623,7 +663,7 @@ configurerequest(XEvent *e) + c->y = m->my + (m->mh / 2 - HEIGHT(c) / 2); /* center in y direction */ + if ((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight))) + configure(c); +- if (ISVISIBLE(c)) ++ if (ISVISIBLE(c, m)) + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); + } else + configure(c); +@@ -643,10 +683,31 @@ configurerequest(XEvent *e) + Monitor * + createmon(void) + { +- Monitor *m; ++ Monitor *m, *tm; ++ int i; + ++ /* bail out if the number of monitors exceeds the number of tags */ ++ for (i=1, tm=mons; tm; i++, tm=tm->next); ++ if (i > LENGTH(tags)) { ++ fprintf(stderr, "dwm: failed to add monitor, number of tags exceeded\n"); ++ return NULL; ++ } ++ /* find the first tag that isn't in use */ ++ for (i=0; i < LENGTH(tags); i++) { ++ for (tm=mons; tm && !(tm->tagset[tm->seltags] & (1<<i)); tm=tm->next); ++ if (!tm) ++ break; ++ } ++ /* reassign all tags to monitors since there's currently no free tag for the ++ * new monitor */ ++ if (i >= LENGTH(tags)) ++ for (i=0, tm=mons; tm; tm=tm->next, i++) { ++ tm->seltags ^= 1; ++ tm->tagset[tm->seltags] = (1<<i) & TAGMASK; ++ } + m = ecalloc(1, sizeof(Monitor)); +- m->tagset[0] = m->tagset[1] = 1; ++ m->cl = cl; ++ m->tagset[0] = m->tagset[1] = (1<<i) & TAGMASK; + m->mfact = mfact; + m->nmaster = nmaster; + m->showbar = showbar; +@@ -672,7 +733,7 @@ detach(Client *c) + { + Client **tc; + +- for (tc = &c->mon->clients; *tc && *tc != c; tc = &(*tc)->next); ++ for (tc = &c->mon->cl->clients; *tc && *tc != c; tc = &(*tc)->next); + *tc = c->next; + } + +@@ -681,11 +742,11 @@ detachstack(Client *c) + { + Client **tc, *t; + +- for (tc = &c->mon->stack; *tc && *tc != c; tc = &(*tc)->snext); ++ for (tc = &c->mon->cl->stack; *tc && *tc != c; tc = &(*tc)->snext); + *tc = c->snext; + + if (c == c->mon->sel) { +- for (t = c->mon->stack; t && !ISVISIBLE(t); t = t->snext); ++ for (t = c->mon->cl->stack; t && !ISVISIBLE(t, c->mon); t = t->snext); + c->mon->sel = t; + } + } +@@ -721,7 +782,7 @@ drawbar(Monitor *m) + drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0); + } + +- for (c = m->clients; c; c = c->next) { ++ for(c = m->cl->clients; c; c = c->next) { + occ |= c->tags; + if (c->isurgent) + urg |= c->tags; +@@ -796,8 +857,8 @@ expose(XEvent *e) + void + focus(Client *c) + { +- if (!c || !ISVISIBLE(c)) +- for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext); ++ if (!c || !ISVISIBLE(c, selmon)) ++ for (c = selmon->cl->stack; c && !ISVISIBLE(c, selmon); c = c->snext); + /* was if (selmon->sel) */ + if (selmon->sel && selmon->sel != c) + unfocus(selmon->sel, 0); +@@ -852,16 +913,16 @@ focusstack(const Arg *arg) + if (!selmon->sel) + return; + if (arg->i > 0) { +- for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); ++ for (c = selmon->sel->next; c && !ISVISIBLE(c, selmon); c = c->next); + if (!c) +- for (c = selmon->clients; c && !ISVISIBLE(c); c = c->next); ++ for (c = selmon->cl->clients; c && !ISVISIBLE(c, selmon); c = c->next); + } else { +- for (i = selmon->clients; i != selmon->sel; i = i->next) +- if (ISVISIBLE(i)) ++ for (i = selmon->cl->clients; i != selmon->sel; i = i->next) ++ if (ISVISIBLE(i, selmon)) + c = i; + if (!c) + for (; i; i = i->next) +- if (ISVISIBLE(i)) ++ if (ISVISIBLE(i, selmon)) + c = i; + } + if (c) { +@@ -1123,12 +1184,12 @@ monocle(Monitor *m) + unsigned int n = 0; + Client *c; + +- for (c = m->clients; c; c = c->next) +- if (ISVISIBLE(c)) ++ for(c = m->cl->clients; c; c = c->next) ++ if(ISVISIBLE(c, m)) + n++; + if (n > 0) /* override layout symbol */ + snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); +- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) ++ for (c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m)) + resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); + } + +@@ -1213,9 +1274,9 @@ movemouse(const Arg *arg) + } + + Client * +-nexttiled(Client *c) ++nexttiled(Client *c, Monitor *m) + { +- for (; c && (c->isfloating || !ISVISIBLE(c)); c = c->next); ++ for (; c && (c->isfloating || !ISVISIBLE(c, m)); c = c->next); + return c; + } + +@@ -1379,8 +1440,8 @@ restack(Monitor *m) + if (m->lt[m->sellt]->arrange) { + wc.stack_mode = Below; + wc.sibling = m->barwin; +- for (c = m->stack; c; c = c->snext) +- if (!c->isfloating && ISVISIBLE(c)) { ++ for (c = m->cl->stack; c; c = c->snext) ++ if (!c->isfloating && ISVISIBLE(c, m)) { + XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc); + wc.sibling = c->win; + } +@@ -1433,11 +1494,9 @@ sendmon(Client *c, Monitor *m) + if (c->mon == m) + return; + unfocus(c, 1); +- detach(c); + detachstack(c); + c->mon = m; + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ +- attach(c); + attachstack(c); + focus(NULL); + arrange(NULL); +@@ -1558,6 +1617,8 @@ setup(void) + screen = DefaultScreen(dpy); + sw = DisplayWidth(dpy, screen); + sh = DisplayHeight(dpy, screen); ++ if(!(cl = (Clientlist *)calloc(1, sizeof(Clientlist)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Clientlist)); + root = RootWindow(dpy, screen); + drw = drw_create(dpy, screen, root, sw, sh); + if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) +@@ -1607,7 +1668,7 @@ showhide(Client *c) + { + if (!c) + return; +- if (ISVISIBLE(c)) { ++ if (ISVISIBLE(c, c->mon)) { + /* show clients top down */ + XMoveWindow(dpy, c->win, c->x, c->y); + if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) +@@ -1647,7 +1708,22 @@ spawn(const Arg *arg) + void + tag(const Arg *arg) + { ++ Monitor *m; ++ unsigned int newtags; + if (selmon->sel && arg->ui & TAGMASK) { ++ newtags = arg->ui & TAGMASK; ++ for (m = mons; m; m = m->next) ++ /* if tag is visible on another monitor, move client to the new monitor */ ++ if (m != selmon && m->tagset[m->seltags] & newtags) { ++ /* prevent moving client to all tags (MODKEY-Shift-0) when multiple monitors are connected */ ++ if(newtags & selmon->tagset[selmon->seltags]) ++ return; ++ selmon->sel->tags = newtags; ++ selmon->sel->mon = m; ++ arrange(m); ++ break; ++ } ++ /* workaround in case just one monitor is connected */ + selmon->sel->tags = arg->ui & TAGMASK; + focus(NULL); + arrange(selmon); +@@ -1668,7 +1744,7 @@ tile(Monitor *m) + unsigned int i, n, h, mw, my, ty; + Client *c; + +- for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); ++ for (n = 0, c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m), n++); + if (n == 0) + return; + +@@ -1676,7 +1752,7 @@ tile(Monitor *m) + mw = m->nmaster ? m->ww * m->mfact : 0; + else + mw = m->ww; +- for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ for (i = my = ty = 0, c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m), i++) + if (i < m->nmaster) { + h = (m->wh - my) / (MIN(n, m->nmaster) - i); + resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); +@@ -1714,12 +1790,17 @@ togglefloating(const Arg *arg) + void + toggletag(const Arg *arg) + { ++ Monitor *m; + unsigned int newtags; + + if (!selmon->sel) + return; + newtags = selmon->sel->tags ^ (arg->ui & TAGMASK); + if (newtags) { ++ /* prevent adding tags that are in use on other monitors */ ++ for (m = mons; m; m = m->next) ++ if (m != selmon && newtags & m->tagset[m->seltags]) ++ return; + selmon->sel->tags = newtags; + focus(NULL); + arrange(selmon); +@@ -1729,12 +1810,17 @@ toggletag(const Arg *arg) + void + toggleview(const Arg *arg) + { ++ Monitor *m; + unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK); + + if (newtagset) { ++ /* prevent displaying the same tags on multiple monitors */ ++ for(m = mons; m; m = m->next) ++ if(m != selmon && newtagset & m->tagset[m->seltags]) ++ return; + selmon->tagset[selmon->seltags] = newtagset; + focus(NULL); +- arrange(selmon); ++ attachclients(selmon); + } + } + +@@ -1832,7 +1918,7 @@ updateclientlist() + + XDeleteProperty(dpy, root, netatom[NetClientList]); + for (m = mons; m; m = m->next) +- for (c = m->clients; c; c = c->next) ++ for (c = m->cl->clients; c; c = c->next) + XChangeProperty(dpy, root, netatom[NetClientList], + XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); +@@ -1862,8 +1948,10 @@ updategeom(void) + if (n <= nn) { + for (i = 0; i < (nn - n); i++) { /* new monitors available */ + for (m = mons; m && m->next; m = m->next); +- if (m) ++ if (m) { + m->next = createmon(); ++ attachclients(m->next); ++ } + else + mons = createmon(); + } +@@ -1884,17 +1972,13 @@ updategeom(void) + /* less monitors available nn < n */ + for (i = nn; i < n; i++) { + for (m = mons; m && m->next; m = m->next); +- while (m->clients) { +- dirty = 1; +- c = m->clients; +- m->clients = c->next; +- detachstack(c); +- c->mon = mons; +- attach(c); +- attachstack(c); +- } + if (m == selmon) + selmon = mons; ++ for (c = m->cl->clients; c; c = c->next) { ++ dirty = True; ++ if (c->mon == m) ++ c->mon = selmon; ++ } + cleanupmon(m); + } + } +@@ -2030,13 +2114,31 @@ updatewmhints(Client *c) + void + view(const Arg *arg) + { ++ Monitor *m; ++ unsigned int newtagset = selmon->tagset[selmon->seltags ^ 1]; + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; ++ /* swap tags when trying to display a tag from another monitor */ ++ if (arg->ui & TAGMASK) ++ newtagset = arg->ui & TAGMASK; ++ for (m = mons; m; m = m->next) ++ if (m != selmon && newtagset & m->tagset[m->seltags]) { ++ /* prevent displaying all tags (MODKEY-0) when multiple monitors ++ * are connected */ ++ if (newtagset & selmon->tagset[selmon->seltags]) ++ return; ++ m->sel = selmon->sel; ++ m->seltags ^= 1; ++ m->tagset[m->seltags] = selmon->tagset[selmon->seltags]; ++ attachclients(m); ++ arrange(m); ++ break; ++ } + selmon->seltags ^= 1; /* toggle sel tagset */ + if (arg->ui & TAGMASK) + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; + focus(NULL); +- arrange(selmon); ++ attachclients(selmon); + } + + Client * +@@ -2046,7 +2148,7 @@ wintoclient(Window w) + Monitor *m; + + for (m = mons; m; m = m->next) +- for (c = m->clients; c; c = c->next) ++ for (c = m->cl->clients; c; c = c->next) + if (c->win == w) + return c; + return NULL; +@@ -2113,8 +2215,8 @@ zoom(const Arg *arg) + if (!selmon->lt[selmon->sellt]->arrange + || (selmon->sel && selmon->sel->isfloating)) + return; +- if (c == nexttiled(selmon->clients)) +- if (!c || !(c = nexttiled(c->next))) ++ if (c == nexttiled(selmon->cl->clients, selmon)) ++ if (!c || !(c = nexttiled(c->next, selmon))) + return; + pop(c); + } diff --git a/dwm.suckless.org/patches/dwm-6.0-single_tagset.diff b/dwm.suckless.org/patches/dwm-single_tagset-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-5.7.2-sizehints.diff b/dwm.suckless.org/patches/dwm-sizehints-5.7.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-stacker.diff b/dwm.suckless.org/patches/dwm-stacker-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-statusallmons-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-statusallmons-20160731-56a31dc.diff @@ -0,0 +1,29 @@ +URL: http://dwm.suckless.org/patches/statusallmons +This patch draws and updates the statusbar on all monitors. + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -715,7 +715,7 @@ drawbar(Monitor *m) + Client *c; + + /* draw status first so it can be overdrawn by tags later */ +- if (m == selmon) { /* status is only drawn on selected monitor */ ++ if (m == selmon || 1) { /* status is only drawn on selected monitor */ + drw_setscheme(drw, scheme[SchemeNorm]); + sw = TEXTW(stext) - lrpad / 2; /* no right padding so status text hugs the corner */ + drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0); +@@ -1991,9 +1991,11 @@ updatetitle(Client *c) + void + updatestatus(void) + { ++ Monitor* m; + if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) + strcpy(stext, "dwm-"VERSION); +- drawbar(selmon); ++ for(m = mons; m; m = m->next) ++ drawbar(m); + } + + void diff --git a/dwm.suckless.org/patches/dwm-5.8.2-statusallmons.diff b/dwm.suckless.org/patches/dwm-statusallmons-5.8.2.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-statusallmons.diff b/dwm.suckless.org/patches/dwm-statusallmons-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-5.9-statuscolors.diff b/dwm.suckless.org/patches/dwm-statuscolors-5.9.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-statuscolors.diff b/dwm.suckless.org/patches/dwm-statuscolors-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-swallow-20160717-56a31dc.diff b/dwm.suckless.org/patches/dwm-swallow-20160717-56a31dc.diff @@ -0,0 +1,380 @@ +diff --git a/config.def.h b/config.def.h +index fd77a07..69976b3 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -26,9 +26,10 @@ static const Rule rules[] = { + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + */ +- /* class instance title tags mask isfloating monitor */ +- { "Gimp", NULL, NULL, 0, 1, -1 }, +- { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, ++ /* class instance title tags mask isfloating isterminal noswallow monitor */ ++ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, ++ { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1 }, ++ { "st", NULL, NULL, 0, 0, 1, 1, -1 }, + }; + + /* layout(s) */ +diff --git a/config.mk b/config.mk +index 80dc936..5ed14e3 100644 +--- a/config.mk ++++ b/config.mk +@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 + + # includes and libs + INCS = -I${X11INC} -I${FREETYPEINC} +-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ++LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lX11-xcb -lxcb -lxcb-res + + # flags + CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +diff --git a/dwm.c b/dwm.c +index b2bc9bd..528df2f 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -40,6 +40,8 @@ + #include <X11/extensions/Xinerama.h> + #endif /* XINERAMA */ + #include <X11/Xft/Xft.h> ++#include <X11/Xlib-xcb.h> ++#include <xcb/res.h> + + #include "drw.h" + #include "util.h" +@@ -93,9 +95,11 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; ++ pid_t pid; + Client *next; + Client *snext; ++ Client *swallowing; + Monitor *mon; + Window win; + }; +@@ -139,6 +143,8 @@ typedef struct { + const char *title; + unsigned int tags; + int isfloating; ++ int isterminal; ++ int noswallow; + int monitor; + } Rule; + +@@ -171,12 +177,14 @@ static void focus(Client *c); + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static pid_t getparentprocess(pid_t p); + static int getrootptr(int *x, int *y); + static long getstate(Window w); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); + static void grabbuttons(Client *c, int focused); + static void grabkeys(void); + static void incnmaster(const Arg *arg); ++static int isdescprocess(pid_t p, pid_t c); + static void keypress(XEvent *e); + static void killclient(const Arg *arg); + static void manage(Window w, XWindowAttributes *wa); +@@ -207,8 +215,10 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static Client *swallowingclient(Window w); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); ++static Client *termforwin(const Client *c); + static void tile(Monitor *); + static void togglebar(const Arg *arg); + static void togglefloating(const Arg *arg); +@@ -228,6 +238,7 @@ static void updatewindowtype(Client *c); + static void updatetitle(Client *c); + static void updatewmhints(Client *c); + static void view(const Arg *arg); ++static pid_t winpid(Window w); + static Client *wintoclient(Window w); + static Monitor *wintomon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); +@@ -269,6 +280,8 @@ static Drw *drw; + static Monitor *mons, *selmon; + static Window root; + ++static xcb_connection_t *xcon; ++ + /* configuration, allows nested code to access above variables */ + #include "config.h" + +@@ -298,6 +311,7 @@ applyrules(Client *c) + && (!r->class || strstr(class, r->class)) + && (!r->instance || strstr(instance, r->instance))) + { ++ c->isterminal = r->isterminal; + c->isfloating = r->isfloating; + c->tags |= r->tags; + for (m = mons; m && m->num != r->monitor; m = m->next); +@@ -415,6 +429,46 @@ attachstack(Client *c) + } + + void ++swallow(Client *p, Client *c) ++{ ++ if (c->noswallow || c->isterminal) ++ return; ++ ++ detach(c); ++ detachstack(c); ++ ++ setclientstate(c, WithdrawnState); ++ XUnmapWindow(dpy, p->win); ++ ++ p->swallowing = c; ++ c->mon = p->mon; ++ ++ Window w = p->win; ++ p->win = c->win; ++ c->win = w; ++ updatetitle(p); ++ arrange(p->mon); ++ configure(p); ++ updateclientlist(); ++} ++ ++void ++unswallow(Client *c) ++{ ++ c->win = c->swallowing->win; ++ ++ free(c->swallowing); ++ c->swallowing = NULL; ++ ++ updatetitle(c); ++ arrange(c->mon); ++ XMapWindow(dpy, c->win); ++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ configure(c); ++ setclientstate(c, NormalState); ++} ++ ++void + buttonpress(XEvent *e) + { + unsigned int i, x, click; +@@ -477,7 +531,7 @@ cleanup(void) + selmon->lt[selmon->sellt] = &foo; + for (m = mons; m; m = m->next) + while (m->stack) +- unmanage(m->stack, 0); ++ unmanage(m->stack, 0); // XXX - unmanage swallowing windows too + XUngrabKey(dpy, AnyKey, AnyModifier, root); + while (mons) + cleanupmon(mons); +@@ -665,6 +719,9 @@ destroynotify(XEvent *e) + + if ((c = wintoclient(ev->window))) + unmanage(c, 1); ++ ++ else if ((c = swallowingclient(ev->window))) ++ unmanage(c->swallowing, 1); + } + + void +@@ -1034,12 +1091,13 @@ killclient(const Arg *arg) + void + manage(Window w, XWindowAttributes *wa) + { +- Client *c, *t = NULL; ++ Client *c, *t = NULL, *term = NULL; + Window trans = None; + XWindowChanges wc; + + c = ecalloc(1, sizeof(Client)); + c->win = w; ++ c->pid = winpid(w); + /* geometry */ + c->x = c->oldx = wa->x; + c->y = c->oldy = wa->y; +@@ -1054,6 +1112,7 @@ manage(Window w, XWindowAttributes *wa) + } else { + c->mon = selmon; + applyrules(c); ++ term = termforwin(c); + } + + if (c->x + WIDTH(c) > c->mon->mx + c->mon->mw) +@@ -1090,6 +1149,8 @@ manage(Window w, XWindowAttributes *wa) + c->mon->sel = c; + arrange(c->mon); + XMapWindow(dpy, c->win); ++ if (term) ++ swallow(term, c); + focus(NULL); + } + +@@ -1757,6 +1818,20 @@ unmanage(Client *c, int destroyed) + Monitor *m = c->mon; + XWindowChanges wc; + ++ if (c->swallowing) { ++ unswallow(c); ++ return; ++ } ++ ++ Client *s = swallowingclient(c->win); ++ if (s) { ++ free(s->swallowing); ++ s->swallowing = NULL; ++ arrange(m); ++ focus(NULL); ++ return; ++ } ++ + /* The server grab construct avoids race conditions. */ + detach(c); + detachstack(c); +@@ -1772,9 +1847,12 @@ unmanage(Client *c, int destroyed) + XUngrabServer(dpy); + } + free(c); +- focus(NULL); +- updateclientlist(); +- arrange(m); ++ ++ if (!s) { ++ arrange(m); ++ focus(NULL); ++ updateclientlist(); ++ } + } + + void +@@ -2039,16 +2117,116 @@ view(const Arg *arg) + arrange(selmon); + } + ++pid_t ++winpid(Window w) ++{ ++ pid_t result = 0; ++ ++ xcb_res_client_id_spec_t spec = {0}; ++ spec.client = w; ++ spec.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID; ++ ++ xcb_generic_error_t *e = NULL; ++ xcb_res_query_client_ids_cookie_t c = xcb_res_query_client_ids(xcon, 1, &spec); ++ xcb_res_query_client_ids_reply_t *r = xcb_res_query_client_ids_reply(xcon, c, &e); ++ ++ if (!r) ++ return (pid_t)0; ++ ++ xcb_res_client_id_value_iterator_t i = xcb_res_query_client_ids_ids_iterator(r); ++ for (; i.rem; xcb_res_client_id_value_next(&i)) { ++ spec = i.data->spec; ++ if (spec.mask & XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID) { ++ uint32_t *t = xcb_res_client_id_value_value(i.data); ++ result = *t; ++ break; ++ } ++ } ++ ++ free(r); ++ ++ if (result == (pid_t)-1) ++ result = 0; ++ return result; ++} ++ ++pid_t ++getparentprocess(pid_t p) ++{ ++ unsigned int v = 0; ++ ++#ifdef __linux__ ++ FILE *f; ++ char buf[256]; ++ snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)p); ++ ++ if (!(f = fopen(buf, "r"))) ++ return 0; ++ ++ fscanf(f, "%*u %*s %*c %u", &v); ++ fclose(f); ++#endif /* __linux__ */ ++ ++ return (pid_t)v; ++} ++ ++int ++isdescprocess(pid_t p, pid_t c) ++{ ++ while (p != c && c != 0) ++ c = getparentprocess(c); ++ ++ return (int)c; ++} ++ ++Client * ++termforwin(const Client *w) ++{ ++ Client *c; ++ Monitor *m; ++ ++ if (!w->pid || w->isterminal) ++ return NULL; ++ ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { ++ if (c->isterminal && !c->swallowing && c->pid && isdescprocess(c->pid, w->pid)) ++ return c; ++ } ++ } ++ ++ return NULL; ++} ++ ++Client * ++swallowingclient(Window w) ++{ ++ Client *c; ++ Monitor *m; ++ ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { ++ if (c->swallowing && c->swallowing->win == w) ++ return c; ++ } ++ } ++ ++ return NULL; ++} ++ + Client * + wintoclient(Window w) + { + Client *c; + Monitor *m; + +- for (m = mons; m; m = m->next) +- for (c = m->clients; c; c = c->next) ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { + if (c->win == w) + return c; ++ } ++ } ++ + return NULL; + } + +@@ -2130,6 +2308,8 @@ main(int argc, char *argv[]) + fputs("warning: no locale support\n", stderr); + if (!(dpy = XOpenDisplay(NULL))) + die("dwm: cannot open display\n"); ++ if (!(xcon = XGetXCBConnection(dpy))) ++ die("dwm: cannot get xcb connection\n"); + checkotherwm(); + setup(); + scan(); diff --git a/dwm.suckless.org/patches/dwm-swallow-6.1.diff b/dwm.suckless.org/patches/dwm-swallow-6.1.diff @@ -0,0 +1,382 @@ +diff --git a/config.def.h b/config.def.h +index 7054c06..2bfd607 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -24,9 +24,10 @@ static const Rule rules[] = { + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + */ +- /* class instance title tags mask isfloating monitor */ +- { "Gimp", NULL, NULL, 0, 1, -1 }, +- { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, ++ /* class instance title tags mask isfloating isterminal noswallow monitor */ ++ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, ++ { "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1 }, ++ { "st", NULL, NULL, 0, 0, 1, 1, -1 }, + }; + + /* layout(s) */ +diff --git a/config.mk b/config.mk +index 4eefb71..34ea872 100644 +--- a/config.mk ++++ b/config.mk +@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 + + # includes and libs + INCS = -I${X11INC} -I${FREETYPEINC} +-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ++LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lX11-xcb -lxcb -lxcb-res + + # flags + CPPFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +diff --git a/dwm.c b/dwm.c +index 0362114..566491a 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -40,6 +40,8 @@ + #include <X11/extensions/Xinerama.h> + #endif /* XINERAMA */ + #include <X11/Xft/Xft.h> ++#include <X11/Xlib-xcb.h> ++#include <xcb/res.h> + + #include "drw.h" + #include "util.h" +@@ -92,9 +94,11 @@ struct Client { + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + int bw, oldbw; + unsigned int tags; +- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; ++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; ++ pid_t pid; + Client *next; + Client *snext; ++ Client *swallowing; + Monitor *mon; + Window win; + }; +@@ -138,6 +142,8 @@ typedef struct { + const char *title; + unsigned int tags; + int isfloating; ++ int isterminal; ++ int noswallow; + int monitor; + } Rule; + +@@ -170,12 +176,14 @@ static void focus(Client *c); + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static pid_t getparentprocess(pid_t p); + static int getrootptr(int *x, int *y); + static long getstate(Window w); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); + static void grabbuttons(Client *c, int focused); + static void grabkeys(void); + static void incnmaster(const Arg *arg); ++static int isdescprocess(pid_t p, pid_t c); + static void keypress(XEvent *e); + static void killclient(const Arg *arg); + static void manage(Window w, XWindowAttributes *wa); +@@ -206,8 +214,10 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static Client *swallowingclient(Window w); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); ++static Client *termforwin(const Client *c); + static void tile(Monitor *); + static void togglebar(const Arg *arg); + static void togglefloating(const Arg *arg); +@@ -227,6 +237,7 @@ static void updatewindowtype(Client *c); + static void updatetitle(Client *c); + static void updatewmhints(Client *c); + static void view(const Arg *arg); ++static pid_t winpid(Window w); + static Client *wintoclient(Window w); + static Monitor *wintomon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); +@@ -267,6 +278,8 @@ static Drw *drw; + static Monitor *mons, *selmon; + static Window root; + ++static xcb_connection_t *xcon; ++ + /* configuration, allows nested code to access above variables */ + #include "config.h" + +@@ -296,6 +309,7 @@ applyrules(Client *c) + && (!r->class || strstr(class, r->class)) + && (!r->instance || strstr(instance, r->instance))) + { ++ c->isterminal = r->isterminal; + c->isfloating = r->isfloating; + c->tags |= r->tags; + for (m = mons; m && m->num != r->monitor; m = m->next); +@@ -413,6 +427,46 @@ attachstack(Client *c) + } + + void ++swallow(Client *p, Client *c) ++{ ++ if (c->noswallow || c->isterminal) ++ return; ++ ++ detach(c); ++ detachstack(c); ++ ++ setclientstate(c, WithdrawnState); ++ XUnmapWindow(dpy, p->win); ++ ++ p->swallowing = c; ++ c->mon = p->mon; ++ ++ Window w = p->win; ++ p->win = c->win; ++ c->win = w; ++ updatetitle(p); ++ arrange(p->mon); ++ configure(p); ++ updateclientlist(); ++} ++ ++void ++unswallow(Client *c) ++{ ++ c->win = c->swallowing->win; ++ ++ free(c->swallowing); ++ c->swallowing = NULL; ++ ++ updatetitle(c); ++ arrange(c->mon); ++ XMapWindow(dpy, c->win); ++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); ++ configure(c); ++ setclientstate(c, NormalState); ++} ++ ++void + buttonpress(XEvent *e) + { + unsigned int i, x, click; +@@ -475,7 +529,7 @@ cleanup(void) + selmon->lt[selmon->sellt] = &foo; + for (m = mons; m; m = m->next) + while (m->stack) +- unmanage(m->stack, 0); ++ unmanage(m->stack, 0); // XXX - unmanage swallowing windows too + XUngrabKey(dpy, AnyKey, AnyModifier, root); + while (mons) + cleanupmon(mons); +@@ -661,6 +715,9 @@ destroynotify(XEvent *e) + + if ((c = wintoclient(ev->window))) + unmanage(c, 1); ++ ++ else if ((c = swallowingclient(ev->window))) ++ unmanage(c->swallowing, 1); + } + + void +@@ -1032,12 +1089,13 @@ killclient(const Arg *arg) + void + manage(Window w, XWindowAttributes *wa) + { +- Client *c, *t = NULL; ++ Client *c, *t, *term = NULL; + Window trans = None; + XWindowChanges wc; + + c = ecalloc(1, sizeof(Client)); + c->win = w; ++ c->pid = winpid(w); + updatetitle(c); + if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) { + c->mon = t->mon; +@@ -1045,7 +1103,9 @@ manage(Window w, XWindowAttributes *wa) + } else { + c->mon = selmon; + applyrules(c); ++ term = termforwin(c); + } ++ + /* geometry */ + c->x = c->oldx = wa->x; + c->y = c->oldy = wa->y; +@@ -1087,6 +1147,8 @@ manage(Window w, XWindowAttributes *wa) + c->mon->sel = c; + arrange(c->mon); + XMapWindow(dpy, c->win); ++ if (term) ++ swallow(term, c); + focus(NULL); + } + +@@ -1758,6 +1820,20 @@ unmanage(Client *c, int destroyed) + Monitor *m = c->mon; + XWindowChanges wc; + ++ if (c->swallowing) { ++ unswallow(c); ++ return; ++ } ++ ++ Client *s = swallowingclient(c->win); ++ if (s) { ++ free(s->swallowing); ++ s->swallowing = NULL; ++ arrange(m); ++ focus(NULL); ++ return; ++ } ++ + /* The server grab construct avoids race conditions. */ + detach(c); + detachstack(c); +@@ -1773,9 +1849,12 @@ unmanage(Client *c, int destroyed) + XUngrabServer(dpy); + } + free(c); +- focus(NULL); +- updateclientlist(); +- arrange(m); ++ ++ if (!s) { ++ arrange(m); ++ focus(NULL); ++ updateclientlist(); ++ } + } + + void +@@ -2040,16 +2119,116 @@ view(const Arg *arg) + arrange(selmon); + } + ++pid_t ++winpid(Window w) ++{ ++ pid_t result = 0; ++ ++ xcb_res_client_id_spec_t spec = {0}; ++ spec.client = w; ++ spec.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID; ++ ++ xcb_generic_error_t *e = NULL; ++ xcb_res_query_client_ids_cookie_t c = xcb_res_query_client_ids(xcon, 1, &spec); ++ xcb_res_query_client_ids_reply_t *r = xcb_res_query_client_ids_reply(xcon, c, &e); ++ ++ if (!r) ++ return (pid_t)0; ++ ++ xcb_res_client_id_value_iterator_t i = xcb_res_query_client_ids_ids_iterator(r); ++ for (; i.rem; xcb_res_client_id_value_next(&i)) { ++ spec = i.data->spec; ++ if (spec.mask & XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID) { ++ uint32_t *t = xcb_res_client_id_value_value(i.data); ++ result = *t; ++ break; ++ } ++ } ++ ++ free(r); ++ ++ if (result == (pid_t)-1) ++ result = 0; ++ return result; ++} ++ ++pid_t ++getparentprocess(pid_t p) ++{ ++ unsigned int v = 0; ++ ++#ifdef __linux__ ++ FILE *f; ++ char buf[256]; ++ snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)p); ++ ++ if (!(f = fopen(buf, "r"))) ++ return 0; ++ ++ fscanf(f, "%*u %*s %*c %u", &v); ++ fclose(f); ++#endif /* __linux__ */ ++ ++ return (pid_t)v; ++} ++ ++int ++isdescprocess(pid_t p, pid_t c) ++{ ++ while (p != c && c != 0) ++ c = getparentprocess(c); ++ ++ return (int)c; ++} ++ ++Client * ++termforwin(const Client *w) ++{ ++ Client *c; ++ Monitor *m; ++ ++ if (!w->pid || w->isterminal) ++ return NULL; ++ ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { ++ if (c->isterminal && !c->swallowing && c->pid && isdescprocess(c->pid, w->pid)) ++ return c; ++ } ++ } ++ ++ return NULL; ++} ++ ++Client * ++swallowingclient(Window w) ++{ ++ Client *c; ++ Monitor *m; ++ ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { ++ if (c->swallowing && c->swallowing->win == w) ++ return c; ++ } ++ } ++ ++ return NULL; ++} ++ + Client * + wintoclient(Window w) + { + Client *c; + Monitor *m; + +- for (m = mons; m; m = m->next) +- for (c = m->clients; c; c = c->next) ++ for (m = mons; m; m = m->next) { ++ for (c = m->clients; c; c = c->next) { + if (c->win == w) + return c; ++ } ++ } ++ + return NULL; + } + +@@ -2131,6 +2310,8 @@ main(int argc, char *argv[]) + fputs("warning: no locale support\n", stderr); + if (!(dpy = XOpenDisplay(NULL))) + die("dwm: cannot open display\n"); ++ if (!(xcon = XGetXCBConnection(dpy))) ++ die("dwm: cannot get xcb connection\n"); + checkotherwm(); + setup(); + scan(); diff --git a/dwm.suckless.org/patches/dwm-swapfocus-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-swapfocus-20160731-56a31dc.diff @@ -0,0 +1,67 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/swapfocus +This patch makes it possible to switch focus with one single shortcut (alt-s) +instead of having to think if you should use alt-j or alt-k for reaching the +last used window. + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -207,6 +207,7 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static void swapfocus(); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); + static void tile(Monitor *); +@@ -236,6 +237,7 @@ static int xerrorstart(Display *dpy, XEr + static void zoom(const Arg *arg); + + /* variables */ ++static Client *prevclient = NULL; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -1645,6 +1647,17 @@ spawn(const Arg *arg) + } + + void ++swapfocus() ++{ ++ Client *c; ++ for(c = selmon->clients; c && c != prevclient; c = c->next) ; ++ if(c == prevclient) { ++ focus(prevclient); ++ restack(prevclient->mon); ++ } ++} ++ ++void + tag(const Arg *arg) + { + if (selmon->sel && arg->ui & TAGMASK) { +@@ -1743,6 +1756,7 @@ unfocus(Client *c, int setfocus) + { + if (!c) + return; ++ prevclient = c; + grabbuttons(c, 0); + XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel); + if (setfocus) { +@@ -2109,12 +2123,13 @@ void + zoom(const Arg *arg) + { + Client *c = selmon->sel; ++ prevclient = nexttiled(selmon->clients); + + if (!selmon->lt[selmon->sellt]->arrange + || (selmon->sel && selmon->sel->isfloating)) + return; + if (c == nexttiled(selmon->clients)) +- if (!c || !(c = nexttiled(c->next))) ++ if (!c || !(c = prevclient = nexttiled(c->next))) + return; + pop(c); + } diff --git a/dwm.suckless.org/patches/dwm-6.0-swapfocus.diff b/dwm.suckless.org/patches/dwm-swapfocus-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-switchcol-6.1.diff b/dwm.suckless.org/patches/dwm-switchcol-6.1.diff @@ -0,0 +1,47 @@ +diff -urp dwm-6.1/dwm.c dwm-6.1-patched/dwm.c +--- dwm-6.1/dwm.c 2015-11-09 06:39:37.000000000 +0800 ++++ dwm-6.1-patched/dwm.c 2016-03-24 23:56:35.435047948 +0800 +@@ -206,6 +206,7 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static void switchcol(const Arg *arg); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); + static void tile(Monitor *); +@@ -1645,6 +1646,35 @@ spawn(const Arg *arg) + } + } + ++void ++switchcol(const Arg *arg) ++{ ++ Client *c, *t; ++ int col = 0; ++ int i; ++ ++ if (!selmon->sel) ++ return; ++ for (i = 0, c = nexttiled(selmon->clients); c ; ++ c = nexttiled(c->next), i++) { ++ if (c == selmon->sel) ++ col = (i + 1) > selmon->nmaster; ++ } ++ if (i <= selmon->nmaster) ++ return; ++ for (c = selmon->stack; c; c = c->snext) { ++ if (!ISVISIBLE(c)) ++ continue; ++ for (i = 0, t = nexttiled(selmon->clients); t && t != c; ++ t = nexttiled(t->next), i++); ++ if (t && (i + 1 > selmon->nmaster) != col) { ++ focus(c); ++ restack(selmon); ++ break; ++ } ++ } ++} ++ + void + tag(const Arg *arg) + { diff --git a/dwm.suckless.org/patches/dwm-systray-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-systray-20160731-56a31dc.diff @@ -0,0 +1,725 @@ +Authors: + Jan Christoph Ebersbach <jceb@e-jc.de>, inspired by http://code.google.com/p/dwm-plus + Eric Pruitt <eric.pruitt@gmail.com> + Yury Shvedov <shved@lvk.cs.msu.su> +URL: http://dwm.suckless.org/patches/systray +Implements a system tray for dwm. + +Contributors: +- Carlos Pita, thanks for investigating multi monitor issues and sending in a + patch + +Index: dwm/config.def.h +=================================================================== +--- dwm/config.def.h.orig ++++ dwm/config.def.h +@@ -3,6 +3,10 @@ + /* appearance */ + static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ ++static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ ++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 */ + static const int showbar = 1; /* 0 means no bar */ + static const int topbar = 1; /* 0 means bottom bar */ + static const char *fonts[] = { "monospace:size=10" }; +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -58,12 +58,30 @@ + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) + #define ColBorder 2 + ++#define SYSTEM_TRAY_REQUEST_DOCK 0 ++ ++/* XEMBED messages */ ++#define XEMBED_EMBEDDED_NOTIFY 0 ++#define XEMBED_WINDOW_ACTIVATE 1 ++#define XEMBED_FOCUS_IN 4 ++#define XEMBED_MODALITY_ON 10 ++ ++#define XEMBED_MAPPED (1 << 0) ++#define XEMBED_WINDOW_ACTIVATE 1 ++#define XEMBED_WINDOW_DEACTIVATE 2 ++ ++#define VERSION_MAJOR 0 ++#define VERSION_MINOR 0 ++#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR ++ + /* enums */ + enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ + enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ + enum { NetSupported, NetWMName, NetWMState, ++ NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, + NetWMFullscreen, NetActiveWindow, NetWMWindowType, + NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ ++enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */ + enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ + enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, + ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ +@@ -142,6 +160,12 @@ typedef struct { + int monitor; + } Rule; + ++typedef struct Systray Systray; ++struct Systray { ++ Window win; ++ Client *icons; ++}; ++ + /* function declarations */ + static void applyrules(Client *c); + static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); +@@ -171,8 +195,10 @@ static void focus(Client *c); + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static Atom getatomprop(Client *c, Atom prop); + static int getrootptr(int *x, int *y); + static long getstate(Window w); ++static unsigned int getsystraywidth(); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); + static void grabbuttons(Client *c, int focused); + static void grabkeys(void); +@@ -190,13 +216,16 @@ static void pop(Client *); + static void propertynotify(XEvent *e); + static void quit(const Arg *arg); + static Monitor *recttomon(int x, int y, int w, int h); ++static void removesystrayicon(Client *i); + static void resize(Client *c, int x, int y, int w, int h, int interact); ++static void resizebarwin(Monitor *m); + static void resizeclient(Client *c, int x, int y, int w, int h); + static void resizemouse(const Arg *arg); ++static void resizerequest(XEvent *e); + static void restack(Monitor *m); + static void run(void); + static void scan(void); +-static int sendevent(Client *c, Atom proto); ++static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4); + static void sendmon(Client *c, Monitor *m); + static void setclientstate(Client *c, long state); + static void setfocus(Client *c); +@@ -207,6 +236,7 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static Monitor *systraytomon(Monitor *m); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); + static void tile(Monitor *); +@@ -224,18 +254,23 @@ static void updateclientlist(void); + static void updatenumlockmask(void); + static void updatesizehints(Client *c); + static void updatestatus(void); ++static void updatesystray(void); ++static void updatesystrayicongeom(Client *i, int w, int h); ++static void updatesystrayiconstate(Client *i, XPropertyEvent *ev); + static void updatewindowtype(Client *c); + static void updatetitle(Client *c); + static void updatewmhints(Client *c); + static void view(const Arg *arg); + static Client *wintoclient(Window w); + static Monitor *wintomon(Window w); ++static Client *wintosystrayicon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); + + /* variables */ ++static Systray *systray = NULL; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -258,9 +293,10 @@ static void (*handler[LASTEvent]) (XEven + [MapRequest] = maprequest, + [MotionNotify] = motionnotify, + [PropertyNotify] = propertynotify, ++ [ResizeRequest] = resizerequest, + [UnmapNotify] = unmapnotify + }; +-static Atom wmatom[WMLast], netatom[NetLast]; ++static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast]; + static int running = 1; + static Cur *cursor[CurLast]; + static Scm scheme[SchemeLast]; +@@ -481,6 +517,11 @@ cleanup(void) + XUngrabKey(dpy, AnyKey, AnyModifier, root); + while (mons) + cleanupmon(mons); ++ if (showsystray) { ++ XUnmapWindow(dpy, systray->win); ++ XDestroyWindow(dpy, systray->win); ++ free(systray); ++ } + for (i = 0; i < CurLast; i++) + drw_cur_free(drw, cursor[i]); + for (i = 0; i < SchemeLast; i++) +@@ -523,9 +564,52 @@ clearurgent(Client *c) + void + clientmessage(XEvent *e) + { ++ XWindowAttributes wa; ++ XSetWindowAttributes swa; + XClientMessageEvent *cme = &e->xclient; + Client *c = wintoclient(cme->window); + ++ if (showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) { ++ /* add systray icons */ ++ if (cme->data.l[1] == SYSTEM_TRAY_REQUEST_DOCK) { ++ if (!(c = (Client *)calloc(1, sizeof(Client)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Client)); ++ if (!(c->win = cme->data.l[2])) { ++ free(c); ++ return; ++ } ++ c->mon = selmon; ++ c->next = systray->icons; ++ systray->icons = c; ++ XGetWindowAttributes(dpy, c->win, &wa); ++ c->x = c->oldx = c->y = c->oldy = 0; ++ c->w = c->oldw = wa.width; ++ c->h = c->oldh = wa.height; ++ c->oldbw = wa.border_width; ++ c->bw = 0; ++ c->isfloating = True; ++ /* reuse tags field as mapped status */ ++ c->tags = 1; ++ updatesizehints(c); ++ updatesystrayicongeom(c, wa.width, wa.height); ++ XAddToSaveSet(dpy, c->win); ++ XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask); ++ XReparentWindow(dpy, c->win, systray->win, 0, 0); ++ /* use parents background color */ ++ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XChangeWindowAttributes(dpy, c->win, CWBackPixel, &swa); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ /* FIXME not sure if I have to send these events, too */ ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_MODALITY_ON, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ XSync(dpy, False); ++ resizebarwin(selmon); ++ updatesystray(); ++ setclientstate(c, NormalState); ++ } ++ return; ++ } + if (!c) + return; + if (cme->message_type == netatom[NetWMState]) { +@@ -580,7 +664,7 @@ configurenotify(XEvent *e) + for (c = m->clients; c; c = c->next) + if (c->isfullscreen) + resizeclient(c, m->mx, m->my, m->mw, m->mh); +- XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); ++ resizebarwin(m); + } + focus(NULL); + arrange(NULL); +@@ -665,6 +749,11 @@ destroynotify(XEvent *e) + + if ((c = wintoclient(ev->window))) + unmanage(c, 1); ++ else if ((c = wintosystrayicon(ev->window))) { ++ removesystrayicon(c); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + } + + void +@@ -708,19 +797,23 @@ dirtomon(int dir) + void + drawbar(Monitor *m) + { +- int x, w, sw = 0; ++ int x, w, sw = 0, stw = 0; + int boxs = drw->fonts->h / 9; + int boxw = drw->fonts->h / 6 + 2; + unsigned int i, occ = 0, urg = 0; + Client *c; + ++ if(showsystray && m == systraytomon(m)) ++ stw = getsystraywidth(); ++ + /* draw status first so it can be overdrawn by tags later */ + if (m == selmon) { /* status is only drawn on selected monitor */ + drw_setscheme(drw, scheme[SchemeNorm]); + sw = TEXTW(stext) - lrpad / 2; /* no right padding so status text hugs the corner */ +- drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0); ++ drw_text(drw, m->ww - sw - stw, 0, sw, bh, lrpad / 2 - 2, stext, 0); + } + ++ resizebarwin(m); + for (c = m->clients; c; c = c->next) { + occ |= c->tags; + if (c->isurgent) +@@ -741,7 +834,7 @@ drawbar(Monitor *m) + drw_setscheme(drw, scheme[SchemeNorm]); + x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); + +- if ((w = m->ww - sw - x) > bh) { ++ if ((w = m->ww - sw - stw - x) > bh) { + if (m->sel) { + drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); +@@ -752,7 +845,7 @@ drawbar(Monitor *m) + drw_rect(drw, x, 0, w, bh, 1, 1); + } + } +- drw_map(drw, m->barwin, 0, 0, m->ww, bh); ++ drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh); + } + + void +@@ -789,8 +882,11 @@ expose(XEvent *e) + Monitor *m; + XExposeEvent *ev = &e->xexpose; + +- if (ev->count == 0 && (m = wintomon(ev->window))) ++ if (ev->count == 0 && (m = wintomon(ev->window))) { + drawbar(m); ++ if (m == selmon) ++ updatesystray(); ++ } + } + + void +@@ -877,10 +973,17 @@ getatomprop(Client *c, Atom prop) + unsigned long dl; + unsigned char *p = NULL; + Atom da, atom = None; ++ /* FIXME getatomprop should return the number of items and a pointer to ++ * the stored data instead of this workaround */ ++ Atom req = XA_ATOM; ++ if (prop == xatom[XembedInfo]) ++ req = xatom[XembedInfo]; + +- if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM, ++ if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, req, + &da, &di, &dl, &dl, &p) == Success && p) { + atom = *(Atom *)p; ++ if (da == xatom[XembedInfo] && dl == 2) ++ atom = ((Atom *)p)[1]; + XFree(p); + } + return atom; +@@ -914,6 +1017,16 @@ getstate(Window w) + return result; + } + ++unsigned int ++getsystraywidth() ++{ ++ unsigned int w = 0; ++ Client *i; ++ if(showsystray) ++ for(i = systray->icons; i; w += i->w + systrayspacing, i = i->next) ; ++ return w ? w + systrayspacing : 1; ++} ++ + int + gettextprop(Window w, Atom atom, char *text, unsigned int size) + { +@@ -1020,7 +1133,7 @@ killclient(const Arg *arg) + { + if (!selmon->sel) + return; +- if (!sendevent(selmon->sel, wmatom[WMDelete])) { ++ if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0 , 0, 0)) { + XGrabServer(dpy); + XSetErrorHandler(xerrordummy); + XSetCloseDownMode(dpy, DestroyAll); +@@ -1108,6 +1221,12 @@ maprequest(XEvent *e) + { + static XWindowAttributes wa; + XMapRequestEvent *ev = &e->xmaprequest; ++ Client *i; ++ if ((i = wintosystrayicon(ev->window))) { ++ sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + + if (!XGetWindowAttributes(dpy, ev->window, &wa)) + return; +@@ -1235,6 +1354,16 @@ propertynotify(XEvent *e) + Window trans; + XPropertyEvent *ev = &e->xproperty; + ++ if ((c = wintosystrayicon(ev->window))) { ++ if (ev->atom == XA_WM_NORMAL_HINTS) { ++ updatesizehints(c); ++ updatesystrayicongeom(c, c->w, c->h); ++ } ++ else ++ updatesystrayiconstate(c, ev); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + if ((ev->window == root) && (ev->atom == XA_WM_NAME)) + updatestatus(); + else if (ev->state == PropertyDelete) +@@ -1286,6 +1415,20 @@ recttomon(int x, int y, int w, int h) + } + + void ++removesystrayicon(Client *i) ++{ ++ Client **ii; ++ ++ if (!showsystray || !i) ++ return; ++ for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next); ++ if (ii) ++ *ii = i->next; ++ free(i); ++} ++ ++ ++void + resize(Client *c, int x, int y, int w, int h, int interact) + { + if (applysizehints(c, &x, &y, &w, &h, interact)) +@@ -1293,6 +1436,14 @@ resize(Client *c, int x, int y, int w, i + } + + void ++resizebarwin(Monitor *m) { ++ unsigned int w = m->ww; ++ if (showsystray && m == systraytomon(m)) ++ w -= getsystraywidth(); ++ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, w, bh); ++} ++ ++void + resizeclient(Client *c, int x, int y, int w, int h) + { + XWindowChanges wc; +@@ -1365,6 +1516,19 @@ resizemouse(const Arg *arg) + } + + void ++resizerequest(XEvent *e) ++{ ++ XResizeRequestEvent *ev = &e->xresizerequest; ++ Client *i; ++ ++ if ((i = wintosystrayicon(ev->window))) { ++ updatesystrayicongeom(i, ev->width, ev->height); ++ resizebarwin(selmon); ++ updatesystray(); ++ } ++} ++ ++void + restack(Monitor *m) + { + Client *c; +@@ -1453,26 +1617,36 @@ setclientstate(Client *c, long state) + } + + int +-sendevent(Client *c, Atom proto) ++sendevent(Window w, Atom proto, int mask, long d0, long d1, long d2, long d3, long d4) + { + int n; +- Atom *protocols; ++ Atom *protocols, mt; + int exists = 0; + XEvent ev; + +- if (XGetWMProtocols(dpy, c->win, &protocols, &n)) { +- while (!exists && n--) +- exists = protocols[n] == proto; +- XFree(protocols); ++ if (proto == wmatom[WMTakeFocus] || proto == wmatom[WMDelete]) { ++ mt = wmatom[WMProtocols]; ++ if (XGetWMProtocols(dpy, w, &protocols, &n)) { ++ while (!exists && n--) ++ exists = protocols[n] == proto; ++ XFree(protocols); ++ } ++ } ++ else { ++ exists = True; ++ mt = proto; + } + if (exists) { + ev.type = ClientMessage; +- ev.xclient.window = c->win; +- ev.xclient.message_type = wmatom[WMProtocols]; ++ ev.xclient.window = w; ++ ev.xclient.message_type = mt; + ev.xclient.format = 32; +- ev.xclient.data.l[0] = proto; +- ev.xclient.data.l[1] = CurrentTime; +- XSendEvent(dpy, c->win, False, NoEventMask, &ev); ++ ev.xclient.data.l[0] = d0; ++ ev.xclient.data.l[1] = d1; ++ ev.xclient.data.l[2] = d2; ++ ev.xclient.data.l[3] = d3; ++ ev.xclient.data.l[4] = d4; ++ XSendEvent(dpy, w, False, mask, &ev); + } + return exists; + } +@@ -1486,7 +1660,7 @@ setfocus(Client *c) + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &(c->win), 1); + } +- sendevent(c, wmatom[WMTakeFocus]); ++ sendevent(c->win, wmatom[WMTakeFocus], NoEventMask, wmatom[WMTakeFocus], CurrentTime, 0, 0, 0); + } + + void +@@ -1572,12 +1746,19 @@ setup(void) + wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False); + netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); + netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); ++ netatom[NetSystemTray] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_S0", False); ++ netatom[NetSystemTrayOP] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", False); ++ netatom[NetSystemTrayOrientation] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION", False); ++ netatom[NetSystemTrayOrientationHorz] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION_HORZ", False); + netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); + netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); + netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); + netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); + netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); + netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); ++ xatom[Manager] = XInternAtom(dpy, "MANAGER", False); ++ xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False); ++ xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False); + /* init cursors */ + cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); + cursor[CurResize] = drw_cur_create(drw, XC_sizing); +@@ -1585,6 +1766,8 @@ setup(void) + /* init appearance */ + scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 3); + scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 3); ++ /* init system tray */ ++ updatesystray(); + /* init bars */ + updatebars(); + updatestatus(); +@@ -1693,7 +1876,18 @@ togglebar(const Arg *arg) + { + selmon->showbar = !selmon->showbar; + updatebarpos(selmon); +- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); ++ resizebarwin(selmon); ++ if (showsystray) { ++ XWindowChanges wc; ++ if (!selmon->showbar) ++ wc.y = -bh; ++ else if (selmon->showbar) { ++ wc.y = 0; ++ if (!selmon->topbar) ++ wc.y = selmon->mh - bh; ++ } ++ XConfigureWindow(dpy, systray->win, CWY, &wc); ++ } + arrange(selmon); + } + +@@ -1789,11 +1983,18 @@ unmapnotify(XEvent *e) + else + unmanage(c, 0); + } ++ else if ((c = wintosystrayicon(ev->window))) { ++ /* KLUDGE! sometimes icons occasionally unmap their windows, but do ++ * _not_ destroy them. We map those windows back */ ++ XMapRaised(dpy, c->win); ++ updatesystray(); ++ } + } + + void + updatebars(void) + { ++ unsigned int w; + Monitor *m; + XSetWindowAttributes wa = { + .override_redirect = True, +@@ -1803,10 +2004,15 @@ updatebars(void) + for (m = mons; m; m = m->next) { + if (m->barwin) + continue; +- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), ++ w = m->ww; ++ if (showsystray && m == systraytomon(m)) ++ w -= getsystraywidth(); ++ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, w, bh, 0, DefaultDepth(dpy, screen), + CopyFromParent, DefaultVisual(dpy, screen), + CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); + XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); ++ if (showsystray && m == systraytomon(m)) ++ XMapRaised(dpy, systray->win); + XMapRaised(dpy, m->barwin); + } + } +@@ -1994,6 +2200,121 @@ updatestatus(void) + if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) + strcpy(stext, "dwm-"VERSION); + drawbar(selmon); ++ updatesystray(); ++} ++ ++void ++updatesystrayicongeom(Client *i, int w, int h) ++{ ++ if (i) { ++ i->h = bh; ++ if (w == h) ++ i->w = bh; ++ else if (h == bh) ++ i->w = w; ++ else ++ i->w = (int) ((float)bh * ((float)w / (float)h)); ++ applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False); ++ /* force icons into the systray dimenons if they don't want to */ ++ if (i->h > bh) { ++ if (i->w == i->h) ++ i->w = bh; ++ else ++ i->w = (int) ((float)bh * ((float)i->w / (float)i->h)); ++ i->h = bh; ++ } ++ } ++} ++ ++void ++updatesystrayiconstate(Client *i, XPropertyEvent *ev) ++{ ++ long flags; ++ int code = 0; ++ ++ if (!showsystray || !i || ev->atom != xatom[XembedInfo] || ++ !(flags = getatomprop(i, xatom[XembedInfo]))) ++ return; ++ ++ if (flags & XEMBED_MAPPED && !i->tags) { ++ i->tags = 1; ++ code = XEMBED_WINDOW_ACTIVATE; ++ XMapRaised(dpy, i->win); ++ setclientstate(i, NormalState); ++ } ++ else if (!(flags & XEMBED_MAPPED) && i->tags) { ++ i->tags = 0; ++ code = XEMBED_WINDOW_DEACTIVATE; ++ XUnmapWindow(dpy, i->win); ++ setclientstate(i, WithdrawnState); ++ } ++ else ++ return; ++ sendevent(i->win, xatom[Xembed], StructureNotifyMask, CurrentTime, code, 0, ++ systray->win, XEMBED_EMBEDDED_VERSION); ++} ++ ++void ++updatesystray(void) ++{ ++ XSetWindowAttributes wa; ++ XWindowChanges wc; ++ Client *i; ++ Monitor *m = systraytomon(NULL); ++ unsigned int x = m->mx + m->mw; ++ unsigned int w = 1; ++ ++ if (!showsystray) ++ return; ++ if (!systray) { ++ /* init systray */ ++ if (!(systray = (Systray *)calloc(1, sizeof(Systray)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Systray)); ++ systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel][ColBg].pixel); ++ wa.event_mask = ButtonPressMask | ExposureMask; ++ wa.override_redirect = True; ++ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XSelectInput(dpy, systray->win, SubstructureNotifyMask); ++ XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32, ++ PropModeReplace, (unsigned char *)&netatom[NetSystemTrayOrientationHorz], 1); ++ XChangeWindowAttributes(dpy, systray->win, CWEventMask|CWOverrideRedirect|CWBackPixel, &wa); ++ XMapRaised(dpy, systray->win); ++ XSetSelectionOwner(dpy, netatom[NetSystemTray], systray->win, CurrentTime); ++ if (XGetSelectionOwner(dpy, netatom[NetSystemTray]) == systray->win) { ++ sendevent(root, xatom[Manager], StructureNotifyMask, CurrentTime, netatom[NetSystemTray], systray->win, 0, 0); ++ XSync(dpy, False); ++ } ++ else { ++ fprintf(stderr, "dwm: unable to obtain system tray.\n"); ++ free(systray); ++ systray = NULL; ++ return; ++ } ++ } ++ for (w = 0, i = systray->icons; i; i = i->next) { ++ /* make sure the background color stays the same */ ++ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XChangeWindowAttributes(dpy, i->win, CWBackPixel, &wa); ++ XMapRaised(dpy, i->win); ++ w += systrayspacing; ++ i->x = w; ++ XMoveResizeWindow(dpy, i->win, i->x, 0, i->w, i->h); ++ w += i->w; ++ if (i->mon != m) ++ i->mon = m; ++ } ++ w = w ? w + systrayspacing : 1; ++ x -= w; ++ XMoveResizeWindow(dpy, systray->win, x, m->by, w, bh); ++ wc.x = x; wc.y = m->by; wc.width = w; wc.height = bh; ++ wc.stack_mode = Above; wc.sibling = m->barwin; ++ XConfigureWindow(dpy, systray->win, CWX|CWY|CWWidth|CWHeight|CWSibling|CWStackMode, &wc); ++ XMapWindow(dpy, systray->win); ++ XMapSubwindows(dpy, systray->win); ++ /* redraw background */ ++ XSetForeground(dpy, drw->gc, scheme[SchemeNorm][ColBg].pixel); ++ XFillRectangle(dpy, systray->win, drw->gc, 0, 0, w, bh); ++ XSync(dpy, False); + } + + void +@@ -2052,6 +2373,16 @@ wintoclient(Window w) + return NULL; + } + ++Client * ++wintosystrayicon(Window w) { ++ Client *i = NULL; ++ ++ if (!showsystray || !w) ++ return i; ++ for (i = systray->icons; i && i->win != w; i = i->next) ; ++ return i; ++} ++ + Monitor * + wintomon(Window w) + { +@@ -2105,6 +2436,22 @@ xerrorstart(Display *dpy, XErrorEvent *e + return -1; + } + ++Monitor * ++systraytomon(Monitor *m) { ++ Monitor *t; ++ int i, n; ++ if(!systraypinning) { ++ if(!m) ++ return selmon; ++ return m == selmon ? m : NULL; ++ } ++ for(n = 1, t = mons; t && t->next; n++, t = t->next) ; ++ for(i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next) ; ++ if(systraypinningfailfirst && n < systraypinning) ++ return mons; ++ return t; ++} ++ + void + zoom(const Arg *arg) + { diff --git a/dwm.suckless.org/patches/dwm-6.0-systray.diff b/dwm.suckless.org/patches/dwm-systray-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-systray-git-20160626-7af4d43.diff b/dwm.suckless.org/patches/dwm-systray-git-20160626-7af4d43.diff @@ -0,0 +1,685 @@ +diff --git a/config.def.h b/config.def.h +index 13ea4b9..d7ae387 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -3,6 +3,10 @@ + /* appearance */ + static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ ++static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ ++static const unsigned int systrayspacing = 2; /* systray spacing */ ++static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, 0: display systray on the last monitor*/ ++static const int showsystray = 1; /* 0 means no systray */ + static const int showbar = 1; /* 0 means no bar */ + static const int topbar = 1; /* 0 means bottom bar */ + static const char *fonts[] = { "monospace:size=10" }; +diff --git a/dwm.c b/dwm.c +index b2bc9bd..38ad640 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -58,12 +58,30 @@ + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) + #define ColBorder 2 + ++#define SYSTEM_TRAY_REQUEST_DOCK 0 ++#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0 ++ ++/* XEMBED messages */ ++#define XEMBED_EMBEDDED_NOTIFY 0 ++#define XEMBED_WINDOW_ACTIVATE 1 ++#define XEMBED_FOCUS_IN 4 ++#define XEMBED_MODALITY_ON 10 ++ ++#define XEMBED_MAPPED (1 << 0) ++#define XEMBED_WINDOW_ACTIVATE 1 ++#define XEMBED_WINDOW_DEACTIVATE 2 ++ ++#define VERSION_MAJOR 0 ++#define VERSION_MINOR 0 ++#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR ++ + /* enums */ + enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ + enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */ +-enum { NetSupported, NetWMName, NetWMState, +- NetWMFullscreen, NetActiveWindow, NetWMWindowType, +- NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ ++enum { NetSupported, NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, ++ NetWMName, NetWMState, NetWMFullscreen, NetActiveWindow, NetWMWindowType, ++ NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ ++enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */ + enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ + enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, + ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ +@@ -142,6 +160,12 @@ typedef struct { + int monitor; + } Rule; + ++typedef struct Systray Systray; ++struct Systray { ++ Window win; ++ Client *icons; ++}; ++ + /* function declarations */ + static void applyrules(Client *c); + static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); +@@ -171,8 +195,10 @@ static void focus(Client *c); + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static Atom getatomprop(Client *c, Atom prop); + static int getrootptr(int *x, int *y); + static long getstate(Window w); ++static unsigned int getsystraywidth(); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); + static void grabbuttons(Client *c, int focused); + static void grabkeys(void); +@@ -190,13 +216,16 @@ static void pop(Client *); + static void propertynotify(XEvent *e); + static void quit(const Arg *arg); + static Monitor *recttomon(int x, int y, int w, int h); ++static void removesystrayicon(Client *i); + static void resize(Client *c, int x, int y, int w, int h, int interact); ++static void resizebarwin(Monitor *m); + static void resizeclient(Client *c, int x, int y, int w, int h); + static void resizemouse(const Arg *arg); ++static void resizerequest(XEvent *e); + static void restack(Monitor *m); + static void run(void); + static void scan(void); +-static int sendevent(Client *c, Atom proto); ++static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4); + static void sendmon(Client *c, Monitor *m); + static void setclientstate(Client *c, long state); + static void setfocus(Client *c); +@@ -207,6 +236,7 @@ static void setup(void); + static void showhide(Client *c); + static void sigchld(int unused); + static void spawn(const Arg *arg); ++static Monitor *systraytomon(Monitor *m); + static void tag(const Arg *arg); + static void tagmon(const Arg *arg); + static void tile(Monitor *); +@@ -224,18 +254,24 @@ static void updateclientlist(void); + static void updatenumlockmask(void); + static void updatesizehints(Client *c); + static void updatestatus(void); ++static void updatesystray(void); ++static void updatesystrayicongeom(Client *i, int w, int h); ++static void updatesystrayiconstate(Client *i, XPropertyEvent *ev); + static void updatewindowtype(Client *c); + static void updatetitle(Client *c); + static void updatewmhints(Client *c); + static void view(const Arg *arg); + static Client *wintoclient(Window w); + static Monitor *wintomon(Window w); ++static Client *wintosystrayicon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); + static int xerrordummy(Display *dpy, XErrorEvent *ee); + static int xerrorstart(Display *dpy, XErrorEvent *ee); + static void zoom(const Arg *arg); + + /* variables */ ++static Systray *systray = NULL; ++static unsigned long systrayorientation = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -258,9 +294,10 @@ static void (*handler[LASTEvent]) (XEvent *) = { + [MapRequest] = maprequest, + [MotionNotify] = motionnotify, + [PropertyNotify] = propertynotify, ++ [ResizeRequest] = resizerequest, + [UnmapNotify] = unmapnotify + }; +-static Atom wmatom[WMLast], netatom[NetLast]; ++static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast]; + static int running = 1; + static Cur *cursor[CurLast]; + static Scm scheme[SchemeLast]; +@@ -481,6 +518,11 @@ cleanup(void) + XUngrabKey(dpy, AnyKey, AnyModifier, root); + while (mons) + cleanupmon(mons); ++ if (showsystray) { ++ XUnmapWindow(dpy, systray->win); ++ XDestroyWindow(dpy, systray->win); ++ free(systray); ++ } + for (i = 0; i < CurLast; i++) + drw_cur_free(drw, cursor[i]); + for (i = 0; i < SchemeLast; i++) +@@ -523,9 +565,50 @@ clearurgent(Client *c) + void + clientmessage(XEvent *e) + { ++ XWindowAttributes wa; ++ XSetWindowAttributes swa; + XClientMessageEvent *cme = &e->xclient; + Client *c = wintoclient(cme->window); + ++ if (showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) { ++ /* add systray icons */ ++ if (cme->data.l[1] == SYSTEM_TRAY_REQUEST_DOCK) { ++ if (!(c = (Client *)calloc(1, sizeof(Client)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Client)); ++ c->win = cme->data.l[2]; ++ c->mon = selmon; ++ c->next = systray->icons; ++ systray->icons = c; ++ XGetWindowAttributes(dpy, c->win, &wa); ++ c->x = c->oldx = c->y = c->oldy = 0; ++ c->w = c->oldw = wa.width; ++ c->h = c->oldh = wa.height; ++ c->oldbw = wa.border_width; ++ c->bw = 0; ++ c->isfloating = True; ++ /* reuse tags field as mapped status */ ++ c->tags = 1; ++ updatesizehints(c); ++ updatesystrayicongeom(c, wa.width, wa.height); ++ XAddToSaveSet(dpy, c->win); ++ XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask); ++ XReparentWindow(dpy, c->win, systray->win, 0, 0); ++ /* use parents background color */ ++ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XChangeWindowAttributes(dpy, c->win, CWBackPixel, &swa); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ /* FIXME not sure if I have to send these events, too */ ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_MODALITY_ON, 0 , systray->win, XEMBED_EMBEDDED_VERSION); ++ XSync(dpy, False); ++ resizebarwin(selmon); ++ updatesystray(); ++ setclientstate(c, NormalState); ++ } ++ return; ++ } ++ + if (!c) + return; + if (cme->message_type == netatom[NetWMState]) { +@@ -580,7 +663,7 @@ configurenotify(XEvent *e) + for (c = m->clients; c; c = c->next) + if (c->isfullscreen) + resizeclient(c, m->mx, m->my, m->mw, m->mh); +- XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); ++ resizebarwin(m); + } + focus(NULL); + arrange(NULL); +@@ -665,6 +748,11 @@ destroynotify(XEvent *e) + + if ((c = wintoclient(ev->window))) + unmanage(c, 1); ++ else if ((c = wintosystrayicon(ev->window))) { ++ removesystrayicon(c); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + } + + void +@@ -718,9 +806,13 @@ drawbar(Monitor *m) + if (m == selmon) { /* status is only drawn on selected monitor */ + drw_setscheme(drw, scheme[SchemeNorm]); + sw = TEXTW(stext) - lrpad / 2; /* no right padding so status text hugs the corner */ ++ if (showsystray && m == systraytomon(m)) { ++ sw += getsystraywidth(); ++ } + drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0); + } + ++ resizebarwin(m); + for (c = m->clients; c; c = c->next) { + occ |= c->tags; + if (c->isurgent) +@@ -762,6 +854,7 @@ drawbars(void) + + for (m = mons; m; m = m->next) + drawbar(m); ++ updatesystray(); + } + + void +@@ -789,8 +882,11 @@ expose(XEvent *e) + Monitor *m; + XExposeEvent *ev = &e->xexpose; + +- if (ev->count == 0 && (m = wintomon(ev->window))) ++ if (ev->count == 0 && (m = wintomon(ev->window))) { + drawbar(m); ++ if (m == selmon) ++ updatesystray(); ++ } + } + + void +@@ -877,10 +973,17 @@ getatomprop(Client *c, Atom prop) + unsigned long dl; + unsigned char *p = NULL; + Atom da, atom = None; ++ /* FIXME getatomprop should return the number of items and a pointer to ++ * the stored data instead of this workaround */ ++ Atom req = XA_ATOM; ++ if (prop == xatom[XembedInfo]) ++ req = xatom[XembedInfo]; + +- if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM, ++ if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, req, + &da, &di, &dl, &dl, &p) == Success && p) { + atom = *(Atom *)p; ++ if (da == xatom[XembedInfo] && dl == 2) ++ atom = ((Atom *)p)[1]; + XFree(p); + } + return atom; +@@ -914,6 +1017,15 @@ getstate(Window w) + return result; + } + ++unsigned int ++getsystraywidth() { ++ unsigned int w = 0; ++ Client *i; ++ if (showsystray) ++ for (i = systray->icons; i; w += i->w + systrayspacing, i = i->next); ++ return w ? w + systrayspacing : 1; ++} ++ + int + gettextprop(Window w, Atom atom, char *text, unsigned int size) + { +@@ -1020,7 +1132,7 @@ killclient(const Arg *arg) + { + if (!selmon->sel) + return; +- if (!sendevent(selmon->sel, wmatom[WMDelete])) { ++ if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0 , 0, 0)) { + XGrabServer(dpy); + XSetErrorHandler(xerrordummy); + XSetCloseDownMode(dpy, DestroyAll); +@@ -1108,6 +1220,12 @@ maprequest(XEvent *e) + { + static XWindowAttributes wa; + XMapRequestEvent *ev = &e->xmaprequest; ++ Client *i; ++ if ((i = wintosystrayicon(ev->window))) { ++ sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + + if (!XGetWindowAttributes(dpy, ev->window, &wa)) + return; +@@ -1235,6 +1353,16 @@ propertynotify(XEvent *e) + Window trans; + XPropertyEvent *ev = &e->xproperty; + ++ if ((c = wintosystrayicon(ev->window))) { ++ if (ev->atom == XA_WM_NORMAL_HINTS) { ++ updatesizehints(c); ++ updatesystrayicongeom(c, c->w, c->h); ++ } ++ else ++ updatesystrayiconstate(c, ev); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + if ((ev->window == root) && (ev->atom == XA_WM_NAME)) + updatestatus(); + else if (ev->state == PropertyDelete) +@@ -1286,6 +1414,19 @@ recttomon(int x, int y, int w, int h) + } + + void ++removesystrayicon(Client *i) { ++ Client **ii; ++ ++ if (!showsystray || !i) ++ return; ++ for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next); ++ if (ii) ++ *ii = i->next; ++ free(i); ++} ++ ++ ++void + resize(Client *c, int x, int y, int w, int h, int interact) + { + if (applysizehints(c, &x, &y, &w, &h, interact)) +@@ -1293,6 +1434,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) + } + + void ++resizebarwin(Monitor *m) { ++ unsigned int w = m->ww; ++ if (showsystray && m == systraytomon(m)) ++ w -= getsystraywidth(); ++ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, w, bh); ++} ++ ++void + resizeclient(Client *c, int x, int y, int w, int h) + { + XWindowChanges wc; +@@ -1365,6 +1514,18 @@ resizemouse(const Arg *arg) + } + + void ++resizerequest(XEvent *e) { ++ XResizeRequestEvent *ev = &e->xresizerequest; ++ Client *i; ++ ++ if ((i = wintosystrayicon(ev->window))) { ++ updatesystrayicongeom(i, ev->width, ev->height); ++ resizebarwin(selmon); ++ updatesystray(); ++ } ++} ++ ++void + restack(Monitor *m) + { + Client *c; +@@ -1453,26 +1614,36 @@ setclientstate(Client *c, long state) + } + + int +-sendevent(Client *c, Atom proto) ++sendevent(Window w, Atom proto, int mask, long d0, long d1, long d2, long d3, long d4) + { + int n; +- Atom *protocols; ++ Atom *protocols, mt; + int exists = 0; + XEvent ev; + +- if (XGetWMProtocols(dpy, c->win, &protocols, &n)) { +- while (!exists && n--) +- exists = protocols[n] == proto; +- XFree(protocols); ++ if (proto == wmatom[WMTakeFocus] || proto == wmatom[WMDelete]) { ++ mt = wmatom[WMProtocols]; ++ if (XGetWMProtocols(dpy, w, &protocols, &n)) { ++ while(!exists && n--) ++ exists = protocols[n] == proto; ++ XFree(protocols); ++ } ++ } ++ else { ++ exists = True; ++ mt = proto; + } + if (exists) { + ev.type = ClientMessage; +- ev.xclient.window = c->win; +- ev.xclient.message_type = wmatom[WMProtocols]; ++ ev.xclient.window = w; ++ ev.xclient.message_type = mt; + ev.xclient.format = 32; +- ev.xclient.data.l[0] = proto; +- ev.xclient.data.l[1] = CurrentTime; +- XSendEvent(dpy, c->win, False, NoEventMask, &ev); ++ ev.xclient.data.l[0] = d0; ++ ev.xclient.data.l[1] = d1; ++ ev.xclient.data.l[2] = d2; ++ ev.xclient.data.l[3] = d3; ++ ev.xclient.data.l[4] = d4; ++ XSendEvent(dpy, w, False, mask, &ev); + } + return exists; + } +@@ -1486,7 +1657,7 @@ setfocus(Client *c) + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &(c->win), 1); + } +- sendevent(c, wmatom[WMTakeFocus]); ++ sendevent(c->win, wmatom[WMTakeFocus], NoEventMask, wmatom[WMTakeFocus], CurrentTime, 0, 0, 0); + } + + void +@@ -1572,12 +1743,18 @@ setup(void) + wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False); + netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); + netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); ++ netatom[NetSystemTray] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_S0", False); ++ netatom[NetSystemTrayOP] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", False); ++ netatom[NetSystemTrayOrientation] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION", False); + netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); + netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); + netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); + netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); + netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); + netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); ++ xatom[Manager] = XInternAtom(dpy, "MANAGER", False); ++ xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False); ++ xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False); + /* init cursors */ + cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); + cursor[CurResize] = drw_cur_create(drw, XC_sizing); +@@ -1585,6 +1762,8 @@ setup(void) + /* init appearance */ + scheme[SchemeNorm] = drw_scm_create(drw, colors[SchemeNorm], 3); + scheme[SchemeSel] = drw_scm_create(drw, colors[SchemeSel], 3); ++ /* init system tray */ ++ updatesystray(); + /* init bars */ + updatebars(); + updatestatus(); +@@ -1644,6 +1823,22 @@ spawn(const Arg *arg) + } + } + ++Monitor * ++systraytomon(Monitor *m) { ++ Monitor *t; ++ int i, n; ++ if (!systraypinning) { ++ if (!m) ++ return selmon; ++ return m == selmon ? m : NULL; ++ } ++ for (n = 1, t = mons; t && t->next; n++, t = t->next); ++ for (i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next); ++ if (systraypinningfailfirst && n < systraypinning) ++ return mons; ++ return t; ++} ++ + void + tag(const Arg *arg) + { +@@ -1693,7 +1888,18 @@ togglebar(const Arg *arg) + { + selmon->showbar = !selmon->showbar; + updatebarpos(selmon); +- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); ++ resizebarwin(selmon); ++ if (showsystray) { ++ XWindowChanges wc; ++ if (!selmon->showbar) ++ wc.y = -bh; ++ else if (selmon->showbar) { ++ wc.y = 0; ++ if (!selmon->topbar) ++ wc.y = selmon->mh - bh; ++ } ++ XConfigureWindow(dpy, systray->win, CWY, &wc); ++ } + arrange(selmon); + } + +@@ -1789,11 +1995,17 @@ unmapnotify(XEvent *e) + else + unmanage(c, 0); + } ++ else if ((c = wintosystrayicon(ev->window))) { ++ removesystrayicon(c); ++ resizebarwin(selmon); ++ updatesystray(); ++ } + } + + void + updatebars(void) + { ++ unsigned int w; + Monitor *m; + XSetWindowAttributes wa = { + .override_redirect = True, +@@ -1803,10 +2015,15 @@ updatebars(void) + for (m = mons; m; m = m->next) { + if (m->barwin) + continue; +- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen), ++ w = m->ww; ++ if (showsystray && m == systraytomon(m)) ++ w -= getsystraywidth(); ++ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, w, bh, 0, DefaultDepth(dpy, screen), + CopyFromParent, DefaultVisual(dpy, screen), + CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa); + XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor); ++ if (showsystray && m == systraytomon(m)) ++ XMapRaised(dpy, systray->win); + XMapRaised(dpy, m->barwin); + } + } +@@ -1997,6 +2214,117 @@ updatestatus(void) + } + + void ++updatesystrayicongeom(Client *i, int w, int h) { ++ if (i) { ++ i->h = bh; ++ if (w == h) ++ i->w = bh; ++ else if (h == bh) ++ i->w = w; ++ else ++ i->w = (int) ((float)bh * ((float)w / (float)h)); ++ applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False); ++ /* force icons into the systray dimenons if they don't want to */ ++ if (i->h > bh) { ++ if (i->w == i->h) ++ i->w = bh; ++ else ++ i->w = (int) ((float)bh * ((float)i->w / (float)i->h)); ++ i->h = bh; ++ } ++ } ++} ++ ++void ++updatesystrayiconstate(Client *i, XPropertyEvent *ev) { ++ long flags; ++ int code = 0; ++ ++ if (!showsystray || !i || ev->atom != xatom[XembedInfo] || ++ !(flags = getatomprop(i, xatom[XembedInfo]))) ++ return; ++ ++ if (flags & XEMBED_MAPPED && !i->tags) { ++ i->tags = 1; ++ code = XEMBED_WINDOW_ACTIVATE; ++ XMapRaised(dpy, i->win); ++ setclientstate(i, NormalState); ++ } ++ else if (!(flags & XEMBED_MAPPED) && i->tags) { ++ i->tags = 0; ++ code = XEMBED_WINDOW_DEACTIVATE; ++ XUnmapWindow(dpy, i->win); ++ setclientstate(i, WithdrawnState); ++ } ++ else ++ return; ++ sendevent(i->win, xatom[Xembed], StructureNotifyMask, CurrentTime, code, 0, ++ systray->win, XEMBED_EMBEDDED_VERSION); ++} ++ ++void ++updatesystray(void) { ++ XSetWindowAttributes wa; ++ XWindowChanges wc; ++ Client *i; ++ Monitor *m = systraytomon(NULL); ++ unsigned int x = m->mx + m->mw; ++ unsigned int w = 1; ++ ++ if (!showsystray) ++ return; ++ if (!systray) { ++ /* init systray */ ++ if (!(systray = (Systray *)calloc(1, sizeof(Systray)))) ++ die("fatal: could not malloc() %u bytes\n", sizeof(Systray)); ++ systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel][ColBg].pixel); ++ wa.event_mask = ButtonPressMask | ExposureMask; ++ wa.override_redirect = True; ++ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XSelectInput(dpy, systray->win, SubstructureNotifyMask); ++ XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32, ++ PropModeReplace, (unsigned char *)&systrayorientation, 1); ++ XChangeWindowAttributes(dpy, systray->win, CWEventMask|CWOverrideRedirect|CWBackPixel, &wa); ++ XMapRaised(dpy, systray->win); ++ XSetSelectionOwner(dpy, netatom[NetSystemTray], systray->win, CurrentTime); ++ if (XGetSelectionOwner(dpy, netatom[NetSystemTray]) == systray->win) { ++ sendevent(root, xatom[Manager], StructureNotifyMask, CurrentTime, netatom[NetSystemTray], systray->win, 0, 0); ++ XSync(dpy, False); ++ } ++ else { ++ fprintf(stderr, "dwm: unable to obtain system tray.\n"); ++ free(systray); ++ systray = NULL; ++ return; ++ } ++ } ++ for (w = 0, i = systray->icons; i; i = i->next) { ++ /* make sure the background color stays the same */ ++ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; ++ XChangeWindowAttributes(dpy, i->win, CWBackPixel, &wa); ++ XMapRaised(dpy, i->win); ++ w += systrayspacing; ++ i->x = w; ++ XMoveResizeWindow(dpy, i->win, i->x, 0, i->w, i->h); ++ w += i->w; ++ if (i->mon != m) ++ i->mon = m; ++ } ++ w = w ? w + systrayspacing : 1; ++ x -= w; ++ XMoveResizeWindow(dpy, systray->win, x, m->by, w, bh); ++ wc.x = x; wc.y = m->by; wc.width = w; wc.height = bh; ++ wc.stack_mode = Above; wc.sibling = m->barwin; ++ XConfigureWindow(dpy, systray->win, CWX|CWY|CWWidth|CWHeight|CWSibling|CWStackMode, &wc); ++ XMapWindow(dpy, systray->win); ++ XMapSubwindows(dpy, systray->win); ++ /* redraw background */ ++ XSetForeground(dpy, drw->gc, scheme[SchemeNorm][ColBg].pixel); ++ XFillRectangle(dpy, systray->win, drw->gc, 0, 0, w, bh); ++ XSync(dpy, False); ++} ++ ++void + updatewindowtype(Client *c) + { + Atom state = getatomprop(c, netatom[NetWMState]); +@@ -2069,6 +2397,16 @@ wintomon(Window w) + return selmon; + } + ++Client * ++wintosystrayicon(Window w) { ++ Client *i = NULL; ++ ++ if (!showsystray || !w) ++ return i; ++ for (i = systray->icons; i && i->win != w; i = i->next); ++ return i; ++} ++ + /* There's no way to check accesses to destroyed windows, thus those cases are + * ignored (especially on UnmapNotify's). Other types of errors call Xlibs + * default error handler, which may call exit. */ diff --git a/dwm.suckless.org/patches/dwm-tagall-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-tagall-20160731-56a31dc.diff @@ -0,0 +1,33 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/historical/tagall +Shortcut to move all (floating) windows from one tag to another. + +Index: dwm/tagall.c +=================================================================== +--- /dev/null ++++ dwm/tagall.c +@@ -0,0 +1,24 @@ ++void ++tagall(const Arg *arg) { ++ if (!selmon->clients) ++ return; ++ /* if parameter starts with F, just move floating windows */ ++ int floating_only = (char *)arg->v && ((char *)arg->v)[0] == 'F' ? 1 : 0; ++ int tag = (char *)arg->v ? atoi(((char *)arg->v) + floating_only) : 0; ++ int j; ++ Client* c; ++ if(tag >= 0 && tag < LENGTH(tags)) ++ for(c = selmon->clients; c; c = c->next) ++ { ++ if(!floating_only || c->isfloating) ++ for(j = 0; j < LENGTH(tags); j++) ++ { ++ if(c->tags & 1 << j && selmon->tagset[selmon->seltags] & 1 << j) ++ { ++ c->tags = c->tags ^ (1 << j & TAGMASK); ++ c->tags = c->tags | 1 << (tag-1); ++ } ++ } ++ } ++ arrange(selmon); ++} diff --git a/dwm.suckless.org/patches/dwm-6.0-tagall.diff b/dwm.suckless.org/patches/dwm-tagall-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-tagall.diff b/dwm.suckless.org/patches/dwm-tagall-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-6.0-tilegap.diff b/dwm.suckless.org/patches/dwm-tilegap-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-5.9-uselessgap.diff b/dwm.suckless.org/patches/dwm-uselessgap-5.9.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-uselessgap.diff b/dwm.suckless.org/patches/dwm-uselessgap-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-5.9-warp.diff b/dwm.suckless.org/patches/dwm-warp-5.9.diff diff --git a/dwm.suckless.org/patches/dwm-6.1-warp.diff b/dwm.suckless.org/patches/dwm-warp-6.1.diff diff --git a/dwm.suckless.org/patches/dwm-warp-git-20160626-7af4d43.diff b/dwm.suckless.org/patches/dwm-warp-git-20160626-7af4d43.diff @@ -0,0 +1,58 @@ +diff --git a/dwm.c b/dwm.c +index b2bc9bd..0329e1f 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -228,6 +228,7 @@ static void updatewindowtype(Client *c); + static void updatetitle(Client *c); + static void updatewmhints(Client *c); + static void view(const Arg *arg); ++static void warp(const Client *c); + static Client *wintoclient(Window w); + static Monitor *wintomon(Window w); + static int xerror(Display *dpy, XErrorEvent *ee); +@@ -842,6 +843,7 @@ focusmon(const Arg *arg) + in gedit and anjuta */ + selmon = m; + focus(NULL); ++ warp(selmon->sel); + } + + void +@@ -1387,6 +1389,8 @@ restack(Monitor *m) + } + XSync(dpy, False); + while (XCheckMaskEvent(dpy, EnterWindowMask, &ev)); ++ if (m == selmon && (m->tagset[m->seltags] & m->sel->tags) && selmon->lt[selmon->sellt] != &layouts[2]) ++ warp(m->sel); + } + + void +@@ -2039,6 +2043,28 @@ view(const Arg *arg) + arrange(selmon); + } + ++void ++warp(const Client *c) ++{ ++ int x, y; ++ ++ if (!c) { ++ XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww/2, selmon->wy + selmon->wh/2); ++ return; ++ } ++ ++ if (!getrootptr(&x, &y) || ++ (x > c->x - c->bw && ++ y > c->y - c->bw && ++ x < c->x + c->w + c->bw*2 && ++ y < c->y + c->h + c->bw*2) || ++ (y > c->mon->by && y < c->mon->by + bh) || ++ (c->mon->topbar && !y)) ++ return; ++ ++ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); ++} ++ + Client * + wintoclient(Window w) + { diff --git a/dwm.suckless.org/patches/dwm-zoomswap-20160731-56a31dc.diff b/dwm.suckless.org/patches/dwm-zoomswap-20160731-56a31dc.diff @@ -0,0 +1,86 @@ +Author: Jan Christoph Ebersbach <jceb@e-jc.de> +URL: http://dwm.suckless.org/patches/zoomswap +This patch swaps the current window with the previous master when zooming. + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -236,6 +236,7 @@ static int xerrorstart(Display *dpy, XEr + static void zoom(const Arg *arg); + + /* variables */ ++static Client *prevzoom = NULL; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -2109,14 +2110,38 @@ void + zoom(const Arg *arg) + { + Client *c = selmon->sel; ++ Client *at = NULL, *cold, *cprevious = NULL; + + if (!selmon->lt[selmon->sellt]->arrange + || (selmon->sel && selmon->sel->isfloating)) + return; +- if (c == nexttiled(selmon->clients)) +- if (!c || !(c = nexttiled(c->next))) +- return; +- pop(c); ++ if (c == nexttiled(selmon->clients)) { ++ at = findbefore(prevzoom); ++ if (at) ++ cprevious = nexttiled(at->next); ++ if (!cprevious || cprevious != prevzoom) { ++ prevzoom = NULL; ++ if(!c || !(c = nexttiled(c->next))) ++ return; ++ } else ++ c = cprevious; ++ } ++ cold = nexttiled(selmon->clients); ++ if (c != cold && !at) ++ at = findbefore(c); ++ detach(c); ++ attach(c); ++ /* swap windows instead of pushing the previous one down */ ++ if (c != cold && at) { ++ prevzoom = cold; ++ if(cold && at != cold) { ++ detach(cold); ++ cold->next = at->next; ++ at->next = cold; ++ } ++ } ++ focus(c); ++ arrange(c->mon); + } + + int +Index: dwm/zoomswap.c +=================================================================== +--- /dev/null ++++ dwm/zoomswap.c +@@ -0,0 +1,10 @@ ++static Client * findbefore(Client *c); ++ ++Client * ++findbefore(Client *c) { ++ Client *tmp; ++ if(c == selmon->clients) ++ return NULL; ++ for(tmp = selmon->clients; tmp && tmp->next != c; tmp = tmp->next) ; ++ return tmp; ++} +Index: dwm/config.def.h +=================================================================== +--- dwm/config.def.h.orig ++++ dwm/config.def.h +@@ -59,6 +59,7 @@ static char dmenumon[2] = "0"; /* compon + static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; + static const char *termcmd[] = { "st", NULL }; + ++#include "zoomswap.c" + static Key keys[] = { + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, diff --git a/dwm.suckless.org/patches/dwm-6.0-zoomswap.diff b/dwm.suckless.org/patches/dwm-zoomswap-6.0.diff diff --git a/dwm.suckless.org/patches/dwmfifo.md b/dwm.suckless.org/patches/dwmfifo.md @@ -30,7 +30,7 @@ that you may want to execute (like tabbed-surf or similar). Download -------- - * [dwm-6.1-dwmfifo.diff](dwm-6.1-dwmfifo.diff) (6.9k) (29.01.2014) + * [dwm-dwmfifo-6.1.diff](dwm-dwmfifo-6.1.diff) (6.9k) (29.01.2014) Author ------ diff --git a/dwm.suckless.org/patches/emptyview.md b/dwm.suckless.org/patches/emptyview.md @@ -10,7 +10,7 @@ With this patch, dwm will start with no tag selected. When you start a client wi Download -------- - * [dwm-6.0-emptyview.diff](dwm-6.0-emptyview.diff) (1753b) (20130330) + * [dwm-emptyview-6.0.diff](dwm-emptyview-6.0.diff) (1753b) (20130330) Authors ------- diff --git a/dwm.suckless.org/patches/exresize.md b/dwm.suckless.org/patches/exresize.md @@ -15,8 +15,10 @@ description. Download -------- - - * [dwm-r1606-exresize.diff](dwm-r1606-exresize.diff) (20121117) + +<!-- This patch used to say (20121117), but it doesn't build against commits + from that date. Author emailed. --> + * [dwm-r1606-exresize.diff](dwm-r1606-exresize.diff) (Old patch, unknown version) Authors ------- diff --git a/dwm.suckless.org/patches/fancybar.md b/dwm.suckless.org/patches/fancybar.md @@ -12,13 +12,14 @@ fit, they're cropped. The title of the selected window is inverted. ## Download - * [fancybar-5.6.1.diff](historical/fancybar-5.6.1.diff) (dwm 5.6.1) (20090824) - * [dwm-6.1-fancybar.diff](dwm-6.1-fancybar.diff) (20151109) + * [dwm-fancybar-5.6.1.diff](historical/dwm-fancybar-5.6.1.diff) + * [dwm-fancybar-6.1.diff](dwm-fancybar-6.1.diff) + * [dwm-fancybar-git-20160725-7af4d43.diff](dwm-fancybar-git-20160725-7af4d43.diff) ## Author * Mate Nagy - <mnagy@port70.net> - * Jochen Sprickerhof - project @ firstname . lastname . de + * [Jochen Sprickerhof](mailto:project@firstname.lastname.de) (rewrite) This patch was inspired by the decorated tabbed layout of Xmonad. diff --git a/dwm.suckless.org/patches/fancybarclickable.md b/dwm.suckless.org/patches/fancybarclickable.md @@ -12,7 +12,7 @@ selecting their title in the dwm bar. Download -------- -* [dwm-6.1-fancybarclickable.diff](dwm-6.1-fancybarclickable.diff) +* [dwm-6.1-fancybarclickable.diff](dwm-6.1-fancybarclickable.diff) (Unclean patch) Authors ------- diff --git a/dwm.suckless.org/patches/fibonacci.md b/dwm.suckless.org/patches/fibonacci.md @@ -36,7 +36,7 @@ arrangement can be seen below. ## Download - * [dwm-5.8.2-fibonacci.diff](dwm-5.8.2-fibonacci.diff) + * [dwm-fibonacci-5.8.2.diff](dwm-fibonacci-5.8.2.diff) ## Maintainer diff --git a/dwm.suckless.org/patches/flextile.md b/dwm.suckless.org/patches/flextile.md @@ -57,10 +57,16 @@ The original `tile` layout is only available by setting the above parameters, bu ## Download ## - * [flextile-5.8.2.diff][5.8.2] (13k, +164 SLOC) (20100611, joten (at) freenet (dot) de) updated by Pascal Wittmann `<mail at pascal-wittmann dot de>` - * [flextile-5.8.1.diff][5.8.1] (14k) (20100531, joten (at) freenet (dot) de) + * [dwm-flextile-5.8.2.diff][5.8.2] + * [dwm-flextile-5.8.1.diff][5.8.1] -[5.8.2]: flextile-5.8.2.diff -[5.8.1]: historical/flextile-5.8.1.diff +[5.8.2]: dwm-flextile-5.8.2.diff +[5.8.1]: historical/dwm-flextile-5.8.1.diff + +## Authors ## + +joten (at) freenet (dot) de + +mail at pascal-wittmann dot de diff --git a/dwm.suckless.org/patches/float_border_color.md b/dwm.suckless.org/patches/float_border_color.md @@ -7,9 +7,10 @@ This patch allows you to specify a different border color for floating windows. Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.1-float_border_color2.diff](dwm-6.1-float_border_color2.diff) (3594b) (20140209) - * [dwm-10e232f9ace7-float_border_color2.diff](dwm-10e232f9ace7-float_border_color2.diff) (3432b) (20120406) - * [dwm-6.0-float_border_color2.diff](dwm-6.0-float_border_color2.diff) (3356b) (20120406) +<!-- Author emailed about this patch not applying cleanly --> + * [dwm-float_border_color2-20160731-56a31dc.diff](dwm-float_border_color2-20160731-56a31dc.diff) + * [dwm-float_border_color-6.1.diff](dwm-float_border_color-6.1.diff) (Unclean patch) + * [dwm-float_border_color-6.0.diff](dwm-float_border_color-6.0.diff) ## Author ## * Message-ID: <20070626093131.GA5005@shota.mine.nu> diff --git a/dwm.suckless.org/patches/focusadjacenttag.md b/dwm.suckless.org/patches/focusadjacenttag.md @@ -21,8 +21,9 @@ Default key bindings Download -------- - * [dwm-6.0-focusadjacenttag.diff](dwm-6.0-focusadjacenttag.diff) (3740b) (20140624) +<!-- Author emailed about this issue already --> + * [dwm-6.0-focusadjacenttag.diff](dwm-6.0-focusadjacenttag.diff) (Unclean patch) Authors ------- - * Fabio Banfi - `<fbanfi90 at gmail dot com>`- \ No newline at end of file + * Fabio Banfi - `<fbanfi90 at gmail dot com>` diff --git a/dwm.suckless.org/patches/focusonclick.md b/dwm.suckless.org/patches/focusonclick.md @@ -6,9 +6,8 @@ ## Download - * [dwm-6.0-focusonclick.diff](dwm-6.0-focusonclick.diff) (2012-11-24) + * [dwm-focusonclick-6.0.diff](dwm-focusonclick-6.0.diff) (2012-11-24) * [dwm-git-20100321-focusonclick.diff](historical/dwm-git-20100321-focusonclick.diff) - * [dwm-5.8.2-focusonclick.diff](historical/dwm-5.8.2-focusonclick.diff) (dwm 2010604) ## Author diff --git a/dwm.suckless.org/patches/gapless_grid.md b/dwm.suckless.org/patches/gapless_grid.md @@ -26,7 +26,8 @@ Download `gaplessgrid.c` and add the gapless layout to your `config.h`: ## Download -* [dwm-6.1-gaplessgrid.diff](dwm-6.1-gaplessgrid.diff) (1180b) (20140209) +* [dwm-gaplessgrid-20160731-56a31dc.diff](dwm-gaplessgrid-20160731-56a31dc.diff) +* [dwm-gaplessgrid-6.1.diff](dwm-gaplessgrid-6.1.diff) (1180b) (20140209) * [gaplessgrid.c](gaplessgrid.c) (dwm 5.6.1) (20090908) * [dwm-r1437-gaplessgrid.diff](historical/dwm-r1437-gaplessgrid.diff) (1.9k) (20090704) * [dwm-5.2-gaplessgrid.diff](historical/dwm-5.2-gaplessgrid.diff) (1.9k) (20081020) diff --git a/dwm.suckless.org/patches/gaps.md b/dwm.suckless.org/patches/gaps.md @@ -17,7 +17,7 @@ There is a variation of the patch for the [xtile](xtile) layout also. Download -------- -* For vanilla tile: [dwm-6.0-gaps.diff](dwm-6.0-gaps.diff) +* For vanilla tile: [dwm-gaps-6.0.diff](dwm-gaps-6.0.diff) * For xtile tile: [dwm-6.0-xtile-gaps.diff](dwm-6.0-xtile-gaps.diff) diff --git a/dwm.suckless.org/patches/gestures.md b/dwm.suckless.org/patches/gestures.md @@ -8,8 +8,9 @@ and adds a gestures array to config.h. A gesture can call any dwm function. I us Download -------- -* [dwm-5.8-gestures.diff](dwm-5.8-gestures.diff) +<!-- Author email bounced (removed it), patch needs fixed --> +* [dwm-5.8-gestures.diff](dwm-5.8-gestures.diff) (Unclean patch) Author ------ -* David Galos - <galosd83@students.rowan.edu> +* David Galos diff --git a/dwm.suckless.org/patches/gridmode.md b/dwm.suckless.org/patches/gridmode.md @@ -9,7 +9,7 @@ tools that operate on multiple windows at once; e.g. Cluster SSH. Download -------- -* [dwm-5.8.2-gridmode.diff](dwm-5.8.2-gridmode.diff) +* [dwm-gridmode-5.8.2.diff](dwm-gridmode-5.8.2.diff) * See older versions in [historical](historical/gridmode). Authors diff --git a/dwm.suckless.org/patches/hide_vacant_tags.md b/dwm.suckless.org/patches/hide_vacant_tags.md @@ -18,10 +18,12 @@ filled/empty rectangles. Download -------- -* [dwm-6.1-hide_vacant_tags.diff](dwm-6.1-hide_vacant_tags.diff) - 2016-01-22 +* [dwm-hide_vacant_tags-6.1.diff](dwm-hide_vacant_tags-6.1.diff) - 2016-01-22 +* [dwm-hide_vacant_tags-git-20160626-7af4d43.diff](dwm-hide_vacant_tags-git-20160626-7af4d43.diff) Author ------ * [Ondřej Grover](mailto:ondrej.grover@gmail.com) * Matthew Boswell - mordervomubel+suckless at lockmail dot us (mechanical update for dwm 6.1 release) +* [Jochen Sprickerhof](mailto:project@firstname.lastname.de) (hide 0 tagged clients) diff --git a/dwm.suckless.org/patches/ansistatuscolors.md b/dwm.suckless.org/patches/historical/ansistatuscolors.md diff --git a/dwm.suckless.org/patches/ansistatuscolors.png b/dwm.suckless.org/patches/historical/ansistatuscolors.png Binary files differ. diff --git a/dwm.suckless.org/patches/autoresize.diff b/dwm.suckless.org/patches/historical/autoresize.diff diff --git a/dwm.suckless.org/patches/historical/dwm-5.6.1-attachabove.diff b/dwm.suckless.org/patches/historical/dwm-5.6.1-attachabove.diff @@ -1,40 +0,0 @@ -diff -r e47a47bd3ed4 dwm.c ---- a/dwm.c Tue Jul 21 10:57:54 2009 +0100 -+++ b/dwm.c Mon Aug 17 15:03:36 2009 +0200 -@@ -153,6 +153,7 @@ - static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact); - static void arrange(void); - static void attach(Client *c); -+static void attachabove(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -394,6 +395,19 @@ - attach(Client *c) { - c->next = c->mon->clients; - c->mon->clients = c; -+} -+ -+void -+attachabove(Client *c) { -+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) { -+ attach(c); -+ return; -+ } -+ -+ Client *at; -+ for (at = c->mon->clients; at->next != c->mon->sel; at = at->next); -+ c->next = at->next; -+ at->next = c; - } - - void -@@ -1098,7 +1112,7 @@ - c->isfloating = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachabove(c); - attachstack(c); - XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ - XMapWindow(dpy, c->win); diff --git a/dwm.suckless.org/patches/historical/dwm-5.6.1-attachaside.diff b/dwm.suckless.org/patches/historical/dwm-5.6.1-attachaside.diff @@ -1,38 +0,0 @@ -diff -r 9f79d36bd5e0 dwm.c ---- a/dwm.c Tue Sep 08 13:33:58 2009 +0100 -+++ b/dwm.c Tue Sep 15 14:19:26 2009 +0200 -@@ -153,6 +153,7 @@ - static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact); - static void arrange(void); - static void attach(Client *c); -+static void attachaside(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -397,6 +398,17 @@ - } - - void -+attachaside(Client *c) { -+ Client *at = nexttiled(c->mon->clients);; -+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) { -+ attach(c); -+ return; -+ } -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -@@ -1105,7 +1117,7 @@ - c->isfloating = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachaside(c); - attachstack(c); - XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ - XMapWindow(dpy, c->win); diff --git a/dwm.suckless.org/patches/historical/dwm-5.7.2-attachaside.diff b/dwm.suckless.org/patches/historical/dwm-5.7.2-attachaside.diff @@ -1,38 +0,0 @@ -diff -r 9f79d36bd5e0 dwm.c ---- a/dwm.c Tue Sep 08 13:33:58 2009 +0100 -+++ b/dwm.c Tue Sep 15 14:19:26 2009 +0200 -@@ -153,6 +153,7 @@ - static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact); - static void arrange(void); - static void attach(Client *c); -+static void attachaside(Client *c); - static void attachstack(Client *c); - static void buttonpress(XEvent *e); - static void checkotherwm(void); -@@ -397,6 +398,17 @@ - } - - void -+attachaside(Client *c) { -+ Client *at = nexttiled(c->mon->clients);; -+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) { -+ attach(c); -+ return; -+ } -+ c->next = at->next; -+ at->next = c; -+} -+ -+void - attachstack(Client *c) { - c->snext = c->mon->stack; - c->mon->stack = c; -@@ -1105,7 +1117,7 @@ - c->isfloating = trans != None || c->isfixed; - if(c->isfloating) - XRaiseWindow(dpy, c->win); -- attach(c); -+ attachaside(c); - attachstack(c); - XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ - XMapWindow(dpy, c->win); diff --git a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff b/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff @@ -1,93 +0,0 @@ -diff -up dwm-5.8.2-original/config.def.h dwm-5.8.2/config.def.h ---- dwm-5.8.2-original/config.def.h 2010-06-04 06:39:15.000000000 -0400 -+++ dwm-5.8.2/config.def.h 2010-07-07 14:56:15.000000000 -0400 -@@ -31,6 +31,8 @@ static const Layout layouts[] = { - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ -diff -up dwm-5.8.2-original/dwm.c dwm-5.8.2/dwm.c ---- dwm-5.8.2-original/dwm.c 2010-06-04 06:39:15.000000000 -0400 -+++ dwm-5.8.2/dwm.c 2010-07-07 15:03:16.000000000 -0400 -@@ -158,6 +158,8 @@ static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); - static void attachstack(Client *c); -+static void bstack(Monitor *m); -+static void bstackhoriz(Monitor *m); - static void buttonpress(XEvent *e); - static void checkotherwm(void); - static void cleanup(void); -@@ -1657,6 +1659,67 @@ tile(Monitor *m) { - if(h < bh) - h = m->wh; - for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) -+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); -+ if(h != m->wh) -+ y = c->y + HEIGHT(c); -+ } -+} -+ -+static void -+bstack(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww / n; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ if(w < bh) -+ w = m->ww; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, /* remainder */ ((i + 1 == n) -+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False); -+ if(w != m->ww) -+ x = c->x + WIDTH(c); -+ } -+} -+ -+static void -+bstackhoriz(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ h /= n; -+ if(h < bh) -+ h = m->wh; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { - resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) - ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); - if(h != m->wh) - diff --git a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff b/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff @@ -1,82 +0,0 @@ -diff -NU5 -r dwm-5.8.2/bstack.c dwm-5.8.2-bstack/bstack.c ---- dwm-5.8.2/bstack.c 1970-01-01 01:00:00.000000000 +0100 -+++ dwm-5.8.2-bstack/bstack.c 2010-06-15 17:47:44.000000000 +0200 -@@ -0,0 +1,29 @@ -+static void -+bstack(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww / n; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ if(w < bh) -+ w = m->ww; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, /* remainder */ ((i + 1 == n) -+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False); -+ if(w != m->ww) -+ x = c->x + WIDTH(c); -+ } -+} -diff -NU5 -r dwm-5.8.2/bstackhoriz.c dwm-5.8.2-bstack/bstackhoriz.c ---- dwm-5.8.2/bstackhoriz.c 1970-01-01 01:00:00.000000000 +0100 -+++ dwm-5.8.2-bstack/bstackhoriz.c 2010-06-15 17:47:44.000000000 +0200 -@@ -0,0 +1,30 @@ -+static void -+bstackhoriz(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ h /= n; -+ if(h < bh) -+ h = m->wh; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) -+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); -+ if(h != m->wh) -+ y = c->y + HEIGHT(c); -+ } -+} -diff -NU5 -r dwm-5.8.2/config.def.h dwm-5.8.2-bstack/config.def.h ---- dwm-5.8.2/config.def.h 2010-06-04 12:39:15.000000000 +0200 -+++ dwm-5.8.2-bstack/config.def.h 2010-06-15 17:47:44.000000000 +0200 -@@ -29,1 +29,3 @@ -+#include "bstack.c" -+#include "bstackhoriz.c" - static const Layout layouts[] = { -@@ -34,5 +36,7 @@ -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ - #define MODKEY Mod1Mask - #define TAGKEYS(KEY,TAG) \ diff --git a/dwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff b/dwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff @@ -1,98 +0,0 @@ -diff -up dwm-5.8.2-original/config.def.h dwm-5.8.2/config.def.h ---- dwm-5.8.2-original/config.def.h 2010-06-04 06:39:15.000000000 -0400 -+++ dwm-5.8.2/config.def.h 2010-07-07 14:56:15.000000000 -0400 -@@ -31,6 +31,8 @@ static const Layout layouts[] = { - /* symbol arrange function */ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ - #define MODKEY Mod1Mask - #define TAGKEYS(KEY,TAG) \ - }; - -diff -up dwm-5.8.2-original/dwm.c dwm-5.8.2/dwm.c ---- dwm-5.8.2-original/dwm.c 2010-06-04 06:39:15.000000000 -0400 -+++ dwm-5.8.2/dwm.c 2010-07-07 15:03:16.000000000 -0400 -@@ -158,6 +158,8 @@ static void arrange(Monitor *m); - static void arrangemon(Monitor *m); - static void attach(Client *c); - static void attachstack(Client *c); -+static void bstack(Monitor *m); -+static void bstackhoriz(Monitor *m); - static void buttonpress(XEvent *e); - static void checkotherwm(void); - static void cleanup(void); -@@ -1657,6 +1659,67 @@ tile(Monitor *m) { - if(h < bh) - h = m->wh; - for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) -+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); -+ if(h != m->wh) -+ y = c->y + HEIGHT(c); -+ } -+} -+ -+static void -+bstack(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww / n; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ if(w < bh) -+ w = m->ww; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, /* remainder */ ((i + 1 == n) -+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False); -+ if(w != m->ww) -+ x = c->x + WIDTH(c); -+ } -+} -+ -+static void -+bstackhoriz(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ h /= n; -+ if(h < bh) -+ h = m->wh; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { - resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) - ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); - if(h != m->wh) - diff --git a/dwm.suckless.org/patches/historical/dwm-5.9-bstack.diff b/dwm.suckless.org/patches/historical/dwm-5.9-bstack.diff @@ -1,87 +0,0 @@ -diff -NU5 -r dwm-5.8.2/bstack.c dwm-5.8.2-bstack/bstack.c ---- dwm-5.8.2/bstack.c 1970-01-01 01:00:00.000000000 +0100 -+++ dwm-5.8.2-bstack/bstack.c 2010-06-15 17:47:44.000000000 +0200 -@@ -0,0 +1,29 @@ -+static void -+bstack(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww / n; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ if(w < bh) -+ w = m->ww; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, /* remainder */ ((i + 1 == n) -+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False); -+ if(w != m->ww) -+ x = c->x + WIDTH(c); -+ } -+} -diff -NU5 -r dwm-5.8.2/bstackhoriz.c dwm-5.8.2-bstack/bstackhoriz.c ---- dwm-5.8.2/bstackhoriz.c 1970-01-01 01:00:00.000000000 +0100 -+++ dwm-5.8.2-bstack/bstackhoriz.c 2010-06-15 17:47:44.000000000 +0200 -@@ -0,0 +1,30 @@ -+static void -+bstackhoriz(Monitor *m) { -+ int x, y, h, w, mh; -+ unsigned int i, n; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ /* master */ -+ c = nexttiled(m->clients); -+ mh = m->mfact * m->wh; -+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False); -+ if(--n == 0) -+ return; -+ /* tile stack */ -+ x = m->wx; -+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh; -+ w = m->ww; -+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh; -+ h /= n; -+ if(h < bh) -+ h = m->wh; -+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { -+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) -+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False); -+ if(h != m->wh) -+ y = c->y + HEIGHT(c); -+ } -+} - -diff -r 23b71491e149 config.def.h ---- a/config.def.h Thu Dec 02 10:16:47 2010 +0000 -+++ b/config.def.h Fri Jan 07 15:10:06 2011 +0100 -@@ -26,11 +26,15 @@ - static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ - static const Bool resizehints = True; /* True means respect size hints in tiled resizals */ - -+#include "bstack.c" -+#include "bstackhoriz.c" - static const Layout layouts[] = { - /* symbol arrange function */ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "TTT", bstack }, -+ { "===", bstackhoriz }, - }; - - /* key definitions */ diff --git a/dwm.suckless.org/patches/historical/dwm-cdec978-center.diff b/dwm.suckless.org/patches/historical/dwm-cdec978-center.diff @@ -1,58 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 875885b..2e3a9fb 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -21,9 +21,9 @@ static const Rule rules[] = { - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ -- /* class instance title tags mask isfloating monitor */ -- { "Gimp", NULL, NULL, 0, True, -1 }, -- { "Firefox", NULL, NULL, 1 << 8, False, -1 }, -+ /* class instance title tags mask iscentered isfloating monitor */ -+ { "Gimp", NULL, NULL, 0, False, True, -1 }, -+ { "Firefox", NULL, NULL, 1 << 8, False, False, -1 }, - }; - - /* layout(s) */ -diff --git a/dwm.c b/dwm.c -index 1bbb4b3..a8a3356 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -91,7 +91,7 @@ struct Client { - int basew, baseh, incw, inch, maxw, maxh, minw, minh; - int bw, oldbw; - unsigned int tags; -- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ Bool isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen; - Client *next; - Client *snext; - Monitor *mon; -@@ -136,6 +136,7 @@ typedef struct { - const char *instance; - const char *title; - unsigned int tags; -+ Bool iscentered; - Bool isfloating; - int monitor; - } Rule; -@@ -294,6 +295,7 @@ applyrules(Client *c) { - && (!r->class || strstr(class, r->class)) - && (!r->instance || strstr(instance, r->instance))) - { -+ c->iscentered = r->iscentered; - c->isfloating = r->isfloating; - c->tags |= r->tags; - for(m = mons; m && m->num != r->monitor; m = m->next); -@@ -1038,6 +1040,11 @@ manage(Window w, XWindowAttributes *wa) { - && (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my); - c->bw = borderpx; - -+ if(c->iscentered) { -+ c->x = (c->mon->mw - WIDTH(c)) / 2; -+ c->y = (c->mon->mh - HEIGHT(c)) / 2; -+ } -+ - wc.border_width = c->bw; - XConfigureWindow(dpy, w, CWBorderWidth, &wc); - XSetWindowBorder(dpy, w, scheme[SchemeNorm].border->rgb); diff --git a/dwm.suckless.org/patches/historical/fancybar-5.6.1.diff b/dwm.suckless.org/patches/historical/dwm-fancybar-5.6.1.diff diff --git a/dwm.suckless.org/patches/historical/flextile-5.8.1.diff b/dwm.suckless.org/patches/historical/dwm-flextile-5.8.1.diff diff --git a/dwm.suckless.org/patches/movestack-5.8.2.diff b/dwm.suckless.org/patches/historical/dwm-movestack-5.8.2.diff diff --git a/dwm.suckless.org/patches/historical/dwm-pertag-5.1.diff b/dwm.suckless.org/patches/historical/dwm-pertag-5.1.diff @@ -0,0 +1,125 @@ +diff -NrU3 dwm-5.1/dwm.c dwm-5.1.playground-pertag/dwm.c +--- dwm-5.1/dwm.c 2008-07-29 20:18:32.000000000 +0200 ++++ dwm-5.1-pertag/dwm.c 2008-08-01 18:46:49.000000000 +0200 +@@ -238,6 +238,11 @@ + /* configuration, allows nested code to access above variables */ + #include "config.h" + ++static int curtag = 1, prevtag = 1; ++static Layout *lts[LENGTH(tags) + 1]; ++static double mfacts[LENGTH(tags) + 1]; ++static Bool showbars[LENGTH(tags) + 1]; ++ + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1 : 1]; }; + +@@ -1307,7 +1312,7 @@ + if(!arg || !arg->v || arg->v != lt[sellt]) + sellt ^= 1; + if(arg && arg->v) +- lt[sellt] = (Layout *)arg->v; ++ lt[sellt] = lts[curtag] = (Layout *)arg->v; + if(sel) + arrange(); + else +@@ -1324,7 +1329,7 @@ + f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0; + if(f < 0.1 || f > 0.9) + return; +- mfact = f; ++ mfact = mfacts[curtag] = f; + arrange(); + } + +@@ -1373,12 +1378,27 @@ + if(!dc.font.set) + XSetFont(dpy, dc.gc, dc.font.xfont->fid); + ++ /* init mfacts */ ++ for(i=0; i < LENGTH(tags) + 1 ; i++) { ++ mfacts[i] = mfact; ++ } ++ ++ /* init layouts */ ++ for(i=0; i < LENGTH(tags) + 1; i++) { ++ lts[i] = &layouts[0]; ++ } ++ ++ + /* init bar */ + for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { + w = TEXTW(layouts[i].symbol); + blw = MAX(blw, w); + } + ++ for(i=0; i < LENGTH(tags) + 1; i++) { ++ showbars[i] = showbar; ++ } ++ + wa.override_redirect = 1; + wa.background_pixmap = ParentRelative; + wa.event_mask = ButtonPressMask|ExposureMask; +@@ -1479,7 +1499,7 @@ + + void + togglebar(const Arg *arg) { +- showbar = !showbar; ++ showbar = showbars[curtag] = !showbar; + updategeom(); + updatebar(); + arrange(); +@@ -1508,9 +1528,23 @@ + void + toggleview(const Arg *arg) { + unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK); ++ unsigned int i; + + if(mask) { ++ if(mask == ~0) { ++ prevtag = curtag; ++ curtag = 0; ++ } ++ if(!(mask & 1 << (curtag - 1))) { ++ prevtag = curtag; ++ for (i=0; !(mask & 1 << i); i++); ++ curtag = i + 1; ++ } + tagset[seltags] = mask; ++ lt[sellt] = lts[curtag]; ++ mfact = mfacts[curtag]; ++ if (showbar != showbars[curtag]) ++ togglebar(NULL); + clearurgent(); + arrange(); + } +@@ -1663,11 +1697,29 @@ + + void + view(const Arg *arg) { ++ unsigned int i; ++ + if(arg && (arg->i & TAGMASK) == tagset[seltags]) + return; + seltags ^= 1; /* toggle sel tagset */ +- if(arg && (arg->ui & TAGMASK)) ++ if(arg && (arg->ui & TAGMASK)) { + tagset[seltags] = arg->i & TAGMASK; ++ prevtag = curtag; ++ if(arg->ui == ~0) ++ curtag = 0; ++ else { ++ for (i=0; !(arg->ui & 1 << i); i++); ++ curtag = i + 1; ++ } ++ } else { ++ prevtag= curtag ^ prevtag; ++ curtag^= prevtag; ++ prevtag= curtag ^ prevtag; ++ } ++ lt[sellt]= lts[curtag]; ++ mfact = mfacts[curtag]; ++ if(showbar != showbars[curtag]) ++ togglebar(NULL); + clearurgent(); + arrange(); + } diff --git a/dwm.suckless.org/patches/historical/dwm-5.2-pertag.diff b/dwm.suckless.org/patches/historical/dwm-pertag-5.2.diff diff --git a/dwm.suckless.org/patches/historical/dwm-5.4-pertag.diff b/dwm.suckless.org/patches/historical/dwm-pertag-5.4.diff diff --git a/dwm.suckless.org/patches/historical/dwm-5.7.2-pertag.diff b/dwm.suckless.org/patches/historical/dwm-pertag-5.7.2.diff diff --git a/dwm.suckless.org/patches/historical/dwm-5.8.2-pertag.diff b/dwm.suckless.org/patches/historical/dwm-pertag-5.8.2.diff diff --git a/dwm.suckless.org/patches/multimon-1-added-monitor-marker-to-bar.diff b/dwm.suckless.org/patches/historical/multimon-1-added-monitor-marker-to-bar.diff diff --git a/dwm.suckless.org/patches/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff b/dwm.suckless.org/patches/historical/multimon-2-added-n-view-wrappers-for-unified-multi-monitor.diff diff --git a/dwm.suckless.org/patches/multimon-3-added-reset_view-function.diff b/dwm.suckless.org/patches/historical/multimon-3-added-reset_view-function.diff diff --git a/dwm.suckless.org/patches/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff b/dwm.suckless.org/patches/historical/multimon-4-added-statusall-toggle-replacing-need-for-patch.diff diff --git a/dwm.suckless.org/patches/multimon.md b/dwm.suckless.org/patches/historical/multimon.md diff --git a/dwm.suckless.org/patches/horizgrid.md b/dwm.suckless.org/patches/horizgrid.md @@ -29,7 +29,7 @@ Horizontal Grid Layout Download -------- - * [dwm-6.1-horizgrid.diff](dwm-6.1-horizgrid.diff) (20160108) + * [dwm-horizgrid-6.1.diff](dwm-horizgrid-6.1.diff) (20160108) Authors ------- diff --git a/dwm.suckless.org/patches/index.md b/dwm.suckless.org/patches/index.md @@ -1,62 +1,5 @@ -Patches +patches ======= -There are two types of patches: The ones that fit to your personal taste and -the ones you think should be included in mainline dwm. - -For patches that should be included in mainline dwm see the -[community](//suckless.org/community) page and the hackers@ mailing list. - - -You can use the following instructions to generate and apply patches posted on -this wiki. On how to upload patches which fit your personal taste and you want -to show the community, see the [wiki](//suckless.org/wiki) page on how to edit -the pages you see here. - -diff generation ---------------- -For git users: - - cd dwm-directory - git diff > dwm-X.Y-yourpatchname.diff - -For tarballs: - - cd modified-dwm-directory/.. - diff -up original-dwm-directory modified-dwm-directory > dwm-X.Y-yourpatchname.diff - -where `X.Y` is a dwm tag name or version number. - -patch application ------------------ -For git users, use `-3` to fix the conflict easily: - - cd dwm-directory - git apply path/to/patch.diff - -For tarballs: - - cd dwm-directory - patch -p1 < path/to/patch.diff - - -related projects ----------------- -* [awesome](http://awesome.naquadah.org/) -- dwm fork with XCB, EWMH, Lua script, Xft, D-Bus, multihead.. support -* [awm](http://www.freaknet.org/alpt/src/alpt-wm/readme) -- (old) modified dwm with workspaces and /proc like interface -* [bwm](http://lists.suckless.org/dwm/0708/3085.html) -- (old) modified dwm with extensive mouse support -* [cons-wm](http://github.com/dharmatech/psilab/tree/master/cons-wm) -- minimalist wm in scheme (not tiled) -* [bug.n](https://github.com/fuhsjr00/bug.n) -- dwm for Windows written in AutoHotkey -* [dvtm](http://www.brain-dump.org/projects/dvtm/) -- virtual terminal manager (dwm on the console) -* [dwm-gtx](http://s01.de/~gottox/index.cgi/proj_dwm) -- dwm branch with Xinerama support, pointer movement, different layout -* [dwm-sprinkles](http://0mark.unserver.de/dwm-sprinkles/) -- dwm with colorfull bar, transparency, pre-configured pertag and more -* [dwm-win32](http://www.brain-dump.org/projects/dwm-win32/) -- dwm ported to windows -* [echinus](http://www.rootshell.be/~polachok/code/) -- dwm fork with EWMH, Xft support -* [gemini](http://gemini.digitalmediaplanet.net) -- terminal manager -* [i3](http://i3.zekjur.net/) -- wmii fork with XCB, multihead, vertical column, command mode -* [musca](http://aerosuidae.net/musca.html) -- inspired by dwm, more complex layout, configurable with commands, EWMH support -* [qtile](http://www.qtile.org/) -- pure python wm, used ideas from dwm -* [scrotwm](http://www.peereboom.us/scrotwm/html/scrotwm.html) -- dwm clone with multihead, config file, restart.. support -* [TAL/wm](http://talwm.sourceforge.net/) -- minimal tiled wm based on dwm (discontinued) -* [teslawm](http://teslawm.org/) -- dwm fork with multihead, mouse, stdin commands support (was dwm-rfigura) -* [xmonad](http://www.xmonad.org/) -- dwm clone in haskell +For instructions on how to submit and format patches, take a look at +the [hacking guidelines](http://suckless.org/hacking). diff --git a/dwm.suckless.org/patches/ispermanent.md b/dwm.suckless.org/patches/ispermanent.md @@ -10,7 +10,7 @@ windows. Download -------- -* [dwm-6.1-ispermanent.diff](dwm-6.1-ispermanent.diff) (1.8k) (20150803) +* [dwm-6.0-ispermanent.diff](dwm-6.0-ispermanent.diff) Author ------ diff --git a/dwm.suckless.org/patches/keycode.md b/dwm.suckless.org/patches/keycode.md @@ -6,8 +6,8 @@ using for exemple xev). Download -------- -* [dwm-6.0-keycode.diff](dwm-6.0-keycode.diff) -* [dwm-20151110-5ed9c48-keycode.patch](dwm-20151110-5ed9c48-keycode.patch) +* [dwm-keycode-6.1.diff](dwm-keycode-6.1.diff) +* [dwm-keycode-20160702-56a31dc.diff](dwm-keycode-20160702-56a31dc.diff) Author ------ diff --git a/dwm.suckless.org/patches/keypressrelease.md b/dwm.suckless.org/patches/keypressrelease.md @@ -24,8 +24,8 @@ Or to only display the bar while the toggle key is held down (requires that it i Download --- - * [dwm-6.0-keypressrelease.diff](dwm-6.0-keypressrelease.diff) - * [dwm-6.0-keypressrelease.diff on GitHub](https://github.com/Ceryn/patches/blob/master/dwm/dwm-6.0-keypressrelease.diff) + * [dwm-keypressrelease-6.0.diff](dwm-keypressrelease-6.0.diff) + * [dwm-keypressrelease-6.0.diff on GitHub](https://github.com/Ceryn/patches/blob/master/dwm/dwm-keypressrelease-6.0.diff) Author ------ diff --git a/dwm.suckless.org/patches/mark.md b/dwm.suckless.org/patches/mark.md @@ -36,7 +36,7 @@ jump to mark and clear the mark ## Download ## this patch has been revised, it's recommended to use dwm-6.1-mark-new.diff -old behaviours of the patch(dwm-6.1-mark.diff): +old behaviours of the patch(dwm-mark-6.1.diff): 1. crashes when using mark features while the marked client has been killed. 2. swapclient clears the mark. @@ -44,8 +44,8 @@ old behaviours of the patch(dwm-6.1-mark.diff): 4. swapfocus does not activate tags for the marked client 5. swapfocus does not focus monitors correctly -* [dwm-6.1-mark-new.diff](dwm-6.1-mark-new.diff) (5815b) (20160309) -* [dwm-6.1-mark.diff](dwm-6.1-mark.diff) (7161b) (20160220) +* [dwm-mark-new-6.1.diff](dwm-mark-new-6.1.diff) +* [dwm-mark-6.1.diff](dwm-mark-6.1.diff) ## Author ## -* phi <crispyforg@163.com> +* phi <crispyfrog@163.com> diff --git a/dwm.suckless.org/patches/maximize.md b/dwm.suckless.org/patches/maximize.md @@ -18,8 +18,9 @@ Insert the bindings into the keys list. Here is an example: Download -------- -* [dwm-6.1-maximize_vert_horz.diff](dwm-6.1-maximize_vert_horz.diff) (2532b) (20140209) -* [dwm-6.0-maximize_vert_horz.diff](dwm-6.0-maximize_vert_horz.diff) (2013b) (20120406) +* [dwm-maximize_vert_horz-20160731-56a31dc.diff](dwm-maximize_vert_horz-20160731-56a31dc.diff) +* [dwm-maximize_vert_horz-6.1.diff](dwm-maximize_vert_horz-6.1.diff) (Unclean patch) +* [dwm-maximize_vert_horz-6.0.diff](dwm-maximize_vert_horz-6.0.diff) Author ------ diff --git a/dwm.suckless.org/patches/monarg.md b/dwm.suckless.org/patches/monarg.md @@ -1,18 +0,0 @@ -Monitor by Argument for dmenu -============================= - -Description ------------ - -Since dmenu was made to accept additional command line argument with -[dmenu-4.5-monarg.diff](http://tools.suckless.org/dmenu/patches/monarg) to -specify the monitor where dmenu is to be started. Works well with my monarg -patch for dwm. - -Download --------- -* [dwm-6.1-monarg.diff](dwm-6.1-monarg.diff) - -Author ------- -* mar77i <mysatyre at gmail dot com> diff --git a/dwm.suckless.org/patches/monocle_count.md b/dwm.suckless.org/patches/monocle_count.md @@ -9,7 +9,7 @@ current release prints only the number of total clients within the symbol. Download -------- -* [dwm-5.8.2-monocle_count.diff](dwm-5.8.2-monocle_count.diff) +* [dwm-monocle_count-5.8.2.diff](dwm-monocle_count-5.8.2.diff) Author ------ diff --git a/dwm.suckless.org/patches/moveresize.md b/dwm.suckless.org/patches/moveresize.md @@ -61,11 +61,10 @@ Download Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.1-moveresize.diff](dwm-6.1-moveresize.diff) (2095b) (20140209) + * [dwm-moveresize-20160731-56a31dc.diff](dwm-moveresize-20160731-56a31dc.diff) + * [dwm-moveresize-6.1.diff](dwm-moveresize-6.1.diff) (2095b) (20140209) * [dwm-10e232f9ace7-moveresize.diff](dwm-10e232f9ace7-moveresize.diff) (2025b) (20120406) - * [dwm-10e232f9ace7-maximize_vert_horz.diff](dwm-10e232f9ace7-maximize_vert_horz.diff) (2385b) (20120406) - * [dwm-6.0-moveresize.diff](dwm-6.0-moveresize.diff) (2025b) (20120406) - * [dwm-6.0-maximize_vert_horz.diff](dwm-6.0-maximize_vert_horz.diff) (2385b) (20120406) + * [dwm-moveresize-6.0.diff](dwm-moveresize-6.0.diff) (2025b) (20120406) Authors ------- diff --git a/dwm.suckless.org/patches/movestack.md b/dwm.suckless.org/patches/movestack.md @@ -23,8 +23,8 @@ movestack(-1) will swap the client with the current focus with the previous clie ## Download - * [dwm-5.8.2-movestack.diff](movestack-5.8.2.diff) (2.6k) (20101102) - * [dwm-5.6.1-movestack.diff][1] (2.4k) (20090911) + * [dwm-movestack-6.1.diff](dwm-movestack-6.1.diff) + * [dwm-movestack-5.8.2.diff](historical/dwm-movestack-5.8.2.diff) ## Author @@ -37,5 +37,3 @@ movestack(-1) will swap the client with the current focus with the previous clie ## Note This patch seems to be equivalent to the [push](push) patch. - -[1]: http://www.aplusbi.com/projects/dwm/dwm-5.6.1-movestack.diff diff --git a/dwm.suckless.org/patches/nametag.md b/dwm.suckless.org/patches/nametag.md @@ -11,9 +11,9 @@ The `prepend` version prepends the tag name with a short string which is used as Download -------- -* [dwm-6.1-nametag.diff](dwm-6.1-nametag.diff) (2.3k) (20131002) -* [dwm-6.1-nametag-prepend.diff](dwm-6.1-nametag-prepend.diff) (2525b) (20140607) -* [dwm-5.7.2-nametag.diff](dwm-5.7.2-nametag.diff) (2.5k) (20091029) +* [dwm-nametag-6.1.diff](dwm-nametag-6.1.diff) +* [dwm-nametag-prepend-6.1.diff](dwm-nametag-prepend-6.1.diff) +* [dwm-nametag-5.7.2.diff](dwm-nametag-5.7.2.diff) Author ------ diff --git a/dwm.suckless.org/patches/noborder.md b/dwm.suckless.org/patches/noborder.md @@ -3,20 +3,17 @@ noborder Description ----------- -This patch removes the border when there is just one window visible in tiled or monocle layout. -For an alternative that works with most layouts without any layout-specific -changes, check out [better borders](http://dwm.suckless.org/patches/better-borders). +Remove the border when there is only one window visible. Download -------- -Patches against different versions of dwm are available at -[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.1-single_window_no_border.diff](dwm-6.1-single_window_no_border.diff) (3047b) (20151111) - * [dwm-10e232f9ace7-statusallmons.diff](dwm-10e232f9ace7-statusallmons.diff) (982b) (20120406) - * [dwm-6.0-single_window_no_border.diff](dwm-6.0-single_window_no_border.diff) (2865b) (20120406) + * [dwm-noborder-6.1.diff](dwm-noborder-6.1.diff) + * [dwm-noborder-20160718-56a31dc.diff](dwm-noborder-20160718-56a31dc.diff) -Author ------- - * Jan Christoph Ebersbach - `<jceb at e-jc dot de>` +Authors +------- + + * Eric Pruitt - <eric.pruitt@gmail.com> + * Laslo Hunhold - <dev@frign.de> (6.1, git port) diff --git a/dwm.suckless.org/patches/nofullscreen.m4 b/dwm.suckless.org/patches/nofullscreen.m4 @@ -1,19 +0,0 @@ -nofullscreen -============ - -Description ------------ - -Prevent clients becoming floaters when going into fullscreen, -to keep them more manageable by dwm; useful if you work mainly -in monocle layout and don't want to lose control. - -Download --------- - -* [dwm-nofullscreen.diff](dwm-nofullscreen.diff) (389b) (20140305) - -Author ------- - -* Michael Hauser - aware water @ gmail diff --git a/dwm.suckless.org/patches/pango.md b/dwm.suckless.org/patches/pango.md @@ -32,7 +32,7 @@ not possible under barebone xft: Download -------- -* [dwm-6.0-pango.diff](dwm-6.0-pango.diff) +* [dwm-pango-6.0.diff](dwm-pango-6.0.diff) Author ------ diff --git a/dwm.suckless.org/patches/pertag.md b/dwm.suckless.org/patches/pertag.md @@ -11,16 +11,18 @@ Download Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.1-pertag.diff](dwm-6.1-pertag.diff) (6.4K) (20151109) + * [dwm-pertag-20160731-56a31dc.diff](dwm-pertag-20160731-56a31dc.diff) + * [dwm-pertag-20160626-7af4d43.diff](dwm-pertag-20160626-7af4d43.diff) + * [dwm-pertag-6.1.diff](dwm-pertag-6.1.diff) (6.4K) (20151109) * [dwm-git-20120406-pertag.diff](dwm-git-20120406-pertag.diff) (5955b) - * [dwm-6.0-pertag.diff](dwm-6.0-pertag.diff) (5955b) (20120406) + * [dwm-pertag-6.0.diff](dwm-pertag-6.0.diff) (5955b) (20120406) * [dwm-r1578-pertag.diff][9] (nmaster included in mainline) - * [dwm-5.8.2-pertag.diff][7] - * [dwm-5.7.2-pertag.diff][6] + * [dwm-pertag-5.8.2.diff][7] + * [dwm-pertag-5.7.2.diff][6] * [dwm-pertag-5.6.1.diff][5] - * [dwm-5.4-pertag.diff][4] - * [dwm-5.2-pertag.diff][3] - * [dwm-5.1-pertag.diff][2] + * [dwm-pertag-5.4.diff][4] + * [dwm-pertag-5.2.diff][3] + * [dwm-pertag-5.1.diff][2] * Using pertag but with the same barpos * [dwm-6.1-pertag_without_bar.diff](dwm-6.1-pertag_without_bar.diff) (5.2K) (20151109) @@ -36,13 +38,14 @@ Authors * Updated by William Light - `<wrl at illest dot net>` * Updated by termac - `<terror.macbeth.I at gmail dot com>` * Updated by Ivan Tham - `pickfire at riseup dot net` + * [Jochen Sprickerhof](mailto:project@firstname.lastname.de) (Updated to current git) [1]: historical/taglayouts -[2]: http://v4hn.de/patches/dwm-5.1-pertag.diff -[3]: historical/dwm-5.2-pertag.diff -[4]: historical/dwm-5.4-pertag.diff +[2]: historical/dwm-pertag-5.1.diff +[3]: historical/dwm-pertag-5.2.diff +[4]: historical/dwm-pertag-5.4.diff [5]: historical/dwm-pertag-5.6.1.diff -[6]: historical/dwm-5.7.2-pertag.diff -[7]: historical/dwm-5.8.2-pertag.diff +[6]: historical/dwm-pertag-5.7.2.diff +[7]: historical/dwm-pertag-5.8.2.diff [8]: historical/dwm-5.8.2-pertag_without_bar.diff [9]: historical/dwm-r1578-pertag.diff diff --git a/dwm.suckless.org/patches/push.md b/dwm.suckless.org/patches/push.md @@ -17,9 +17,10 @@ Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). - * [dwm-6.0-push.diff](dwm-6.0-push.diff) (1332b) - 2012/4/6 + * [dwm-push-20160731-56a31dc.diff](dwm-push-20160731-56a31dc.diff) + * [dwm-push-6.0.diff](dwm-push-6.0.diff) (1332b) - 2012/4/6 * [dwm-6.0-push_no_master.diff](dwm-6.0-push_no_master.diff) - * [dwm-6.1-push.diff](dwm-6.1-push.diff) (1402b) - 2014/2/9 + * [dwm-push-6.1.diff](dwm-push-6.1.diff) (1402b) - 2014/2/9 * [dwm-6.1-push_no_master.diff](dwm-6.1-push_no_master.diff) - 2015/11/21 ## Note diff --git a/dwm.suckless.org/patches/pwkl.md b/dwm.suckless.org/patches/pwkl.md @@ -15,7 +15,7 @@ this: [see ml](http://lists.suckless.org/dev/1010/6195.html). Download -------- -* [dwm-5.9-pwkl.diff](dwm-5.9-pwkl.diff) (1.4K) (20101013) +* [dwm-pwkl-5.9.diff](dwm-pwkl-5.9.diff) (1.4K) (20101013) Author ------ diff --git a/dwm.suckless.org/patches/resizecorners.md b/dwm.suckless.org/patches/resizecorners.md @@ -6,8 +6,8 @@ By default, windows only from the bottom right corner. With this Patch, the mous ## Download - * [dwm-6.1-resizecorners.diff](dwm-6.1-resizecorners.diff) (17.02.2016) - * [dwm-6.0-resizecorners.diff](dwm-6.0-resizecorners.diff) (12.05.2015) + * [dwm-resizecorners-6.1.diff](dwm-resizecorners-6.1.diff) (17.02.2016) + * [dwm-resizecorners-6.0.diff](dwm-resizecorners-6.0.diff) (12.05.2015) ## Author diff --git a/dwm.suckless.org/patches/save_floats.md b/dwm.suckless.org/patches/save_floats.md @@ -9,10 +9,12 @@ be restored. Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). + * [dwm-savefloats-20160723-56a31dc.diff](dwm-savefloats-20160723-56a31dc.diff) (1452b) * [dwm-6.1-save_floats.diff](dwm-6.1-save_floats.diff) (1605b) (20140209) * [dwm-10e232f9ace7-save_floats.diff](dwm-10e232f9ace7-save_floats.diff) (1604b) (20120406) - * [dwm-6.0-save_floats.diff](dwm-6.0-save_floats.diff) (1528b) (20120406) + * [dwm-save_floats-6.0.diff](dwm-save_floats-6.0.diff) (1528b) (20120406) ## Author ## * http://nymu.net/patches * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> + * Ivan Tham <pickfire@riseup.net> (git port) diff --git a/dwm.suckless.org/patches/single_tagset.md b/dwm.suckless.org/patches/single_tagset.md @@ -24,13 +24,15 @@ Please be aware that this patch probably breaks any other patch! Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). + * [dwm-single_tagset-20160731-56a31dc.diff](dwm-single_tagset-20160731-56a31dc.diff) * [dwm-6.1-single_tagset.diff](dwm-6.1-single_tagset.diff) (16634b) (20140209) * [dwm-10e232f9ace7-single_tagset.diff](dwm-10e232f9ace7-single_tagset.diff) (14748b) (20120406) - * [dwm-6.0-single_tagset.diff](dwm-6.0-single_tagset.diff) (14417b) (20120406) + * [dwm-single_tagset-6.0.diff](dwm-single_tagset-6.0.diff) (14417b) (20120406) Special Version --------------- This is a special version of the patch that was created with following patches being applied: + * [attachabove](attachabove) * [float_border_color](float_border_color) * [focusmaster](https://raw.github.com/jceb/dwm-patches/master/patches/focusmaster.patch) diff --git a/dwm.suckless.org/patches/sizehints.md b/dwm.suckless.org/patches/sizehints.md @@ -12,7 +12,7 @@ There is no configuration for this patch. ## Download - * [dwm-5.7.2-sizehints.diff](dwm-5.7.2-sizehints.diff) (695B) (20091221) + * [dwm-sizehints-5.7.2.diff](dwm-sizehints-5.7.2.diff) (695B) (20091221) ## Author diff --git a/dwm.suckless.org/patches/stacker.md b/dwm.suckless.org/patches/stacker.md @@ -53,7 +53,7 @@ stacker changes to `MODKEY|ShiftMask+BackSpace`. Download -------- -* [dwm-6.0-stacker.diff](dwm-6.0-stacker.diff) +* [dwm-stacker-6.0.diff](dwm-stacker-6.0.diff) Author ------ diff --git a/dwm.suckless.org/patches/statusallmons.md b/dwm.suckless.org/patches/statusallmons.md @@ -10,10 +10,11 @@ Download Patches against different versions of dwm are available at [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). + * [dwm-statusallmons-20160731-56a31dc.diff](dwm-statusallmons-20160731-56a31dc.diff) * [dwm-6.1-statusallmons.diff](dwm-6.1-statusallmons.diff) (1026b) (20140209) * [dwm-10e232f9ace7-statusallmons.diff](dwm-10e232f9ace7-statusallmons.diff) (982b) (20120406) - * [dwm-6.0-statusallmons.diff](dwm-6.0-statusallmons.diff) (982b) (20120406) - * [dwm-5.8.2-statusallmons.diff](dwm-5.8.2-statusallmons.diff) (4.0K) (20110318) + * [dwm-statusallmons-6.0.diff](dwm-statusallmons-6.0.diff) (982b) (20120406) + * [dwm-statusallmons-5.8.2.diff](dwm-statusallmons-5.8.2.diff) (4.0K) (20110318) Author ------ diff --git a/dwm.suckless.org/patches/statuscolors.md b/dwm.suckless.org/patches/statuscolors.md @@ -58,5 +58,5 @@ An example status script snippet to take advantage of the colors: * [dwm-5.7.2-statuscolors.diff](historical/dwm-5.7.2-statuscolors.diff) * [dwm-5.8.2-statuscolors.diff](historical/dwm-5.8.2-statuscolors.diff) - * [dwm-5.9-statuscolors.diff](dwm-5.9-statuscolors.diff) - * [dwm-6.1-statuscolors.diff](dwm-6.1-statuscolors.diff) + * [dwm-statuscolors-5.9.diff](dwm-statuscolors-5.9.diff) + * [dwm-statuscolors-6.1.diff](dwm-statuscolors-6.1.diff) diff --git a/dwm.suckless.org/patches/swallow.md b/dwm.suckless.org/patches/swallow.md @@ -1,34 +1,51 @@ -# terminals swallow windows +swallow +======= -## Description +Description +----------- -This patch adds "window swallowing" to dwm, a la `rio` from Plan 9. +This patch adds "window swallowing" to dwm as known from Plan 9's windowing +system `rio`. -Windows that are marked with the `isterminal` flag (settable using rules in `config.h`) will swallow a window opened by any descendant processes. -For example, if you open a terminal and then in that terminal type `xclock`, the `xclock` window takes the place of that terminal window. -Closing the `xclock` window restores the terminal window in the current position. +Clients marked with `isterminal` in config.h swallow a window opened by +any child process, e.g. running `xclock` in a terminal. +Closing the `xclock` window restores the terminal window in the current +position. -This patch is useful for users who tend to do most or all of their work from the command line, but sometimes need to use a graphical program. -This patch avoids cluttering the desktop with unused terminals. +This patch helps users spawning a lot of graphical programs from their +command line by avoiding cluttering the screen with many unusable terminals. +Being deep down in a directory hierarchy just does not make the use of +dmenu feasible. -(`dmenu` could be used, but if you are deep in a directory hierarchy and want to, say, view a PDF, cutting and pasting the path to `dmenu` takes longer than just running `mupdf`.) +Dependencies +------------ -## Download -Please see [deadpixi-dwm](https://github.com/deadpixi/deadpixi-dwm) for the development site. + * libxcb + * Xlib-libxcb + * xcb-res