sites

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

commit 70a3c387ae70fc4b955500836d58f751b22d4716
Author: arg@www.suckless.org <unknown>
Date:   Mon,  9 Mar 2009 08:59:47 +0000

initial commit
Diffstat:
Adwm.suckless.org/_werc/config | 3+++
Adwm.suckless.org/_werc/lib/footer.inc | 6++++++
Adwm.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Adwm.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/customfuncs.md | 259+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/font.md | 28++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/index.md | 40++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/noapps.md | 42++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/patch_queue.md | 358+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/rules.md | 48++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/tagmask.md | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/customisation/windows_key.md | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/dwm.gif | 0
Adwm.suckless.org/index.md | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/manpage.md | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/altmovefocus.md | 10++++++++++
Adwm.suckless.org/patches/boldfont.md | 27+++++++++++++++++++++++++++
Adwm.suckless.org/patches/bottom_stack.md | 36++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/clientspertag.md | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/color_status_bar.md | 43+++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/colored_status_text.md | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.2-colorstatus.diff | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc.txt | 24++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.2-gaplessgrid.diff | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.2-monocle_count.diff | 32++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.2-pertag.diff | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.3.1-statuscolors.diff | 228+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-5.3.1-statuscolors.png | 0
Adwm.suckless.org/patches/fibonacci.md | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/float_border_color.md | 19+++++++++++++++++++
Adwm.suckless.org/patches/gapless_grid.md | 32++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/gridmode.md | 48++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/index.md | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/monocle_count.md | 12++++++++++++
Adwm.suckless.org/patches/mouseontitle.md | 33+++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/moveresize.md | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/nmaster.md | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/pertag.md | 25+++++++++++++++++++++++++
Adwm.suckless.org/patches/push-5.3.c | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/push.md | 16++++++++++++++++
Adwm.suckless.org/patches/raiselower.md | 15+++++++++++++++
Adwm.suckless.org/patches/save_floates.md | 25+++++++++++++++++++++++++
Adwm.suckless.org/patches/tagall.md | 32++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/taglayouts.md | 27+++++++++++++++++++++++++++
Adwm.suckless.org/patches/workspaces.md | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/screenshots/dwm-20070930.png | 0
Adwm.suckless.org/screenshots/dwm-20070930s.png | 0
Adwm.suckless.org/screenshots/dwm-20080717.png | 0
Adwm.suckless.org/screenshots/dwm-20080717s.png | 0
Adwm.suckless.org/screenshots/dwm-20080720.png | 0
Adwm.suckless.org/screenshots/dwm-20080720s.png | 0
Adwm.suckless.org/screenshots/index.md | 5+++++
Adwm.suckless.org/tutorial.md | 43+++++++++++++++++++++++++++++++++++++++++++
Alibs.suckless.org/_werc/config | 3+++
Alibs.suckless.org/_werc/lib/footer.inc | 6++++++
Alibs.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Alibs.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alibs.suckless.org/index.md | 3+++
Alibs.suckless.org/libixp.md | 19+++++++++++++++++++
Alibs.suckless.org/r9p.md | 13+++++++++++++
Atools.suckless.org/_werc/config | 3+++
Atools.suckless.org/_werc/lib/footer.inc | 6++++++
Atools.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Atools.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/diri.md | 4++++
Atools.suckless.org/dmenu.md | 154+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/ii.md | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/index.md | 7+++++++
Atools.suckless.org/lsw.md | 8++++++++
Atools.suckless.org/lsx.md | 11+++++++++++
Atools.suckless.org/sic.md | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atools.suckless.org/slock.md | 11+++++++++++
Atools.suckless.org/sselp.md | 9+++++++++
Atools.suckless.org/ssid.md | 7+++++++
Atools.suckless.org/swarp.md | 12++++++++++++
Atools.suckless.org/wmname.md | 30++++++++++++++++++++++++++++++
Awmi.suckless.org/_werc/config | 3+++
Awmi.suckless.org/_werc/lib/footer.inc | 6++++++
Awmi.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Awmi.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmi.suckless.org/index.md | 28++++++++++++++++++++++++++++
Awmi.suckless.org/screenshots/wmi-20080718.png | 0
Awmi.suckless.org/screenshots/wmi-20080718s.png | 0
Awmi.suckless.org/wmi-10_compile_fixes.diff | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/9p.md | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/_werc/config | 3+++
Awmii.suckless.org/_werc/lib/footer.inc | 6++++++
Awmii.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Awmii.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/alternative_wmiirc_scripts.md | 31+++++++++++++++++++++++++++++++
Awmii.suckless.org/faq.md | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/guide.md | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/index.md | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/intro.md | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/related_links.md | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/screenshots/wmii-20080117-thumb.png | 0
Awmii.suckless.org/screenshots/wmii-20080117.png | 0
Awmii.suckless.org/scripts_n_snips/code_snippets.md | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/scripts_n_snips/index.md | 3+++
Awmii.suckless.org/scripts_n_snips/irssi_notifier.md | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/scripts_n_snips/mail_notifier.md | 44++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/scripts_n_snips/themes.md | 257+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awmii.suckless.org/wmii.gif | 0
Awww.suckless.org/_werc/config | 3+++
Awww.suckless.org/_werc/lib/footer.inc | 6++++++
Awww.suckless.org/_werc/lib/top_bar.inc | 17+++++++++++++++++
Awww.suckless.org/_werc/pub/style.css | 367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/broken_programs.md | 44++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/bugs.md | 28++++++++++++++++++++++++++++
Awww.suckless.org/common/community.md | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/cool_programs.md | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/donations.md | 34++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/dynamic_window_management.md | 41+++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/faq.md | 9+++++++++
Awww.suckless.org/common/index.md | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/common/other_projects.md | 11+++++++++++
Awww.suckless.org/common/patches.md | 28++++++++++++++++++++++++++++
Awww.suckless.org/common/style_guide.md | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/favicon.ico | 0
Awww.suckless.org/gsoc.md | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/index.md | 48++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/people/Anselm.md | 4++++
Awww.suckless.org/people/Anydot.md | 6++++++
Awww.suckless.org/people/Gottox.md | 6++++++
Awww.suckless.org/people/Kris.md | 247+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/people/Other_people.md | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/people/Uriel.md | 7+++++++
Awww.suckless.org/people/index.md | 3+++
Awww.suckless.org/people/spaceinvader.md | 4++++
Awww.suckless.org/wiki/index.md | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awww.suckless.org/wiki/sandbox.md | 17+++++++++++++++++
131 files changed, 7959 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/_werc/config b/dwm.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=dwm.suckless.org +siteTitle='dwm' +siteSubTitle='dynamic window manager' diff --git a/dwm.suckless.org/_werc/lib/footer.inc b/dwm.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/dwm.suckless.org/_werc/lib/top_bar.inc b/dwm.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> + <a href="http://www.suckless.org/dl">download</a> + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> | + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/dwm.suckless.org/_werc/pub/style.css b/dwm.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/dwm.suckless.org/customisation/customfuncs.md b/dwm.suckless.org/customisation/customfuncs.md @@ -0,0 +1,259 @@ +Custom functions in config.h +============================================== + +*by [Jesus Galan (yiyus)](mailto:yiyu dot jgl at gmail>) (vie ago 22 19:53:32 CEST 2008)* + +You don't need to write complex patches to config dwm, some custom functions and sensible key and button definitions in config.h let you turn dwm into whatever you want without messing with dwm.c. + +Example of config.h +---------------- + +This example is for people who prefer to control dwm with the mouse (for dwm 5.1): + + /* See LICENSE file for copyright and license details. */ + + /* appearance */ + static const char font[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*"; + static const char normbordercolor[] = "#cccccc"; + static const char normbgcolor[] = "#eeeeee"; + static const char normfgcolor[] = "#000000"; + static const char selbordercolor[] = "#0066ff"; + static const char selbgcolor[] = "#eeeeee"; + static const char selfgcolor[] = "#0066ff"; + static unsigned int borderpx = 3; /* border pixel of windows */ + static unsigned int snap = 32; /* snap pixel */ + static Bool showbar = True; /* False means no bar */ + static Bool topbar = True; /* False means bottom bar */ + static Bool readin = True; /* False means do not read stdin */ + + /* tagging */ + const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "w" }; + + static Rule rules[] = { + /* class instance title tags mask isfloating */ + { "acme", NULL, NULL, 1 << 2, False }, + { "Acroread", NULL, NULL, 0, True }, + { "Gimp", NULL, NULL, 0, True }, + { "GQview", NULL, NULL, 0, True }, + { "MPlayer", NULL, NULL, 0, True }, + { "Navigator", NULL, NULL, 1 << 5, False }, + }; + + /* layout(s) */ + static float mfact = 0.65; + static Bool resizehints = False; /* False means respect size hints in tiled resizals */ + + static Layout layouts[] = { + /* symbol arrange function */ + { "[]=", tile }, /* first entry is default */ + { "< >", NULL }, /* no layout function means floating behavior */ + { "[ ]", monocle }, + }; + + /* custom functions declarations */ + static void focusstackf(const Arg *arg); + static void setltor1(const Arg *arg); + static void toggletorall(const Arg *arg); + static void togglevorall(const Arg *arg); + static void vieworprev(const Arg *arg); + static void warptosel(const Arg *arg); + static void zoomf(const Arg *arg); + + /* key definitions */ + #define MODKEY Mod1Mask + #define TAGKEYS(KEY,TAG) \ + { MODKEY, KEY, vieworprev, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask, KEY, togglevorall, {.ui = 1 << TAG} }, \ + { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask|ShiftMask, KEY, toggletorall, {.ui = 1 << TAG} }, + + /* helper for spawning shell commands in the pre dwm-5.0 fashion */ + #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } + + /* commands */ + static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; + static const char *termcmd[] = { "uxterm", 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, focusstackf, {.i = +1 } }, + { MODKEY, XK_j, warptosel, {0} }, + { MODKEY, XK_k, focusstackf, {.i = -1 } }, + { MODKEY, XK_k, warptosel, {0} }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY, XK_Return, zoomf, {0} }, + { MODKEY, XK_Return, warptosel, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_c, killclient, {0} }, + { MODKEY, XK_space, setltor1, {.v = &layouts[0]} }, + { MODKEY|ShiftMask, XK_space, setltor1, {.v = &layouts[2]} }, + { MODKEY, XK_0, vieworprev, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + TAGKEYS( XK_1, 0) + TAGKEYS( XK_2, 1) + TAGKEYS( XK_3, 2) + TAGKEYS( XK_4, 3) + TAGKEYS( XK_5, 4) + TAGKEYS( XK_w, 5) + { MODKEY|ShiftMask, XK_q, quit, {0} }, + }; + + /* button definitions */ + /* click can ClkTagBar, ClkTagButton, + * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ + static Button buttons[] = { + /* click event mask button function argument */ + { ClkLtSymbol, 0, Button1, setltor1, {.v = &layouts[0]} }, + { ClkLtSymbol, 0, Button2, setmfact, {.f = 1.65} }, + { ClkLtSymbol, 0, Button3, setltor1, {.v = &layouts[2]} }, + { ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} }, + { ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} }, + { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkStatusText, Button3Mask, Button1, killclient, {0} }, + { ClkWinTitle, 0, Button1, warptosel, {0} }, + { ClkWinTitle, 0, Button1, movemouse, {0} }, + { ClkWinTitle, 0, Button2, zoomf, {0} }, + { ClkWinTitle, 0, Button3, resizemouse, {0} }, + { ClkWinTitle, 0, Button4, focusstackf, {.i = -1 } }, + { ClkWinTitle, 0, Button5, focusstackf, {.i = +1 } }, + { ClkRootWin, 0, Button1, warptosel, {0} }, + { ClkRootWin, 0, Button1, movemouse, {0} }, + { ClkRootWin, 0, Button3, resizemouse, {0} }, + { ClkRootWin, 0, Button4, focusstackf, {.i = -1 } }, + { ClkRootWin, 0, Button5, focusstackf, {.i = +1 } }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, zoomf, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkTagBar, 0, Button1, vieworprev, {0} }, + { ClkTagBar, 0, Button3, togglevorall, {0} }, + { ClkTagBar, 0, Button4, focusstackf, {.i = -1 } }, + { ClkTagBar, 0, Button5, focusstackf, {.i = +1 } }, + { ClkTagBar, Button2Mask, Button1, tag, {0} }, + { ClkTagBar, Button2Mask, Button3, toggletorall, {0} }, + }; + + /* custom functions */ + void + focusstackf(const Arg *arg) { + Client *c = NULL, *i; + + if(!sel) + return; + if(lt[sellt]->arrange) { + if (arg->i > 0) { + for(c = sel->next; c && (!ISVISIBLE(c) || c->isfloating != sel->isfloating); c = c->next); + if(!c) + for(c = clients; c && (!ISVISIBLE(c) || c->isfloating == sel->isfloating); c = c->next); + } + else { + for(i = clients; i != sel; i = i->next) + if(ISVISIBLE(i) && i->isfloating == sel->isfloating) + c = i; + if(!c) + for(i = sel; i; i = i->next) + if(ISVISIBLE(i) && i->isfloating != sel->isfloating) + c = i; + } + } + if(c) { + focus(c); + restack(); + } + else + focusstack(arg); + } + + void + setltor1(const Arg *arg) { + Arg a = {.v = &layouts[1]}; + + setlayout((lt[sellt] == arg->v) ? &a : arg); + } + + void + toggletorall(const Arg *arg) { + Arg a; + + if(sel && ((arg->ui & TAGMASK) == sel->tags)) { + a.ui = ~0; + tag(&a); + } + else + toggletag(arg); + } + + void + togglevorall(const Arg *arg) { + Arg a; + + if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) { + a.ui = ~0; + view(&a); + } + else + toggleview(arg); + } + + void + vieworprev(const Arg *arg) { + Arg a = {0}; + + view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg); + } + + void + warptosel(const Arg *arg) { + XEvent ev; + + if(sel) + XWarpPointer(dpy, None, sel->win, 0, 0, 0, 0, 0, 0); + XSync(dpy, False); + while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); + } + + void + zoomf(const Arg *arg) { + if(sel && (lt[sellt]->arrange != tile || sel->isfloating)) + togglefloating(NULL); + else + zoom(NULL); + } + +Usage of the above configuration +-------------------------- + +In case you want to try this configuration there are some differences with the default dwm config to be taken into account. Mouse actions will be explained later, keys have simlar behaviour. There are other small changes, but the config.h file should be pretty straightforward. + +###Tagging + +In the tag buttons: + +- B1: view a tag, trying to view the selected tagset will result in a change to the previous one. +- B3: toggle a tag, trying to toggle the last selected tag will result in viewing all tags. +- B2+B1: asign tag to the sel client. +- B2+B3: toggle tag for the sel client, trying to toggle the last tag will result in asigning all tags. + +###Layouts + +In the layout symbol: + +- B1: toggle between tiled and floating layout. +- B3: toggle between monocle and floating layout. +- Wheel: set master factor (B2 to go back to the default value). + +###Focusing/Moving/Resizing + +in the status bar, the root window, or the selected window (with Mod pressed) + +- Wheel to focus prev/next client. Floating clients will just be focused after the tiled ones. +- B1 to move (the pointer will be wrapped to the upper-left corner if neccesary). +- B3 to resize (the pointer will be wrapped to the bottom-right corner). +- B2 to zoom or toggle floating status if zooming is not possible. + +###Closing windows + +- B3+B1 in the status message. diff --git a/dwm.suckless.org/customisation/font.md b/dwm.suckless.org/customisation/font.md @@ -0,0 +1,28 @@ +Change font in config.h +======================= + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com>) about this document* + +Towards the beginning of **config.h**, you will find a line defining the variable + + static const char font[] = "..." + +By using **xfontsel**, you can produce a font line for the font you would like to be used by **dwm** when displaying text in the menubar. + +For example, to change the font to 'fixed', you can change the value of font to: + + static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1"; + +The following patch also produces the same result: + + --- a/config.def.h Mon Jul 28 20:23:16 2008 +0100 + +++ b/config.def.h Mon Jul 28 20:45:27 2008 +0100 + @@ -1,7 +1,7 @@ + /* See LICENSE file for copyright and license details. */ + + /* appearance */ + -static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; + +static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1"; + static const char normbordercolor[] = "#cccccc"; + static const char normbgcolor[] = "#cccccc"; + static const char normfgcolor[] = "#000000"; diff --git a/dwm.suckless.org/customisation/index.md b/dwm.suckless.org/customisation/index.md @@ -0,0 +1,40 @@ +CUSTOMISATION +============= + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com>) about this document* + +**dwm** is customised by editing **config.h**, a C language header file, and **config.mk**, a Make include file. + +What is **config.h**? +--------------------- + +config.h is a source code file which is included by dwm.c, the main dwm source code module. +It serves as the configuration file for all of dwm's features, e.g., application placement, tags, and colours. +A vanilla download of dwm will contain a file called config.def.h, a template you can use to create your own config.h file. +To start customising dwm, simply copy config.def.h into config.h before you run make. + +What is **config.mk**? +---------------------- + +config.mk is a file included by Makefile. It allows you to configure how make is going to compile and install dwm. + +How do I modify **config.h**? +----------------------------- + +config.h can be edited just like any other C source code file. +It contains definitions of variables that are going to be used by dwm.c and therefore it is vital that the file is always up to date. +The default Makefile distributed with dwm will not overwrite your customised config.h with the contents of config.def.h, even if it was updated in the latest mercurial pull. +Therefore, you should always compare your customised config.h with config.def.h and make sure you include any changes to the latter in your config.h. + +How do I modify **config.mk**? +------------------------------ + +config.mk can be edited just like any other text file. +It contains definitions of variables that are going to be used inside Makefile. +Unlike config.h, config.mk does not have a config.def.mk (a default Makefile). +Therefore, during an update of your repository you may run into conflicts if the original config.mk is edited. + +Are there any example customisations to get me started? +------------------------------------------------------- + +On the sidebar of this wiki page you will soon find links to example modifications that you may find useful to get started. diff --git a/dwm.suckless.org/customisation/noapps.md b/dwm.suckless.org/customisation/noapps.md @@ -0,0 +1,42 @@ +Remove application defaults from config.h +========================================= + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com>) about this document* + +The rules array is initialised, by default, to treat windows of class `Gimp` and `Firefox` in a special way. +If, like me, you don't want any application to be treated in a special way, you must be careful when editing the rules array initialisation code. + +The original code describes what each value represents within the Rule structure. + + static Rule rules[] = { + /* class instance title tags mask isfloating */ + { "Gimp", NULL, NULL, 0, True }, + { "Firefox", NULL, NULL, 1 << 8, True }, + }; + +For instance, Gimp and Firefox will be labeled as floating windows, even if the layout selected is Monocle or Tiled. +In particular, the tag mask will attach Firefox to tag '9'. + +If we don't want any window class to be treated in a special way, we need to initialise rules with at least one element: + + static Rule rules[] = { + /* class instance title tags mask isfloating */ + { NULL, NULL, NULL, 0, False }, + }; + +The code in dwm.c will check that the `class` element is not NULL before any matching is done. + + /* rule matching */ + XGetClassHint(dpy, c->win, &ch); + for(i = 0; i < LENGTH(rules); i++) { + r = &rules[i]; + if((!r->title || strstr(c->name, r->title)) + && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) + && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { + c->isfloating = r->isfloating; + c->tags |= r->tags & TAGMASK; + } + } + +This code assumes the rules array has at least one element, and that the first rule that does not match will apply to all window classes. +Therefore, the rule we just made, is the default rule for all new windows and therefore it is important you set the `tags mask` and `isfloating` elements correctly. diff --git a/dwm.suckless.org/customisation/patch_queue.md b/dwm.suckless.org/customisation/patch_queue.md @@ -0,0 +1,358 @@ +#How to maintain your own config.h as a patch queue in Mercurial + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com>) about this document* + +This article will explain how to maintain your own `config.h` and `config.mk` files as a set of patches in a Mercurial Queue. + +##Background + +When customising dwm, it is assumed the user edits `config.h` and `config.mk`. + +`config.h` is not generated from `config.def.h` when running `make`. The user must copy `config.def.h` in `config.h` before `make` can build its targets. +This raises the interesting situation where our customised `config.h` does not match changes to `config.def.h` in future releases of dwm. We must therefore take care of diff'ing `config.h` and `config.def.h` manually so as to keep our customised `config.h` in sync with the project. + +When building dwm, the user is expected to edit `config.mk` to customise the install location and other parameters, such as C compiler flags. +It is unfortunately suffering from the same risk of a customised `config.mk` not being in sync with the one in the main distribution. One has to remember to diff the original and customised `config.mk` to make sure the changes are in sync. + +##Automating our customisations + +Since *suckless.org* uses Mercurial as its source control system, it is nice to know that we can use Mercurial to manage our customisations. This makes it easy to create an incremental series of patchsets (queue) that we can also distribute to others. + +An example of such queue can be found at [fnegronidwm](http://sharesource.org/project/fnegronidwm/wiki/): I created it as a Mercurial Queue repository so that I can manage the patches and keep them in sync with the main dwm distribution. + +The rest of this document will explain how I created my queue for dwm. +It will hopefully help others do the same and also improve the quality of the patches by making sure that they are tagged and in sync with the main repository of dwm. + +##Tutorial + +###Get the original dwm + +You have two options: + +- download the prepackaged source tarball, currently [dwm-5.1](http://code.suckless.org/dl/dwm/dwm-5.1.tar.gz) + +- clone the mercurial repository at `http://code.suckless.org/hg/dwm` + +###Enable the MQ extension + +In your global mercurial configuration (`~/.hgrc`), enable the MQ extension: + + [extensions] + hgext.mq = + +Verify your extension is enabled: + + $ hg help qinit + +###Prepare a base mercurial repository + +If you downloaded the prepackaged source tree, it is now a good time to initialise a mercurial repository: + + $ cd dwm-5.1 + $ hg init + $ hg add + +If you cloned the official repo, but prefer to work on less frequent updates, you can update your working copy to the latest stable tag: + + $ cd dwm + $ hg up -r 5.1 + +###Initialise the MQ repository + +From within your working copy, run the command: + + $ hg qinit -c + +The `-c` option ensures that your patch series is tracked as a separate mercurial repository, should you wish to share it with others or experiment further. + +###Our first patch: change install location + +When trying out new software, or patching projects, I like to install it in my home directory. + +So the first change I make when downloading dwm is to edit `config.mk` and change the value of `PREFIX`. + +This is a perfect candidate for an MQ patch: it is a repetitive task, but the resulting config.mk might not be compatible with future releases. + +So we first tell MQ we are working on a new patch: + + $ hg qnew install_location + +Then we edit `config.mk` and change the value of `PREFIX`: + + PREFIX = /home/fnegroni + +We then tell MQ that we have done some work on the current patch: + + $ hg qrefresh + +Our base repository now includes information about our patch: + + $ hg log -r tip + changeset: 1338:8226aced4656 + tag: tip + tag: qbase + tag: install_location + tag: qtip + parent: 1315:ce355cea9bb8 + user: f.e.negroni + date: Mon Aug 18 23:24:27 2008 +0100 + summary: [mq]: install_location + +###Commit the patch to the MQ repository + +Since we are happy about our first customisation, we want to commit that in our MQ repository. This way, should we corrupt anything in our working copy, we can always roll back to a know state. + +The MQ repository is one level down from the base repo, so we use the special command //qcommit//: + + $ hg qcommit -m 'First patch to installation target' + +###The second patch: forget about config.h + +What we really want to modify when customising dwm is `config.def.h`. + +`config.h` is really just a redundant dependency if using MQ to manage customisations. + +Unfortunately MQ can't track renames for us, so rather than renaming `config.def.h` into `config.h`, we modify the dependency tree in `Makefile`. + + $ hg qnew configh_dep + +Now MQ knows we are working on a new patch. + +We modify `Makefile` so that where it reads: + + config.h: + +it now reads: + + config.h: config.def.h + +This will cause a new `config.h` to be produced whenever `config.def.h` is updated, either by us as a patch, or by the official repository history. + +Don't forget to tell MQ we are done with the patch: + + $ hg qrefresh + +Now we can test our patch: without copying `config.def.h` into `config.h`, `make` should succeed: + + $ make + ... + creating config.h from config.def.h + ... + +Let's again commit this latest patch in our MQ repository for safe keeping: + + $ hg qcommit -m 'Made config.h depend on config.def.h' + +###Our first proper customisation: change the tiling factor + +As a first customisation, that is something we can actually see, we will modify the original factor used when tiling windows. + +The original value is in `config.def.h`, and it is called `mfact`. + +We want to change it from `0.55` to `0.5`. + +First, tell MQ about it: + + $ hg qnew mfact_05 + +Then edit `config.def.h` so it reads: + + static float mfact = 0.5; + +in place of the old value. + +Tell MQ we are done with the patch and commit it to its repo: + + $ hg qrefresh + $ hg qcommit -m 'Our mfact is now 0.5' + +### List our patches + +Just issue: + + $ hg qseries + install_location + configh_dep + mfact_05 + +to see all the patches we created, and + + $ hg qapplied + install_location + configh_dep + mfact_05 + +to see which patches are currently applied to our tree. + +The order in which `qapplied` lists our patches is the order in which the patches were applied to our source tree, from top first to bottom last. + +###Update to the latest dwm source + +This is where MQ shines. + +We now must remove all our customisations (the entire queue of applied patches). This will bring our repository (not just the working copy, but our entire history) back to where we started. To prove it, let's look at the current tip of our history: + + $ hg log -r tip + changeset: 1340:6a95ea4eed06 + tag: tip + tag: mfact_05 + tag: qtip + user: f.e.negroni + date: Tue Aug 19 00:00:09 2008 +0100 + summary: [mq]: mfact_05 + +That shows that our history has changed since we started working on our patches. + +Let's remove all the applied patches: + + $ hg qpop -a + Patch queue now empty + +The tip of our history has now gone back to where we started: + + $ hg log -r tip + changeset: 1337:c4ecef7983b8 + tag: tip + user: Anselm R Garbe + date: Mon Aug 18 19:28:57 2008 +0100 + summary: Martin Hurtons typo fix + +To get the latest code we must remember how we obtained the code. + +If we cloned the official repository and updated our working copy to tag 5.1, we can simply do: + + $ hg pull + $ hg up -r tip + +We will be informed that some files had to be updated. Remember that our patches were based on a working copy of tag 5.1 + +If we obtained the source from a tarball, we might need to download a more recent tarball, extract the tarball on top of our working copy and resync our repository: + + $ hg addremove + $ hg ci -m 'synched with latest code' + +###Apply our customisations again + +Our customisations are not lost: they are safe in `.hg/patches`. They are just not applied to the current working copy. + +To do that, issue this command: + + $ hg qpush -a + +This will apply our patches, one by one, in the order they were created. + + $ hg qpush -a + applying install_location + applying configh_dep + applying mfact_05 + patching file config.def.h + Hunk #1 FAILED at 22 + 1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej + patch failed, unable to continue (try -v) + patch failed, rejects left in working dir + Errors during apply, please fix and refresh mfact_05 + +If our customisations can be applied, they will be. But as you can see, our customisation `mfact_05` did not succeed. + +MQ has successfully applied `install_location` and `configh_dep`, but encountered a problem in `mfact_05`. What it is now telling us is that we can look at the conflict in `config.def.h.rej` and try and fix the problem. + +This is `config.def.h.rej`: + + --- config.def.h + +++ config.def.h + @@ -23,7 +23,7 @@ + }; + + /* layout(s) */ + -static float mfact = 0.55; + +static float mfact = 0.5; + static Bool resizehints = True; /* False means respect size hints in tiled resizals */ + +That's the change we created and saved in our patch queue. + +If we look at `config.def.h` now, we can try and fix our patch. We know from the rejects file above that `mfact` was not modified. + +The section in `config.def.h` that we originally modified had work done to it between tag 5.1 and the tip. It now looks like this: + + /* layout(s) */ + static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ + static Bool resizehints = True; /* False means respect size hints in tiled resizals */ + +So some comments were added. + +What we do now is simple: change mfact and refresh our current MQ patch. We know our current MQ patch is `mfact_05` because that's where `qpush` left off. + +After changing `config.def.h`, simply do: + + $ hg qrefresh + +And the patch queue is now updated. + +###Patch queue history + +When we refresh our patch with `qrefresh`, we do not automatically commit to our patch queue repository in `.hg/patches`. + +This is where we can take advantage of MQ for our customisation. + +We know that the customisations we created for dwm version 5.1 are correct. They just fail to apply to the latest source tree. + + $ cd .hg/patches + $ hg stat + M mfact_05 + $ hg log -r tip + changeset: 2:d57a0f67f9a5 + tag: tip + user: f.e.negroni + date: Tue Aug 19 00:00:20 2008 +0100 + summary: Our mfact is now 0.5 + +So, we can mark that fact in our patch queue repository: + + $ hg tag 5.1 + $ hg tags + $ hg tags + tip 3:c199ba305efd + 5.1 2:d57a0f67f9a5 + +And now we can commit our latest `mfact_05` to our patch queue so it is safe: + + $ hg ci -m 'mfact_05 refreshed for dwm changeset:1337' + $ hg log + changeset: 4:b50744a3fb9e + tag: tip + user: f.e.negroni + date: Wed Aug 20 23:58:06 2008 +0100 + summary: mfact_05 refreshed for dwm changeset:1337 + + changeset: 3:c199ba305efd + user: f.e.negroni + date: Wed Aug 20 23:55:02 2008 +0100 + summary: Added tag 5.1 for changeset d57a0f67f9a5 + + changeset: 2:d57a0f67f9a5 + tag: 5.1 + user: f.e.negroni + date: Tue Aug 19 00:00:20 2008 +0100 + summary: Our mfact is now 0.5 + + changeset: 1:dd93da2d71d3 + user: f.e.negroni + date: Mon Aug 18 23:42:26 2008 +0100 + summary: Made config.h depend on config.def.h + + changeset: 0:b0fed54a0021 + user: f.e.negroni + date: Mon Aug 18 23:30:30 2008 +0100 + summary: First patch to installation target + +###Let's share our customisations with others + +If anyone is interested in our customisations, they can simply clone our patch queue repository, the one in `.hg/patches`. + +Since `.hg/patches` is simply another mercurial repository, we can share it in a number of ways, like exporting it or making it available through ssh or http. + +The big bonus is that now, whomever clones our customisations, will receive our customisations not for just one version of dwm, but for any version that we tagged in our repository. + +This is extremely helpful to make sure the correct patch is applied to the correct source. + +##The End diff --git a/dwm.suckless.org/customisation/rules.md b/dwm.suckless.org/customisation/rules.md @@ -0,0 +1,48 @@ +Setting rules in config.h +========================= + +What does '`rules`' do? +----------------------- +The `rules` array allows to treat certain applications (clients) in a special +way. A rule has a matching and an action part. When a new client appears (sends +a maprequest), it is matched against the rules based on its class, instance +(`WM_CLASS`) and title (`WM_NAME`) properties and then the given tag and +floating mode setting actions are performed. The default tag mask is `0`, which +means the currently viewed tags, and the default mode is tiled so isfloating is +`False`. + +Example from the default config: + + static Rule rules[] = { + /* class instance title tags mask isfloating */ + { "Gimp", NULL, NULL, 0, True }, + { "Firefox", NULL, NULL, 1 << 8, True }, + }; + +These rules make every Gimp and Firefox window floating and makes Firefox +windows appear on tag 9 instead of the currently viewed tags. + +How does the matching work? +--------------------------- +A client is matched if its properties contain the given strings as substrings +(case-sensitively) or `NULL` is given (which means anything is matched there). + +More than one rule can be applied to a client, the rules are matched in order. + +How to check these properties of a client? +------------------------------------------ +The `xprop` utility can be used to get this information: +`WM_CLASS` is (instance, class) `WM_NAME` (or `_NET_WM_NAME`) is the title. + +For example this shell script prints the relevant properties of the selected +client (if the properties does not contain '`=`' or '`,`'): + + xprop |awk ' + /^WM_CLASS/{sub(/.* =/, "instance:"); sub(/,/, "\nclass:"); print} + /^WM_NAME/{sub(/.* =/, "title:"); print}' + +How to add exception to a tagging rule? +--------------------------------------- +It cannot be simply done. For example it is difficult to achieve that each +Firefox window goes to tag 9 except one specific dialog, which goes to tag 8, +because the tag masks of different matched rules are 'or'ed (and not overwritten). diff --git a/dwm.suckless.org/customisation/tagmask.md b/dwm.suckless.org/customisation/tagmask.md @@ -0,0 +1,80 @@ +How does a tag-mask work? +========================= + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com) about this document* + +There exists extensive documentation in this wiki about tags in dwm. + +This article will concentrate on how to manage bit masks in default rules. + +In order to manage a number of tags efficiently, dwm uses bitmasks. + +Looking at dwm's code, the tags array is defined in the familiar way: + + static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; + +We have 9 tags, labelled numerically (but the labels are just that, labels; they don't have any intrinsic values). + +Within dwm's code, each client's tag list is managed as a bit mask: given an integer binary representation, tags are associated from the least significant bit (rightmost) to the most significant bit (leftmost). + +For example, tag '1' is 000000001, while tag 9 is 100000000. Tag '3' is 000000100 (third from the right) + +The code in dwm.c that uses the rules array matches the current client properties with each rule, and when matched, it bit-ands the tags member of the rules array element with TAGMASK, then bit-ors it with the client's current tag mask. + + /* rule matching */ + XGetClassHint(dpy, c->win, &ch); + for(i = 0; i < LENGTH(rules); i++) { + r = &rules[i]; + if((!r->title || strstr(c->name, r->title)) + && (!r->class || (ch.res_class && strstr(ch.res_class, r->class))) + && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { + c->isfloating = r->isfloating; + c->tags |= r->tags & TAGMASK; + } + } + +The client's tags value is therefore built sequentially through the rules. +If the tagmask in rules is 0, the currently selected tag becomes the client's tags value. + + if(!c->tags) + c->tags = tagset[seltags]; + +TAGMASK is the all-one bit mask, setting to 1 all the bits corresponding to a tag in the tags array. +TAGMASK is defined in dwm.c as: + + #define TAGMASK ((int)((1LL << LENGTH(tags)) - 1)) + +and would produce, for the standard tags array, the bit configuration 111111111 (nine 1's). + +The reason for using TAGMASK is that it disallows the rules array to select a tag for which we do not have a representation in the tags array. + +Now, this method of representing tags allows us to express our preferences regarding tags using bit-wise operators. + +When are tagmasks used? +----------------------- +Please note that dwm always uses tagmasks: even when one tag is selected as the visible tag, it is actually internally managed as a tagmask. + +To prove this, use the command combination that allows you to bring more than one tag into view (usually Mod1-Ctrl-tagnumber). If you select tags 1, 2 and 3, and then open a new xterm using Mod1-Shift-Return, the new xterm will be tagged with tags 1, 2 and 3. + +A very powerful feature. + +What does tagmask 0 mean? +------------------------- + +It means that the current tagmask should be selected for this window: if more than one tag are currently visible, all the currently visible tags are going to be associated to that window. + +What does tagmask 1 << 8 mean? +------------------------------ + +1 shifted to the left by eight positions generates mask 10000000, selecting tag '9' (ninth from the right) in the the tags array. + +What does ~0 mean? +------------------ + +Complement of 0 is all 1's. This indicates all tags should be selected. +The tag mask in rules is then filtered using the TAGMASK macro to adapt the mask to just the available tags. + +What does (1 << 8) - 1 mean? +-------------------------- + +1 << 8 selects tag '9' only (100000000). Subtracting 1 to that bitmask transforms all the 0's to the right of that tagmask into 1's (011111111), effectively selecting all tags except '9'. diff --git a/dwm.suckless.org/customisation/windows_key.md b/dwm.suckless.org/customisation/windows_key.md @@ -0,0 +1,54 @@ +Change Mod1 key to the Windows key in config.h +============================================== + +*blame [Filippo Erik Negroni](mailto:f dot e dot negroni at googlemail dot com>) about this document* + +dwm's documentation refers to Mod1 as the modifier key that you must press to issue commands to it. +On most keyboards, Mod1 is mapped to the left Alt key. +Most new keyboards now come equipped with the *Windows* key. +Since no known UNIX/X applications are known to use the Windows key, it is an excellent alternative mapping to issue commands to dwm. + +In config.h, under the comment `/* key definitions */`, you can find the line + + #define MODKEY Mod1Mask + +In order to change dwm's modifier key to the Windows key, you can simply change its value definition to Mod4Mask. + + #define MODKEY Mod4Mask + +The following patch also produces the same result: + + --- a/config.def.h Sun Jul 27 03:34:57 2008 +0100 + +++ b/config.def.h Sun Jul 27 23:04:57 2008 +0100 + @@ -35,7 +35,7 @@ + }; + + /* key definitions */ + -#define MODKEY Mod1Mask + +#define MODKEY Mod4Mask + #define TAGKEYS(KEY,TAG) \ + { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ + +Can I use any other modifier key? +--------------------------------- + +Yes. +There are 5 modifiers, Mod1Mask to Mod5Mask. +They are associated to up-to three keysyms (keycodes) from the X window server. +To show the current association on your keyboard, run `xmodmap` with no arguments. +It will show something like: + + $ xmodmap + xmodmap: up to 3 keys per modifier, (keycodes in parentheses): + + shift Shift_L (0x32), Shift_R (0x3e) + lock Caps_Lock (0x42) + control Control_L (0x25), Control_R (0x6d) + mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c) + mod2 Num_Lock (0x4d) + mod3 + mod4 Super_L (0x7f), Hyper_L (0x80) + mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c) + +Using `xev`, a utility to show X events, such as key presses, we can quickly identify which keysym (keycode) combination a particular key has, and associate that to a modifier using `xmodmap`. diff --git a/dwm.suckless.org/dwm.gif b/dwm.suckless.org/dwm.gif Binary files differ. diff --git a/dwm.suckless.org/index.md b/dwm.suckless.org/index.md @@ -0,0 +1,63 @@ +![dwm](/dwm/dwm.gif) + +DYNAMIC WINDOW MANAGER +====================== + +Description +----------- +dwm is a dynamic window manager for X. It manages windows in tiled and +floating layouts. Either layout can be applied dynamically, optimizing the +environment for the application in use and the task performed. It is +the little brother of [wmii](/wmii/). + +In tiled layout, windows are managed in a master and stacking area. The master +area contains the windows which currently need most attention, whereas the +stacking area contains all other windows. In floating layout, windows can be +resized and moved freely. Dialog windows are always managed floating, +regardless of the layout selected. + +Windows are grouped by tags. Each window can be tagged with one or multiple +tags. Selecting certain tags displays all windows with those tags. + +dwm contains a small status bar which displays all available tags, the layout, +the title of the focused window, and text read from standard input. The +selected tags are highlighted with a different color, while the tags of the focused +window are highlighted with a small point. + +dwm draws a small border around windows to indicate their focus state. + +<center>[![Screenshot](/dwm/screenshots/dwm-20070930s.png)](/dwm/screenshots/dwm-20070930.png)</center> + +Differences +----------- +In contrast to ion, larswm, and wmii, dwm is much smaller, faster and simpler. + +* dwm has no Lua integration, no 9P support, no shell-based configuration, no remote control, and comes without any additional tools, such as for printing the selection or warping the mouse. +* dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. +* dwm doesn't distinguish between layers: there is no floating or tiled layer. Whether or not the clients of currently selected tag(s) are in tiled layout, you can rearrange them on the fly. Popup and fixed-size windows are always floating, however. +* dwm is customized through editing its source code, which makes it extremely fast and secure - it does not process any input data which isn't been known at compile time, except window titles and status text read from the standard input. You don't have to learn Lua/sh/ruby or some weird configuration file format (like X resource files), beside C, to customize it for your needs: you only have to learn C (at least editing header files). +* Because dwm is customized through editing its source code, it's pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions. +* dwm reads from the standard input to print arbitrary status text (like the date, load, battery charge). That's much simpler than larsremote, wmiir and what not... + +Links +----- +* [Man page](/dwm/manpage.html) +* Mailing List: `dwm+subscribe@suckless.org` [(Archives)](http://lists.suckless.org/dwm) [(GMANE Archive)](http://dir.gmane.org/gmane.comp.window-managers.dwm) +* IRC channel: #dwm at irc.oftc.net [(irc log)](TODO) + +Download +-------- +* [MIT/X Consortium license](http://code.suckless.org/hg/dwm/raw-file/tip/LICENSE) +* [dwm 5.4.1](http://code.suckless.org/dl/dwm/dwm-5.4.1.tar.gz) (18kb) (20090208) +* See also [dmenu](/programs/dmenu.html) + +Development +----------- +dwm is actively developed in parallel to wmii. You can [browse](http://code.suckless.org/hg/dwm) its source code repository or get a copy using [Mercurial](http://www.selenic.com/mercurial/) with following command: + + hg clone http://code.suckless.org/hg/dwm + +Miscellaneous +------------- +* Optionally you can install [dmenu](/programs/dmenu.html) to extend dwm with a wmii-alike menu. + diff --git a/dwm.suckless.org/manpage.md b/dwm.suckless.org/manpage.md @@ -0,0 +1,235 @@ +<H1>DWM</H1> + +<H2>NAME</H2> + +dwm - dynamic window manager +<A NAME="lbAC">&nbsp;</A> +<H2>SYNOPSIS</H2> + +<B>dwm</B> + +[<B>-v</B>] + +<A NAME="lbAD">&nbsp;</A> +<H2>DESCRIPTION</H2> + +dwm is a dynamic window manager for X. It manages windows in tiled, monocle +and floating layouts. Either layout can be applied dynamically, optimising the +environment for the application in use and the task performed. +<P> + +In tiled layouts windows are managed in a master and stacking area. The master +area contains the window which currently needs most attention, whereas the +stacking area contains all other windows. In monocle layout all windows are +maximised to the screen size. In floating layout windows can be resized and +moved freely. Dialog windows are always managed floating, regardless of the +layout applied. +<P> + +Windows are grouped by tags. Each window can be tagged with one or multiple +tags. Selecting certain tags displays all windows with these tags. +<P> + +dwm contains a small status bar which displays all available tags, the layout, +the title of the focused window, and the text read from standard input. A +floating window is indicated with an empty square and a maximised +floating window is indicated with a filled square before the windows +title. The selected tags are indicated with a different color. The tags of +the focused window are indicated with a filled square in the top left +corner. The tags which are applied to one or more windows are indicated +with an empty square in the top left corner. +<P> + +dwm draws a small border around windows to indicate the focus state. +<A NAME="lbAE">&nbsp;</A> +<H2>OPTIONS</H2> + +<DL COMPACT> +<DT><B>-v</B> + +<DD> +prints version information to standard output, then exits. +</DL> +<A NAME="lbAF">&nbsp;</A> +<H2>USAGE</H2> + +<A NAME="lbAG">&nbsp;</A> +<H3>Status bar</H3> + +<DL COMPACT> +<DT><B>Standard input</B> + +<DD> +is read and displayed in the status text area. +<DT><B>Button1</B> + +<DD> +click on a tag label to display all windows with that tag, click on the layout +label toggles between tiled and floating layout. +<DT><B>Button3</B> + +<DD> +click on a tag label adds/removes all windows with that tag to/from the view. +<DT><B>Mod1-Button1</B> + +<DD> +click on a tag label applies that tag to the focused window. +<DT><B>Mod1-Button3</B> + +<DD> +click on a tag label adds/removes that tag to/from the focused window. +</DL> +<A NAME="lbAH">&nbsp;</A> +<H3>Keyboard commands</H3> + +<DL COMPACT> +<DT><B>Mod1-Shift-Return</B> + +<DD> +Start +<B>xterm.</B> + +<DT><B>Mod1-b</B> + +<DD> +Toggles bar on and off. +<DT><B>Mod1-t</B> + +<DD> +Sets tiled layout. +<DT><B>Mod1-f</B> + +<DD> +Sets floating layout. +<DT><B>Mod1-m</B> + +<DD> +Sets monocle layout. +<DT><B>Mod1-space</B> + +<DD> +Toggles between current and previous layout. +<DT><B>Mod1-j</B> + +<DD> +Focus next window. +<DT><B>Mod1-k</B> + +<DD> +Focus previous window. +<DT><B>Mod1-h</B> + +<DD> +Decrease master area size. +<DT><B>Mod1-l</B> + +<DD> +Increase master area size. +<DT><B>Mod1-Return</B> + +<DD> +Zooms/cycles focused window to/from master area (tiled layouts only). +<DT><B>Mod1-Shift-c</B> + +<DD> +Close focused window. +<DT><B>Mod1-Shift-space</B> + +<DD> +Toggle focused window between tiled and floating state. +<DT><B>Mod1-Tab</B> + +<DD> +Toggles to the previously selected tags. +<DT><B>Mod1-Shift-[1..n]</B> + +<DD> +Apply +nth + +tag to focused window. +<DT><B>Mod1-Shift-0</B> + +<DD> +Apply all tags to focused window. +<DT><B>Mod1-Control-Shift-[1..n]</B> + +<DD> +Add/remove +<B>nth</B> + +tag to/from focused window. +<DT><B>Mod1-[1..n]</B> + +<DD> +View all windows with +<B>nth</B> + +tag. +<DT><B>Mod1-0</B> + +<DD> +View all windows with any tag. +<DT><B>Mod1-Control-[1..n]</B> + +<DD> +Add/remove all windows with +<B>nth</B> + +tag to/from the view. +<DT><B>Mod1-Shift-q</B> + +<DD> +Quit dwm. +</DL> +<A NAME="lbAI">&nbsp;</A> +<H3>Mouse commands</H3> + +<DL COMPACT> +<DT><B>Mod1-Button1</B> + +<DD> +Move focused window while dragging. Tiled windows will be toggled to the floating state. +<DT><B>Mod1-Button2</B> + +<DD> +Toggles focused window between floating and tiled state. +<DT><B>Mod1-Button3</B> + +<DD> +Resize focused window while dragging. Tiled windows will be toggled to the floating state. +</DL> +<A NAME="lbAJ">&nbsp;</A> +<H2>CUSTOMIZATION</H2> + +dwm is customized by creating a custom config.h and (re)compiling the source +code. This keeps it fast, secure and simple. + +<A NAME="lbAL">&nbsp;</A> +<H2>BUGS</H2> + +The status bar may display +<B>EOF</B> +when dwm has been started by an X session manager like +<B>xdm</B>(1), +because those close standard output before executing dwm. +<P> + +Java applications which use the XToolkit/XAWT backend may draw grey windows +only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early +JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround +you can use JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or you +can set the following environment variable (to use the older Motif +backend instead): +<B>AWT_TOOLKIT=MToolkit</B>. + +<P> + +GTK 2.10.9+ versions contain a broken +<B>Save-As</B> +file dialog implementation, +which requests to reconfigure its window size in an endless loop. However, its +window is still respondable during this state, so you can simply ignore the flicker +until a new GTK version appears, which will fix this bug, approximately +GTK 2.10.12+ versions. +<P> diff --git a/dwm.suckless.org/patches/altmovefocus.md b/dwm.suckless.org/patches/altmovefocus.md @@ -0,0 +1,10 @@ +ANOTHER FOCUS MOVING MODEL +========================== + +Description +----------- +When a single tag is displayed, calling view() or tag() with it as an argument is useless. This patch enables moving focus forward with view() calls and backward with tag() instead of doing nothing. Of course, those who toggle several tags at time or just have more than 3-4 tags won't benefit much from such behaviour. + +Download +-------- +* [dwm-5.2-altmovefocus.diff](http://mkmks.org/files/patches/dwm-5.2-altmovefocus.diff) diff --git a/dwm.suckless.org/patches/boldfont.md b/dwm.suckless.org/patches/boldfont.md @@ -0,0 +1,27 @@ +BOLDFONT +======== + +Description +----------- + +This patch makes dwm use a different font (specified as `boldfont` in +`config.h`) for occupied tags, and titles of floating windows. + +It also removes the squares that now mark occupied tags and floating windows. + +Configuration +------------- + + static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; + static const char boldfont[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*"; + +Download +-------- + +- [dwm-5.2-boldfont.diff](http://novsak.name/files/dwm/dwm-5.2-boldfont.diff) +- [dwm-5.1-boldfont.diff](http://novsak.name/files/dwm/dwm-5.1-boldfont.diff) + +Author +------ + +- Luka Novsak <[lukanovsak@gmail.com](mailto:lukanovsak@gmail.com)> diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md @@ -0,0 +1,36 @@ +BOTTOM STACK PATCH +================== + +Description +----------- +This patch provides an additional bottom stack layout for the dwm window manager. (It no longer includes code for 'tileleft' or 'bstacklandscape'.) + +Vertical Stack Tiling: +---------------------- + tile ([]=) + +----------+------+ + | | | + | +------+ + | | | + | +------+ + | | | + | | | + +----------+------+ + +Bottom Stack Tiling: +-------------------- + + bstack (TTT) + +-----------------+ + | | + | | + | | + +-----+-----+-----+ + | | | | + | | | | + +-----+-----+-----+ + +Download +-------- +* [dwm-5.5-bstack.diff](http://bsdgroup.org/files/dwm-5.5-bstack.diff) (2k) (20090307) +* [dwm-5.4-bstack.diff](http://bsdgroup.org/files/dwm-5.4-bstack.diff) (2k) (20081217) diff --git a/dwm.suckless.org/patches/clientspertag.md b/dwm.suckless.org/patches/clientspertag.md @@ -0,0 +1,54 @@ +LIMIT CLIENTS PER TAG PATCH +=========================== + +Last update: 2007-10-25 + +See [nmaster][2] for cpt on dwm-4.6. + +This patch allows you to limit the number of clients to be shown. +This restriction only affects non-floating windows. + +This patch can be used as a 'set' or 'toggle' mode. + +Tips +---- + +* To show all windows put "-1" as argument value. +* To only display floating windows put "0" as argument. +* For a toggling pair put "^2". + +Configuration +------------- + +The MODKEY+w toggles between two visible tiled windows and MODKEY+SHIFT+w hides all tiled windows. + + { MODKEY|ShiftMask, XK_q, clientspertag, "0" }, \ + { MODKEY, XK_q, clientspertag, "^1" }, \ + { MODKEY, XK_w, clientspertag, "^2" }, \ + { MODKEY, XK_e, clientspertag, "^3" }, \ + +Download +-------- + +You can download this patch [dwm-4.4-cpt.patch](http://news.nopcode.org/dwm-4.4-cpt.patch) (3K) + +See [nmaster][1] for dwm-4.6. + +Here's a [patch][2] from <i>Ritesh Kumar</i> that modifies dwm.c to show cpt and total number of clients in the statusbar. + +TODO +---- + +* Maybe it should be renamed to "tiledlimit" or "clientslimit". +* Think about a way to make the focused client always visible (enhaced monocle patch?) + +Feedback is welcome :) + +AUTHOR +------ + +* pancake -- pancake /at/ youterm /dot/ com + +[1]: /dwm/patches/nmaster.html +[2]: http://news.nopcode.org/cptdwm-4.6.diff + diff --git a/dwm.suckless.org/patches/color_status_bar.md b/dwm.suckless.org/patches/color_status_bar.md @@ -0,0 +1,43 @@ +# COLOR STATUS BAR # + +## Description ## + +This patch adds some color to the status bar. It allows you to change the colorset of text portions from "norm" to "sel" (and back) and to invert the colorset (the foreground becomes the background color and vice versa). + + +## Usage ## + +Download the patch and apply it according to the [general instructions](.). The patch will make the following changes: + + * colorstatus.c: adding the file + * dwm.c: adding the include-line for 'colorstatus.c' + * dwm.c ('drawbar' function): adding the int-variable 'stextw' + * dwm.c ('drawbar' function): changing the 'drawtext' section for stext + + +## Configuration ## + +The configuration is done in the file '.xinitrc', where you define the status bar text. You can add the following tags: + + * '[c]' (without quotes): toggles the colorset (norm -> sel or sel -> norm depending on the currently selected colorset) + * '[i]' (without quotes): inverts the current colorset (fgcolor -> bgcolor and bgcolor -> fgcolor) + +The change is applied from the position of the tag onwards. To revert the change you have to set the same tag again. + +### Example ### +echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr + + +## Download ## + + * [dwm-5.2-colorstatus.diff][1] (4.1k, 131 additional lines) (20081117) + * [.xinitrc example][2] (0.8k) (20081117) + + +## Comment ## +If you find any bugs or may improve the code, feel free to do so and push the changes to the wiki. + + +[1]: http://www.suckless.org/dwm/patches/dwm-5.2-colorstatus.diff +[2]: http://www.suckless.org/dwm/patches/dwm-5.2-colorstatus.xinitrc.txt + diff --git a/dwm.suckless.org/patches/colored_status_text.md b/dwm.suckless.org/patches/colored_status_text.md @@ -0,0 +1,66 @@ +# COLORED STATUS TEXT # + +## Description ## + +This patch enables colored text in the status bar. It changes the way colors are defined in config.h, allowing the user to define multiple color combinations for use in their status script. + +## Configuration ## + +Download the patch and apply it according to the [general instructions](.). + +Modify the colors definition in 'config.h' to suit your needs. Make sure to define at least 3 colors as they will be used for 'normal', 'selected', and 'urgent' windows, respectively. + +## Usage ## + +Add code to your status script to output the raw characters '\x03' to switch to the 'urgent' color, or '\x04' to switch to the 4th defined color, etc. Note that the color indices in the status text are +1 from the definition in 'config.h' (because '\0' is the string terminator). To switch back to the normal text color use '\x01'. + +### Example ### + +The following definition in 'config.h': + + #define NUMCOLORS 4 + static const char colors[NUMCOLORS][ColLast][8] = { + // border foreground background + { "#000033", "#dddddd", "#000033" }, // normal + { "#000088", "#ffffff", "#000088" }, // selected + { "#ff0000", "#000000", "#ffff00" }, // urgent/warning (black on yellow) + { "#ff0000", "#ffffff", "#ff0000" }, // error (white on red) + // add more here + }; + +Coupled with a matching status script produces the following: + ![Example Colored Status Text][1] + +A really silly example: + + echo -e "normal \x01 selected \x03 warning/urgent \x04 error \x01 back to normal text" | dwm + +An example status script snippet to take advantage of the colors: + + status="" + if [$batperc -le 10]; then + # use "warning" color + status+="\x03 BAT: $batperc" + elif [$batperc -le 5]; then + # use "error" color + status+="\x04 BAT: $batperc" + else + # default is normal color + status+="BAT: $batperc" + fi + + # switch back to normal color for date + status+="\x01| "+$(date) + + echo -e $status + +## Download ## + + * [dwm-5.3.1-statuscolors.diff][2] + +## Comment ## +If you find any bugs or may improve the code, feel free to do so and push the changes to the wiki. + +[1]: http://www.suckless.org/dwm/patches/dwm-5.3.1-statuscolors.png +[2]: http://www.suckless.org/dwm/patches/dwm-5.3.1-statuscolors.diff + diff --git a/dwm.suckless.org/patches/dwm-5.2-colorstatus.diff b/dwm.suckless.org/patches/dwm-5.2-colorstatus.diff @@ -0,0 +1,183 @@ +diff -up dwm-5.2-original/colorstatus.c dwm-5.2-modified/colorstatus.c +--- /dev/null 2008-11-17 18:12:14.000000000 +0100 ++++ dwm-5.2-modified/colorstatus.c 2008-11-17 18:09:29.000000000 +0100 +@@ -0,0 +1,144 @@ ++int ++drawstatustext(int x) { ++ char cd[] = "[c]", id[] = "[i]"; ++ char buf1[256] = {0}; ++ Bool parse = True; ++ Bool cs = False, is = False; ++ int stextw = 0; ++ ++ strcpy(buf1, stext); ++ while(parse) { ++ char *cp = 0, *ip = 0; ++ ++ cp = strstr(buf1, cd); ++ ip = strstr(buf1, id); ++ if(cp != NULL || ip != NULL) { ++ char buf2[256] = {0}, buf3[256] = {0}; ++ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0; ++ ++ if(cp != NULL) ++ clen2 = cp - buf1; ++ if(ip != NULL) ++ ilen2 = ip - buf1; ++ if(clen2 < 0) { ++ len2 = ilen2; ++ dlen = strlen(id); ++ } ++ else if(ilen2 < 0) { ++ len2 = clen2; ++ dlen = strlen(cd); ++ } ++ else if(clen2 < ilen2) { ++ len2 = clen2; ++ dlen = strlen(cd); ++ } ++ else { ++ len2 = ilen2; ++ dlen = strlen(id); ++ } ++ strncpy(buf2, buf1, len2); ++ offset3 = len2 + dlen; ++ len3 = strlen(buf1) - offset3; ++ strncpy(buf3, buf1 + offset3, len3); ++ if(buf2 != NULL && strlen(buf2) > 0) ++ stextw = stextw + TEXTW(buf2); ++ ++ memset(buf1, '\0', sizeof(buf1)); ++ strcpy(buf1, buf3); ++ } ++ else { ++ stextw = stextw + TEXTW(buf1); ++ parse = False; ++ } ++ } ++ dc.x = ww - stextw; ++ ++ memset(buf1, '\0', sizeof(buf1)); ++ strcpy(buf1, stext); ++ parse = True; ++ while(parse) { ++ char *cp = 0, *ip = 0; ++ ++ cp = strstr(buf1, cd); ++ ip = strstr(buf1, id); ++ if(cp != NULL || ip != NULL) { ++ char buf2[256] = {0}, buf3[256] = {0}; ++ size_t clen2 = -1, ilen2 = -1, len2 = 0, dlen = 0, offset3 = 0, len3 = 0; ++ Bool cs3 = cs, is3 = is; ++ ++ if(cp != NULL) ++ clen2 = cp - buf1; ++ if(ip != NULL) ++ ilen2 = ip - buf1; ++ if(clen2 < 0) { ++ len2 = ilen2; ++ dlen = strlen(id); ++ is3 = !is; ++ } ++ else if(ilen2 < 0) { ++ len2 = clen2; ++ dlen = strlen(cd); ++ cs3 = !cs; ++ } ++ else if(clen2 < ilen2) { ++ len2 = clen2; ++ dlen = strlen(cd); ++ cs3 = !cs; ++ } ++ else { ++ len2 = ilen2; ++ dlen = strlen(id); ++ is3 = !is; ++ } ++ ++ strncpy(buf2, buf1, len2); ++ offset3 = len2 + dlen; ++ len3 = strlen(buf1) - offset3; ++ strncpy(buf3, buf1 + offset3, len3); ++ if(buf2 != NULL && strlen(buf2) > 0) { ++ dc.w = TEXTW(buf2); ++ if(cs) { ++ if(is) ++ drawtext(buf2, dc.sel, True); ++ else ++ drawtext(buf2, dc.sel, False); ++ } ++ else { ++ if(is) ++ drawtext(buf2, dc.norm, True); ++ else ++ drawtext(buf2, dc.norm, False); ++ } ++ dc.x = dc.x + dc.w; ++ } ++ ++ cs = cs3; ++ is = is3; ++ memset(buf1, '\0', sizeof(buf1)); ++ strcpy(buf1, buf3); ++ } ++ else { ++ dc.w = TEXTW(buf1); ++ dc.x = ww - dc.w; ++ if(dc.x < x) { ++ dc.x = x; ++ dc.w = ww - x; ++ } ++ if(cs) { ++ if(is) ++ drawtext(buf1, dc.sel, True); ++ else ++ drawtext(buf1, dc.sel, False); ++ } ++ else { ++ if(is) ++ drawtext(buf1, dc.norm, True); ++ else ++ drawtext(buf1, dc.norm, False); ++ } ++ parse = False; ++ } ++ } ++ ++ return(stextw); ++} +diff -up dwm-5.2-original/dwm.c dwm-5.2-modified/dwm.c +--- dwm-5.2-original/dwm.c 2008-09-09 21:46:17.000000000 +0200 ++++ dwm-5.2-modified/dwm.c 2008-11-17 18:09:29.000000000 +0100 +@@ -239,6 +239,7 @@ static Layout *lt[] = { NULL, NULL }; + static Window root, barwin; + /* configuration, allows nested code to access above variables */ + #include "config.h" ++#include "colorstatus.c" + + /* 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]; }; +@@ -495,6 +496,7 @@ drawbar(void) { + unsigned int i, occ = 0, urg = 0; + unsigned long *col; + Client *c; ++ int stextw = 0; + + for(c = clients; c; c = c->next) { + occ |= c->tags; +@@ -517,13 +519,8 @@ drawbar(void) { + } + else + x = dc.x; +- dc.w = TEXTW(stext); +- dc.x = ww - dc.w; +- if(dc.x < x) { +- dc.x = x; +- dc.w = ww - x; +- } +- drawtext(stext, dc.norm, False); ++ stextw = drawstatustext(x); ++ dc.x = ww - stextw; + if((dc.w = dc.x - x) > bh) { + dc.x = x; + if(sel) { diff --git a/dwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc.txt b/dwm.suckless.org/patches/dwm-5.2-colorstatus.xinitrc.txt @@ -0,0 +1,24 @@ +while true +do + datestr=`date '+%a, %x'` + timestr=`date '+%H:%M'` + + cpuavgload=`uptime | sed -n 's/.*: //; s/, .*// p'` + + batcurrent=`sed -n 's/ mAh//; s/remaining[ a-z:]*// p' /proc/acpi/battery/BAT1/state` + batfull=`sed -n 's/ mAh//; s/last full[ a-z:]*// p' /proc/acpi/battery/BAT1/info` + batpercent=`echo "($batcurrent*100)/$batfull" | bc` + if [ $batpercent -lt 10 ] + then batpercent=`echo [c]$batpercent%[c]` + else batpercent=`echo $batpercent%` + fi + + audiofront=`amixer sget Front | sed -n 's/\] \[[^%]*\]//; s/[ ]*Front Left: Playback [0-9]* \[// p'` + + mailnew=`claws-mail --status inbox | sed -n 's/ [ 0-9ClawsMinotrug\.]*// p'` + + echo -e NEW mail: $mailnew \| VOL front: $audiofront \| BAT:[i]$batpercent[i]\| CPU: $cpuavgload \| $datestr[c]$timestr + + sleep 2 +done | dwm + diff --git a/dwm.suckless.org/patches/dwm-5.2-gaplessgrid.diff b/dwm.suckless.org/patches/dwm-5.2-gaplessgrid.diff @@ -0,0 +1,59 @@ +diff -up dwm-5.2-original/config.def.h dwm-5.2-modified/config.def.h +--- dwm-5.2-original/config.def.h 2008-09-09 21:46:17.000000000 +0200 ++++ dwm-5.2-modified/config.def.h 2008-10-20 20:07:42.000000000 +0200 +@@ -28,11 +28,13 @@ static Rule rules[] = { + static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ + static Bool resizehints = True; /* False means respect size hints in tiled resizals */ + ++#include "gaplessgrid.c" + static Layout layouts[] = { + /* symbol arrange function */ + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "###", gaplessgrid }, + }; + + /* key definitions */ +diff -up dwm-5.2-original/gaplessgrid.c dwm-5.2-modified/gaplessgrid.c +--- /dev/null 2008-10-20 20:09:51.000000000 +0200 ++++ dwm-5.2-modified/gaplessgrid.c 2008-10-20 20:06:59.000000000 +0200 +@@ -0,0 +1,38 @@ ++void ++gaplessgrid() { ++ unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch; ++ Client *c; ++ ++ for(n = 0, c = nexttiled(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 (cell height/width/x/y) */ ++ cw = ww / (cols ? cols : 1); ++ cn = 0; /* current column number */ ++ rn = 0; /* current row number */ ++ for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) { ++ if(i/rows+1 > cols-n%cols) ++ rows = n/cols+1; ++ ch = wh / (rows ? rows : 1); ++ cx = wx + cn*cw; ++ cy = wy + rn*ch; ++ resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, False); ++ ++ i++; ++ rn++; ++ if(rn >= rows) { /* jump to the next column */ ++ rn = 0; ++ cn++; ++ } ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-5.2-monocle_count.diff b/dwm.suckless.org/patches/dwm-5.2-monocle_count.diff @@ -0,0 +1,32 @@ +--- dwm-5.2/dwm.c 2008-09-09 21:46:17.000000000 +0200 ++++ dwm-5.2-monocle_count/dwm.c 2008-10-13 00:04:38.000000000 +0200 +@@ -491,7 +491,8 @@ + + void + drawbar(void) { +- int x; ++ int x, a= 0, s= 0; ++ char posbuf[10]; + unsigned int i, occ = 0, urg = 0; + unsigned long *col; + Client *c; +@@ -517,6 +518,19 @@ + } + else + x = dc.x; ++ if(lt[sellt]->arrange == monocle){ ++ dc.x= x; ++ for(c= nexttiled(clients), a= 0, s= 0; c; c= nexttiled(c->next), a++) ++ if(c == stack) ++ s= a; ++ if(!s && a) ++ s= a; ++ snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a); ++ dc.w= TEXTW(posbuf); ++ drawtext(posbuf, dc.norm, False); ++ x= dc.x + dc.w; ++ } ++ + dc.w = TEXTW(stext); + dc.x = ww - dc.w; + if(dc.x < x) { diff --git a/dwm.suckless.org/patches/dwm-5.2-pertag.diff b/dwm.suckless.org/patches/dwm-5.2-pertag.diff @@ -0,0 +1,123 @@ +--- dwm-5.2/dwm.c 2008-09-09 21:46:17.000000000 +0200 ++++ dwm-5.2-pertag/dwm.c 2008-10-12 23:53:30.000000000 +0200 +@@ -240,6 +240,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]; }; + +@@ -1272,7 +1277,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 +@@ -1289,7 +1294,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(); + } + +@@ -1337,12 +1342,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; +@@ -1457,7 +1477,7 @@ + + void + togglebar(const Arg *arg) { +- showbar = !showbar; ++ showbar = showbars[curtag] = !showbar; + updategeom(); + updatebar(); + arrange(); +@@ -1490,9 +1510,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(); + } +@@ -1661,11 +1695,28 @@ + + void + view(const Arg *arg) { ++ unsigned int i; + if((arg->ui & TAGMASK) == tagset[seltags]) + return; + seltags ^= 1; /* toggle sel tagset */ +- if(arg->ui & TAGMASK) ++ if(arg->ui & TAGMASK) { + tagset[seltags] = arg->ui & 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/dwm-5.3.1-statuscolors.diff b/dwm.suckless.org/patches/dwm-5.3.1-statuscolors.diff @@ -0,0 +1,228 @@ +diff -r 94032e7d3943 config.def.h +--- a/config.def.h Sat Dec 06 11:22:30 2008 +0000 ++++ b/config.def.h Sat Dec 06 11:24:26 2008 -0500 +@@ -1,13 +1,16 @@ + /* See LICENSE file for copyright and license details. */ + + /* appearance */ ++#define NUMCOLORS 4 // need at least 3 ++static const char colors[NUMCOLORS][ColLast][8] = { ++ // border foreground background ++ { "#cccccc", "#000000", "#cccccc" }, // 0 = normal ++ { "#0066ff", "#ffffff", "#0066ff" }, // 1 = selected ++ { "#0066ff", "#0066ff", "#ffffff" }, // 2 = urgent/warning ++ { "#ff0000", "#ffffff", "#ff0000" }, // 3 = error ++ // add more here ++}; + static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; +-static const char normbordercolor[] = "#cccccc"; +-static const char normbgcolor[] = "#cccccc"; +-static const char normfgcolor[] = "#000000"; +-static const char selbordercolor[] = "#0066ff"; +-static const char selbgcolor[] = "#0066ff"; +-static const char selfgcolor[] = "#ffffff"; + static unsigned int borderpx = 1; /* border pixel of windows */ + static unsigned int snap = 32; /* snap pixel */ + static Bool showbar = True; /* False means no bar */ +@@ -49,7 +52,7 @@ + #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } + + /* commands */ +-static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; ++static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL }; + static const char *termcmd[] = { "uxterm", NULL }; + + static Key keys[] = { +diff -r 94032e7d3943 dwm.c +--- a/dwm.c Sat Dec 06 11:22:30 2008 +0000 ++++ b/dwm.c Sat Dec 06 11:24:26 2008 -0500 +@@ -52,6 +52,7 @@ + #define MAX(a, b) ((a) > (b) ? (a) : (b)) + #define MIN(a, b) ((a) < (b) ? (a) : (b)) + #define MAXTAGLEN 16 ++#define MAXCOLORS 8 + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) + #define WIDTH(x) ((x)->w + 2 * (x)->bw) + #define HEIGHT(x) ((x)->h + 2 * (x)->bw) +@@ -97,8 +98,7 @@ + + typedef struct { + int x, y, w, h; +- unsigned long norm[ColLast]; +- unsigned long sel[ColLast]; ++ unsigned long colors[MAXCOLORS][ColLast]; + Drawable drawable; + GC gc; + struct { +@@ -147,8 +147,9 @@ + static void detachstack(Client *c); + static void die(const char *errstr, ...); + static void drawbar(void); +-static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]); +-static void drawtext(const char *text, unsigned long col[ColLast], Bool invert); ++static void drawcoloredtext(char *text); ++static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]); ++static void drawtext(const char *text, unsigned long col[ColLast], Bool pad); + static void enternotify(XEvent *e); + static void expose(XEvent *e); + static void focus(Client *c); +@@ -501,14 +502,14 @@ + dc.x = 0; + for(i = 0; i < LENGTH(tags); i++) { + dc.w = TEXTW(tags[i]); +- col = tagset[seltags] & 1 << i ? dc.sel : dc.norm; +- drawtext(tags[i], col, urg & 1 << i); +- drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, urg & 1 << i, col); ++ col = dc.colors[ (tagset[seltags] & 1 << i ? 1 : (urg & 1 << i ? 2:0)) ]; ++ drawtext(tags[i], col, True); ++ drawsquare(sel && sel->tags & 1 << i, occ & 1 << i, col); + dc.x += dc.w; + } + if(blw > 0) { + dc.w = blw; +- drawtext(lt[sellt]->symbol, dc.norm, False); ++ drawtext(lt[sellt]->symbol, dc.colors[0], True); + x = dc.x + dc.w; + } + else +@@ -519,27 +520,57 @@ + dc.x = x; + dc.w = ww - x; + } +- drawtext(stext, dc.norm, False); ++ drawcoloredtext(stext); + if((dc.w = dc.x - x) > bh) { + dc.x = x; + if(sel) { +- drawtext(sel->name, dc.sel, False); +- drawsquare(sel->isfixed, sel->isfloating, False, dc.sel); ++ drawtext(sel->name, dc.colors[1], True); ++ drawsquare(sel->isfixed, sel->isfloating, dc.colors[1]); + } + else +- drawtext(NULL, dc.norm, False); ++ drawtext(NULL, dc.colors[0], True); + } + XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, ww, bh, 0, 0); + XSync(dpy, False); + } + + void +-drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) { ++drawcoloredtext(char *text) { ++ Bool first=True; ++ char *buf = text, *ptr = buf, c = 1; ++ unsigned long *col = dc.colors[0]; ++ int i, ox = dc.x; ++ ++ while( *ptr ) { ++ for( i = 0; *ptr < 0 || *ptr > NUMCOLORS; i++, ptr++); ++ if( !*ptr ) break; ++ c=*ptr; ++ *ptr=0; ++ if( i ) { ++ dc.w = ww - dc.x; ++ drawtext(buf, col, first); ++ dc.x += textnw(buf, i) + textnw(&c,1); ++ if( first ) dc.x += ( dc.font.ascent + dc.font.descent ) / 2; ++ first = False; ++ } else if( first ) { ++ ox = dc.x += textnw(&c,1); ++ } ++ *ptr = c; ++ col = dc.colors[ c-1 ]; ++ buf = ++ptr; ++ } ++ if( !first ) dc.x-=(dc.font.ascent+dc.font.descent)/2; ++ drawtext(buf, col, True); ++ dc.x = ox; ++} ++ ++void ++drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { + int x; + XGCValues gcv; + XRectangle r = { dc.x, dc.y, dc.w, dc.h }; + +- gcv.foreground = col[invert ? ColBG : ColFG]; ++ gcv.foreground = col[ ColFG ]; + XChangeGC(dpy, dc.gc, GCForeground, &gcv); + x = (dc.font.ascent + dc.font.descent + 2) / 4; + r.x = dc.x + 1; +@@ -555,18 +586,18 @@ + } + + void +-drawtext(const char *text, unsigned long col[ColLast], Bool invert) { ++drawtext(const char *text, unsigned long col[ColLast], Bool pad) { + char buf[256]; + int i, x, y, h, len, olen; + XRectangle r = { dc.x, dc.y, dc.w, dc.h }; + +- XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]); ++ XSetForeground(dpy, dc.gc, col[ ColBG ]); + XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1); + if(!text) + return; + olen = strlen(text); +- h = dc.font.ascent + dc.font.descent; +- y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent; ++ h = pad ? (dc.font.ascent + dc.font.descent) : 0; ++ y = dc.y + ((dc.h + dc.font.ascent - dc.font.descent) / 2); + x = dc.x + (h / 2); + /* shorten text if necessary */ + for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--); +@@ -575,7 +606,7 @@ + memcpy(buf, text, len); + if(len < olen) + for(i = len; i && i > len - 3; buf[--i] = '.'); +- XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]); ++ XSetForeground(dpy, dc.gc, col[ ColFG ]); + if(dc.font.set) + XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len); + else +@@ -609,7 +640,7 @@ + for(c = stack; c && !ISVISIBLE(c); c = c->snext); + if(sel && sel != c) { + grabbuttons(sel, False); +- XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); ++ XSetWindowBorder(dpy, sel->win, dc.colors[0][ColBorder]); + } + if(c) { + if(c->isurgent) +@@ -617,7 +648,7 @@ + detachstack(c); + attachstack(c); + grabbuttons(c, True); +- XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); ++ XSetWindowBorder(dpy, c->win, dc.colors[1][ColBorder]); + XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); + } + else +@@ -878,7 +909,7 @@ + + wc.border_width = c->bw; + XConfigureWindow(dpy, w, CWBorderWidth, &wc); +- XSetWindowBorder(dpy, w, dc.norm[ColBorder]); ++ XSetWindowBorder(dpy, w, dc.colors[0][ColBorder]); + configure(c); /* propagates border_width, if size doesn't change */ + updatesizehints(c); + XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); +@@ -1329,12 +1360,11 @@ + cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); + + /* init appearance */ +- dc.norm[ColBorder] = getcolor(normbordercolor); +- dc.norm[ColBG] = getcolor(normbgcolor); +- dc.norm[ColFG] = getcolor(normfgcolor); +- dc.sel[ColBorder] = getcolor(selbordercolor); +- dc.sel[ColBG] = getcolor(selbgcolor); +- dc.sel[ColFG] = getcolor(selfgcolor); ++ for(i=0; i<NUMCOLORS; i++) { ++ dc.colors[i][ColBorder] = getcolor( colors[i][ColBorder] ); ++ dc.colors[i][ColFG] = getcolor( colors[i][ColFG] ); ++ dc.colors[i][ColBG] = getcolor( colors[i][ColBG] ); ++ } + dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen)); + dc.gc = XCreateGC(dpy, root, 0, 0); + XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); diff --git a/dwm.suckless.org/patches/dwm-5.3.1-statuscolors.png b/dwm.suckless.org/patches/dwm-5.3.1-statuscolors.png Binary files differ. diff --git a/dwm.suckless.org/patches/fibonacci.md b/dwm.suckless.org/patches/fibonacci.md @@ -0,0 +1,58 @@ +# FIBONACCI LAYOUTS + +## Description + +This patch adds two new layouts (`spiral` and `dwindle`) that arranges all +windows in Fibonacci tiles: The first window uses half the screen, the second +the half of the remainder, etc. ASCII art and a real screenshot of the spiral +arrangement can be seen below. + + +-----------+-----------+ +-----------+-----------+ + | | | | | | + | | 2 | | | 2 | + | | | | | | + | 1 +--+--+-----+ | 1 +-----+-----+ + | | 5|-.| | | | | 4 | + | +--+--+ 3 | | | 3 +--+--+ + | | 4 | | | | | 5|-.| + +-----------+-----+-----+ +-----------+-----+-----+ + spiral dwindle + +[![dwm in spiral layout.][1]][2] + +*Links2, sic, xterm & xclock in spiral layout.* + +## Usage + + 1. Download the patch and apply according to the [general instructions](.). + 2. Include the `fibonacci.c` source file and add `spiral` and/or `dwindle` to + the `Layout` section of your `config.h` file. + Example from `config.default.h`: + + #include "fibonacci.c" + static Layout layout[] = { \ + /* symbol function */ \ + { "[]=", tile }, /* first entry is default */ \ + { "><>", floating }, \ + { "(@)", spiral }, \ + { "[\\]", dwindle }, \ + }; + +## Download + + * [dwm-5.2-fibonacci.diff][5] (1.9k) (20081003) + * [dwm-5.1-fibonacci.diff][3] (1.9k) (20080731) + +## Author + + * Jeroen Schot - <schot@a-eskwadraat.nl> + +Joe Thornber's spiral tiling for [Xmonad][4] formed the inspiration for this +patch. Thanks to Jan Christoph Ebersbach for updating this patch for versions +4.5 to 4.9. + +[1]: http://schot.a-eskwadraat.nl/images/dwm-spiral_small.png +[2]: http://schot.a-eskwadraat.nl/images/dwm-spiral.png +[3]: http://schot.a-eskwadraat.nl/files/dwm-5.1-fibonacci.diff +[4]: http://www.xmonad.org +[5]: http://www.aplusbi.com/dwm/dwm-5.2-fibonacci.diff diff --git a/dwm.suckless.org/patches/float_border_color.md b/dwm.suckless.org/patches/float_border_color.md @@ -0,0 +1,19 @@ +# FLOAT BORDER COLOR # + +## Description ## + +This patch allows you to specify a different border color for floating windows. + +## Download ## + * [dwm-5.0-float-border-color2.diff][3] + * [dwm-4.6-float-border-color2.diff][2] + * [dwm-4.5-float-border-color2.diff][1] + +## Author ## + * Message-ID: <20070626093131.GA5005@shota.mine.nu> + * Updated by Jan Christoph Ebersbach - <jceb@tzi.de> + +[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-float-border-color2.diff +[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-float-border-color2.diff +[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-float-border-color2.diff + diff --git a/dwm.suckless.org/patches/gapless_grid.md b/dwm.suckless.org/patches/gapless_grid.md @@ -0,0 +1,32 @@ +# GAPLESS GRID LAYOUT # + +## Description ## + +This patch is similar to [gridmode][1] (in fact it is an altered version) in that it provides a layout for dwm, which arranges the windows in a grid. Though instead of using a regular grid, which in case leaves empty cells (e. g. with 3 windows there are 4 cells, one cell is empty), it uses the same number of columns, but adjusts the number of rows (at first x rows and (x+1) rows, when needed) leaving no empty cells. + + +## Usage ## + +Download the patch and apply it according to the [general instructions](.). The patch will make the following changes: + + - gaplessgrid.c: adding the file + - config.def.h: adding the include-line for 'gaplessgrid.c' + - config.def.h: adding the layout '"###", gaplessgrid' + +Comment: There may be problems applying the patch, if another layout has been added before. + + +## Configuration ## + + * Transfer the changes made by the patch in 'config.def.h' to 'config.h', if needed. + * Add a key definition like '{ MODKEY, XK_g, setlayout, {.v = &layouts[3]} },'. + + +## Download ## + + * [dwm-5.2-gaplessgrid.diff][2] (1.9k) (20081020) + + +[1]: /dwm/patches/gridmode.html +[2]: http://www.suckless.org/dwm/patches/dwm-5.2-gaplessgrid.diff + diff --git a/dwm.suckless.org/patches/gridmode.md b/dwm.suckless.org/patches/gridmode.md @@ -0,0 +1,48 @@ +# GRIDMODE PATCH # + +## Description ## + +This patch adds an extra layout mode to dwm called `grid` in which the windows are arranged in a grid of windows of equal sizes. It comes very in handy especially with tools that operate on multiple windows at once such Cluster SSH. + +## Usage ## + +Add a grid-symbol to your `config.h` file. + +## Screenshots ## + +[Grid mode][5] (it also includes a minor patch to make dwm more colourful :D) + +## Download ## + * [dwm-5.2-gridmode.diff][11] + * [dwm-5.0-gridmode.diff][10] + * [dwm-4.7-gridmode.diff][9] + * [dwm-4.6-gridmode.diff][8] + * [dwm-4.5-gridmode.diff][7] + * [dwm-4.4.1-gridmode.diff][6] + * [dwm-4.3-gridmode.diff][4] + * [dwm-4.0-gridmode.diff][3] + * [dwm-3.9-gridmode.diff][2] + * [dwm-3.8-gridmode.diff][1] + +## Author ## + + * Alexandru E. Ungur <grid@rb.no-ip.biz> + * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> + * Updated to 5.2 & small fix by V4hn - v4hn.de +Feedback is more than welcome :-) + +## Acknowledgments ## + +The patch would look a lot uglier without Jukka Salmi's constant help. Thanks Jukka :-) + +[1]: http://dwm.slax.no-ip.biz/dwm-3.8-gridmode.diff +[2]: http://dwm.slax.no-ip.biz/dwm-3.9-gridmode.diff +[3]: http://dwm.slax.no-ip.biz/dwm-4.0-gridmode.diff +[4]: http://dwm.slax.no-ip.biz/dwm-4.3-gridmode.diff +[5]: http://dwm.slax.no-ip.biz/dwm4.3.png +[6]: http://schot.a-eskwadraat.nl/files/dwm-4.4.1-gridmode.diff +[7]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-gridmode.diff +[8]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-gridmode.diff +[9]: http://www.e-jc.de/dwm/4.7/current/dwm-4.7-gridmode.diff +[10]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-gridmode.diff +[11]: http://www.v4hn.de/patches/dwm-5.2-gridmode.diff diff --git a/dwm.suckless.org/patches/index.md b/dwm.suckless.org/patches/index.md @@ -0,0 +1,54 @@ +PATCHES +======= + +diff generation +--------------- +For mercurial users: + + cd dwm-directory + hg 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 mercurial users: + + cd dwm-directory + hg patch path/to/patch.diff + +For tarballs: + + cd dwm-directory + patch -p1 < path/to/patch.diff + + +offsite patches +--------------- +* [dwm-meillo](http://prog.marmaro.de/dwm-meillo/) +* [patches written by InfinityX](http://flash.metawaredesign.co.uk/4/) +* [polachok](http://koluthcka.ru/fwm/projects.html) +* [displaydate](http://henry.precheur.org/2008/8/25/Switching%20to%20dwm.html) + + +external repositories / related projects +---------------------------------------- +* [awesome](http://awesome.naquadah.org/) +* [awm](http://www.freaknet.org/alpt/src/alpt-wm/readme) +* [bwm](http://www.suckless.org/pipermail/dwm/2007-August/003088.html) +* [bug.n](http://freenet-homepage.de/bug.n/) +* [DWM-Hacked](http://sourceforge.net/projects/dwm-hacked/) -- A compilation of all the DWM hacks that I could find +* [dwm-gtx](http://s01.de/~gottox/index.cgi/proj_dwm) +* [dwm-mitch](http://www.cgarbs.de/dwm-mitch.en.html) +* [dwm-pancake](http://news.nopcode.org/miau/pvc.cgi?prj=dwm) +* [dwm-rfigura](http://spuerwerk.dyndns.org/~rfigura/dwm) +* [echinus](http://koluthcka.ru/fwm) +* [fnegronidwm](http://sharesource.org/project/fnegronidwm/wiki/) +* [scrotwm](http://www.peereboom.us/scrotwm/html/scrotwm.html) +* [xmonad](http://www.xmonad.org/) diff --git a/dwm.suckless.org/patches/monocle_count.md b/dwm.suckless.org/patches/monocle_count.md @@ -0,0 +1,12 @@ +MONOCLE STACK COUNT +==================== + +Description +----------- +This patch provides a count of the number of stacks as well as the number of the current windows in the stack. +This count is displayed in the statusbar as [CURRENT/TOTAL], e.g. [1/5], only when the monocle layout has been chosen. + +Download +-------- +* [dwm-5.2-monocle_count.diff](http://www.suckless.org/dwm/patches/dwm-5.2-monocle_count.diff) +* [dwm-5.1-monocle_count.diff](http://v4hn.de/patches/dwm-5.1-monocle_count.diff) diff --git a/dwm.suckless.org/patches/mouseontitle.md b/dwm.suckless.org/patches/mouseontitle.md @@ -0,0 +1,33 @@ +MOUSE EVENTS ON TITLE +===================== + +Last update: 2007-10-25 + +Adds mouse events on the title bar to switch between clients using +the mouse wheel and using the left click to zoom, right click kill +and middle click for toggling the floating. + +This way you can easily manage tiled clients with the mouse. + +The right click on the layout area maximizes the client. + +If you are using the nmaster patch you will be able to change the nmaster value using the mouse wheel. + +Change the mwfact using the wheel at x=0 placing the cursor inside the bar. + +Patch +----- + +Latest patch for [dwm 4.7][2] is here. +For [dwm 4.6][1] take this one. + +See in event.c at function 'buttonpress()' to patch older dwm releases. + +AUTHOR +------ + +* pancake &lt;youterm.com&gt; + +[1]:http://news.nopcode.org/mouseontitle-4.6.diff +[2]:http://news.nopcode.org/mouseontitle-4.7.diff + diff --git a/dwm.suckless.org/patches/moveresize.md b/dwm.suckless.org/patches/moveresize.md @@ -0,0 +1,64 @@ +MOVE RESIZE AND MAXIMIZE VERTICAL/HORIZONTAL PATCH +================================================== + +Description +----------- +These patches provide helper functions for moving and resizing floating windows using keybindings. + +Configuration +------------- +This is a sample 'hjkl'-style configuration: + + { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \ + { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \ + { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \ + { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \ + { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \ + { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \ + { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \ + { MODKEY|ControlMask, XK_k, moveresize, "0x 15Y 0w 0h" }, \ + { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \ + { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \ + { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \ + { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \ + { MODKEY|ControlMask|ShiftMask, XK_h, togglehorizontalmax, NULL }, \ + { MODKEY|ControlMask|ShiftMask, XK_l, togglehorizontalmax, NULL }, \ + { MODKEY|ControlMask|ShiftMask, XK_j, toggleverticalmax, NULL }, \ + { MODKEY|ControlMask|ShiftMask, XK_k, toggleverticalmax, NULL }, \ + +Download +-------- + +5.0 + + * [dwm-5.0-moveresize.diff][7] + * [dwm-5.0-maximize_vert_horz.diff][8] + +4.6 + + * [dwm-4.6-moveresize.diff][5] + * [dwm-4.6-maximize_vert_horz.diff][6] + +4.5 + + * [dwm-4.5-moveresize.diff][3] + * [dwm-4.5-maximize_vert_horz.diff][4] + +4.4 + + * [dwm-4.4-moveresize.diff][1] + * [dwm-4.4-maximize_vert_horz.diff][2] + +Author +------ + * Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/dwm-4.4-moveresize.diff +[2]: http://www.e-jc.de/dwm/dwm-4.4-maximize_vert_horz.diff +[3]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-moveresize.diff +[4]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-maximize_vert_horz.diff +[5]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-moveresize.diff +[6]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-maximize_vert_horz.diff +[7]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-moveresize.diff +[8]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-maximize_vert_horz.diff + diff --git a/dwm.suckless.org/patches/nmaster.md b/dwm.suckless.org/patches/nmaster.md @@ -0,0 +1,56 @@ +# NMASTER PATCH + +## Description + +This patch restores the ability to have multiple clients in the master area of the tiled layout. +This feature was dropped from vanilla dwm in version 4.4. + +See [nmaster.c][1] header documentation for installing this patch with tilecols and clientspertag for dwm 4.6. + + ntile (-|=) + +----------+------+ + | | | + | +------+ + |----------| | + | +------+ + | | | + +----------+------+ + +NOTE: The nmaster.c (patch for dwm 4.6) mixes the clientspertag patch together with another layout called tilecols. + +## Usage + + 1. Download the patch and apply according to the [general instructions](.). + 2. Add the `NMASTER` value to your `config.h`. + Example from `config.default.h`: + + #define NMASTER 2 /* clients in master area*/ + + 3. Add keybindings to `incmaster()` to your `config.h`. + Example from `config.default.h`: + + { MODKEY|ShiftMask, XK_k, incnmaster, "-1" }, \ + { MODKEY|ShiftMask, XK_j, incnmaster, "1" }, \ + +The nmaster patch for dwm 4.6 (current development hg branch) installation is far more simple. +Installation instructions are placed on the top of the .c file. + +The nmaster patch for dwm 4.6 adds two new layouts called ntile (classic) and dntile (dinamic). + +## Download + + * [nmaster-4.7.c][4] (dwm 4.7) (7.3kb (20071123) + * [nmaster.c][3] (dwm 4.6) (7.3kb) (20071025) + - contains ntile, dntile and tilecols. Also supports the clients-per-tag + * [nmaster-4.5.diff][2] (dwm 4.5) (2.7kb) (20071016) + * [dwm-4.4.1-nmaster.diff][1] (dwm 4.4) (2.8kb) (20070826) + +[1]: http://schot.a-eskwadraat.nl/files/dwm-4.4.1-nmaster.diff +[2]: http://news.nopcode.org/nmaster-4.5.patch +[3]: http://news.nopcode.org/nmaster.c +[4]: http://news.nopcode.org/nmaster-4.7.c + +## Maintainer + + * pancake &lt;youterm.com&gt; + diff --git a/dwm.suckless.org/patches/pertag.md b/dwm.suckless.org/patches/pertag.md @@ -0,0 +1,25 @@ +# PERTAG # + +## Description ## + +More general approach of [taglayouts patch][3]. The patch keeps layout, mwfact, barpos and nmaster (if +installed) per tag. + +## Download ## + * [dwm-5.2-pertag.diff][6] + * [dwm-5.1-pertag.diff][5] + * [dwm-5.0-pertag.diff][4] + * [dwm-4.6-pertag.diff][1] + * [dwm-4.6-pertag_nmaster.diff][2] + +## Author ## + + * Jan Christoph Ebersbach - <jceb@e-jc.de> + * Updated by V4hn - v4hn.de + +[1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff +[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff +[3]: /dwm/patches/taglayouts.html +[4]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-pertag.diff +[5]: http://v4hn.de/patches/dwm-5.1-pertag.diff +[6]: http://www.suckless.org/dwm/patches/dwm-5.2-pertag.diff diff --git a/dwm.suckless.org/patches/push-5.3.c b/dwm.suckless.org/patches/push-5.3.c @@ -0,0 +1,56 @@ +static Client * +prevtiled(Client *c) { + Client *p, *r; + + for(p = clients, r = NULL; p && p != c; p = p->next) + if(!p->isfloating && ISVISIBLE(p)) + r = p; + return r; +} + +static void +pushup(const Arg *arg) { + Client *c; + + if(!sel || sel->isfloating) + return; + if((c = prevtiled(sel))) { + /* attach before c */ + detach(sel); + sel->next = c; + if(clients == c) + clients = sel; + else { + for(c = 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(); +} + +static void +pushdown(const Arg *arg) { + Client *c; + + if(!sel || sel->isfloating) + return; + if((c = nexttiled(sel->next))) { + /* attach after c */ + detach(sel); + sel->next = c->next; + c->next = sel; + } else { + /* move to the front */ + detach(sel); + attach(sel); + } + focus(sel); + arrange(); +} diff --git a/dwm.suckless.org/patches/push.md b/dwm.suckless.org/patches/push.md @@ -0,0 +1,16 @@ +# PUSH UP/DOWN + +## Description + +This patch provides a way to move clients position inside the clients list. + + #include "push-5.3.c" + + { MODKEY|ControlMask, XK_j, pushdown, NULL }, \ + { MODKEY|ControlMask, XK_k, pushup, NULL }, \ + +## Download + + * [push-5.3.c] (2K) (20090124) + * [push-4.7.c](http://news.nopcode.org/push-4.7.c) (2K) (20071202) + diff --git a/dwm.suckless.org/patches/raiselower.md b/dwm.suckless.org/patches/raiselower.md @@ -0,0 +1,15 @@ +# RAISELOWER # + +## Description ## + +This patch enables you to raise or lower the selected floating window. + +## Download ## + * [dwm-5.0-raiselower.diff][1] + +## Author ## + + * Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-raiselower.diff + diff --git a/dwm.suckless.org/patches/save_floates.md b/dwm.suckless.org/patches/save_floates.md @@ -0,0 +1,25 @@ +# SAVE FLOATS PATCH # + +## Description ## + +This patch saves size and position of every floating window before it is forced +into tiled mode. If the window is made floating again, the old dimensions will +be restored. + + * Recently it became part of the main distribution of dwm. + +## Download ## + * [dwm-5.0-save_floats.diff][4] + * [dwm-4.6-save_floats.diff][3] + * [dwm-4.5-save_floats.diff][2] + * [dwm-4.4-save_floats.diff][1] + +## Author ## + * http://nymu.net/patches + * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/dwm-4.4-save_floats.diff +[2]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-save_floats.diff +[3]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-save_floats.diff +[4]: http://www.e-jc.de/dwm/5.0/fb1833284e4b/dwm-5.0-save_floats.diff + diff --git a/dwm.suckless.org/patches/tagall.md b/dwm.suckless.org/patches/tagall.md @@ -0,0 +1,32 @@ +# TAG ALL # + +## Description ## + +Shortcut to move all (floating) windows from one tag to another. + +## Download ## + * [dwm-5.0-tagall.diff][3] + * [dwm-4.6-tagall.diff][2] + * [dwm-4.5-tagall.diff][1] + +## Configuration ## + + * MODKEY+Shift+F1 moves all floating windows of the current tag to tag 1 + + { MODKEY|ShiftMask, XK_F1, tagall, "F1" }, \ + ... + { MODKEY|ShiftMask, XK_F9, tagall, "F9" }, \ + + * MODKEY+Shift+F1 moves all windows of the current tag to tag 1 + + { MODKEY|ShiftMask, XK_F1, tagall, "1" }, \ + ... + { MODKEY|ShiftMask, XK_F9, tagall, "9" }, \ + +## Author ## + * Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-tagall.diff +[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-tagall.diff +[3]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-tagall.diff + diff --git a/dwm.suckless.org/patches/taglayouts.md b/dwm.suckless.org/patches/taglayouts.md @@ -0,0 +1,27 @@ +# TAGLAYOUTS # + +## Description ## + +This patch enables one layout per tag in contrast of one layout for all tags. - A more general approach is the [pertag patch][4]. + +## Download ## + * [taglayouts-4.6.diff][3] - static implementation of taglayouts (saves 7 LOCs) + * [dwm-4.6-taglayouts.diff][2] + * [dwm-4.5-taglayouts.diff][1] + +## Known Bugs ## + + * If you had selected multiple tags and try to get back to them with the + viewprevtag method, keep in mind that the layout of the FIRST tag is used, + that was previously selected. + +## Author ## + + * http://na.srck.net/dwm + * Updated by Jan Christoph Ebersbach - <jceb@e-jc.de> + +[1]: http://www.e-jc.de/dwm/4.5/dwm-4.5-tip_ac233c362502-taglayouts.diff +[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-taglayouts.diff +[3]: http://news.nopcode.org/taglayouts-4.6.diff +[4]: /dwm/patches/pertag.html + diff --git a/dwm.suckless.org/patches/workspaces.md b/dwm.suckless.org/patches/workspaces.md @@ -0,0 +1,85 @@ +Workspaces +========== + +*by [Jesus Galan (yiyus)](mailto:yiyu dot jgl at gmail>) (aug 30 21:41:42 CEST 2008)* + +Adds to dwm the functionality of remembering tagset, layout and mfact for a given number of workspaces. You can also define preconfigured workspaces. + +Code +---- + +Insert this code before your keys definitions in config.h or in an included .c file: + + typedef struct Workspace Workspace; + struct Workspace { + unsigned int tagset; + Layout *lt; + float mfact; + }; + + static Workspace workspaces[] = { + /* tagset layout fact */ + { (1 << 0), &layouts[0], 0.55}, + { (1 << 0) | (1<< 8), &layouts[0], 0.75}, + { (1 << 0) | (1<< 1) | (1<< 8), &layouts[1], 0}, + { (1<< 8), &layouts[2], 0}, + }; + + static unsigned int ws = 0; + + static void + setws(int nws) { + workspaces[ws].tagset = tagset[seltags]; + workspaces[ws].lt = lt[sellt]; + workspaces[ws].mfact = (workspaces[ws].lt == &layouts[0]) ? mfact : 0; + if(nws < LENGTH(workspaces)) + ws = nws; + if(workspaces[ws].tagset) { + tagset[seltags] = workspaces[ws].tagset; + lt[sellt] = workspaces[ws].lt; + if(workspaces[ws].mfact != 0) + mfact = workspaces[ws].mfact; + arrange(); + } + } + + static void + prevws(const Arg *arg) { + setws((ws == 0) ? LENGTH(workspaces) - 1 : ws - 1); + } + + static void + nextws(const Arg *arg) { + setws((ws == LENGTH(workspaces) - 1) ? 0 : ws + 1); + } + +And then, you can define keys: + + { MODKEY, XK_Tab, nextws, {0} }, + { MODKEY|ShiftMask, XK_Tab, prevws, {0} }, + +Or mouse buttons: + + { ClkTagBar, 0, Button4, prevws, {0} }, + { ClkTagBar, 0, Button5, nextws, {0} }, + +Comments +-------- + +It is so easy to change the viewed tags, layout and mfact in dwm than having artifacts to remember them are not neccesary, this patch is just an example of how it could be implemented, but it won't be updated for future releases. + +It should be easy to add to the workspaces the possibility to remember bar position too. + +It is not necessary to define all your workspaces (or any of them). You can perfectly do: + + static Workspace workspaces[16] = { + /* tagset layout fact */ + { (1 << 0), &layouts[0], 0.55}, + { (1 << 0) | (1<< 8), &layouts[0], 0.75}, + }; + +or: + + static Workspace workspaces[16]; + + diff --git a/dwm.suckless.org/screenshots/dwm-20070930.png b/dwm.suckless.org/screenshots/dwm-20070930.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/dwm-20070930s.png b/dwm.suckless.org/screenshots/dwm-20070930s.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/dwm-20080717.png b/dwm.suckless.org/screenshots/dwm-20080717.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/dwm-20080717s.png b/dwm.suckless.org/screenshots/dwm-20080717s.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/dwm-20080720.png b/dwm.suckless.org/screenshots/dwm-20080720.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/dwm-20080720s.png b/dwm.suckless.org/screenshots/dwm-20080720s.png Binary files differ. diff --git a/dwm.suckless.org/screenshots/index.md b/dwm.suckless.org/screenshots/index.md @@ -0,0 +1,5 @@ +[![Screenshot](/dwm/screenshots/dwm-20070930s.png)](/dwm/screenshots/dwm-20070930.png) + +[![Screenshot](/dwm/screenshots/dwm-20080717s.png)](/dwm/screenshots/dwm-20080717.png) + +[![Screenshot](/dwm/screenshots/dwm-20080720s.png)](/dwm/screenshots/dwm-20080720.png) diff --git a/dwm.suckless.org/tutorial.md b/dwm.suckless.org/tutorial.md @@ -0,0 +1,43 @@ +Tutorial following the default binds specified in the header file [config.def.h](http://code.suckless.org/hg/dwm/file/tip/config.def.h). + + [Shift]+[Alt]+[Enter] - launch terminal + [Alt]+[p] - dmenu for running program like x-www-browser + +By default there are 9 tags. You can think of them as workspaces, though +pedantically they are tags. + +Launch a few terminals and dwm will tile the windows between the **master** and +**stack**. A new terminal appears on the **master** window. Existing windows +are pushed upon a **stack** to the right of the screen. `[Alt]+[Enter]` toggles +windows between master and stack. + +To move a terminal pane/tile/window to another tag you select the window by +hovering over the window. Then execute the bind `[Shift]+[Alt]+[2]` to move the +window to the 2 tag. `[Alt]+[2]` moves your focus to tag 2. + +As stated in the [manpage](manpage.html#lbAG) you can click tags with the left +mouse button and simulating `[Alt]+[tag number]`, but you can also click an +other tag with the right mouse button in order to bring those windows additionally +into your current focus. + +To kill a window: + + [Shift]+[Alt]+[c] + +By default dwm is in **tiled** layout mode. Ensure it is tiled mode with: + + [Alt]+[t] + +You should also notice the `[]=` symbol between the tag numbers and the title bar. + +dwm has two further layout modes, **floating** `><>` `[Alt]+[f]` and +**monocle** `[M]` `[Alt]+[m]`. Monocle is good for ensuring a window is kept +maximised and focused. This is useful in web kiosk environments and watching +flash videos. + +Floating layout will be familiar to Windows users. Use `[Alt]+[mouse button]` to +move or resize a window. + +To quit dwm cleanly: + + [Shift]+[Alt]+[q] diff --git a/libs.suckless.org/_werc/config b/libs.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=libs.suckless.org +siteTitle='libs' +siteSubTitle='suckless libraries' diff --git a/libs.suckless.org/_werc/lib/footer.inc b/libs.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/libs.suckless.org/_werc/lib/top_bar.inc b/libs.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> + <a href="http://www.suckless.org/dl">download</a> + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> | + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/libs.suckless.org/_werc/pub/style.css b/libs.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/libs.suckless.org/index.md b/libs.suckless.org/index.md @@ -0,0 +1,3 @@ +LIBS +==== +This directory contains the libraries which have been created by the suckless community during the time. diff --git a/libs.suckless.org/libixp.md b/libs.suckless.org/libixp.md @@ -0,0 +1,19 @@ +LIBIXP +====== +`libixp` is a stand-alone client/server [9P](http://9p.cat-v.org/) library including `ixpc` client. It consists of less than 2000 lines of code (including `ixpc`). + +`libixp`'s server API is based heavily on that of [Plan 9](http://cm.bell-labs.com/plan9)'s `lib9p`, and the two libraries export virtually identical data structures. There are a few notable differences between the two, however: + +* `libixp` multiplexes connections internally, while on `Plan 9`, the kernel performs this task, and in [plan9port](http://plan9.us/), a separate process is spawned to do so. Despite this divergence, the user of the library will not notice any difference in behavior, except that there may be duplicate `tag` and `fid` numbers between different connections. This issue is of little relevance, however, as the library handles the task of mapping `fid`s and `tag`s to arbitrary pointers and `P9Req` structs. + +* `libixp` is released under a lenient MIT-style license, with the exception of the file `intmap.c`, which comes from `Plan 9`, and falls under the LPL. This file may be rewritten at some point, but the author, as of yet, has been uncompelled to do so. + +* `libixp` lacks `lib9p`'s file trees. + +* Unlike `plan9port`'s `lib9p`, `libixp` is POSIX based, and should compile without specialized libraries on nearly any POSIX system. + +Download +-------- +* [libixp-0.5](http://code.suckless.org/dl/libs/libixp-0.5.tar.gz) +* <code>hg clone [http://code.suckless.org/hg/libixp](http://code.suckless.org/hg/libixp)</code> + diff --git a/libs.suckless.org/r9p.md b/libs.suckless.org/r9p.md @@ -0,0 +1,13 @@ +R9P +=== + Author: Kris Maglione + License: MIT + Version: 0.4 + Repo: http://code.suckless.org/hg/r9p + +`r9p` is a simple [9P](http://cat-v.org/9p/) client implementation for Ruby. It currently supports basic filesystem operations, including reading, writing, and listing files. It also supports the operations of the IO class by providing a true file descriptor through a proxy thread. + +* [`r9p 0.4`](http://code.suckless.org/dl/libs/r9p-0.4.tgz) +* Latest: `hg clone http://code.suckless.org/hg/r9p` + + diff --git a/tools.suckless.org/_werc/config b/tools.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=tools.suckless.org +siteTitle='tools' +siteSubTitle='suckless tools' diff --git a/tools.suckless.org/_werc/lib/footer.inc b/tools.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/tools.suckless.org/_werc/lib/top_bar.inc b/tools.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> + <a href="http://www.suckless.org/dl">download</a> + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> | + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/tools.suckless.org/_werc/pub/style.css b/tools.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/tools.suckless.org/diri.md b/tools.suckless.org/diri.md @@ -0,0 +1,4 @@ +DIRI +==== +This project has been moved to [cat-v.org](http://repo.cat-v.org/diri/) as it is maintained by Uriel now and not part of suckless.org anymore. + diff --git a/tools.suckless.org/dmenu.md b/tools.suckless.org/dmenu.md @@ -0,0 +1,154 @@ +DMENU +===== +dynamic menu is a generic menu for X, originally designed for [dwm](/dwm/). +It manages huge amounts (up to 10.000 and more) of user defined menu +items efficiently. + +Download +-------- +* [dmenu-3.9](http://code.suckless.org/dl/tools/dmenu-3.9.tar.gz) (20080909) + +Mailing list +------------ +* `mailto:dwm+subscribe@suckless.org` [(Archives)](http://lists.suckless.org/dwm) [(GMANE Archive)](http://dir.gmane.org/gmane.comp.window-managers.dwm) + +<H2>SYNOPSIS</H2> + +<B>dmenu</B> + +[<B>-i</B>] + +[<B>-b</B>] + +[<B>-fn</B> &lt;font&gt;] + +[<B>-nb</B> &lt;color&gt;] + +[<B>-nf</B> &lt;color&gt;] + +[<B>-p</B> &lt;prompt&gt;] + +[<B>-sb</B> &lt;color&gt;] + +[<B>-sf</B> &lt;color&gt;] + +[<B>-v</B>] + +<A NAME="lbAD">&nbsp;</A> +<H2>DESCRIPTION</H2> + +<A NAME="lbAE">&nbsp;</A> +<H3>Overview</H3> + +dmenu is a generic menu for X, originally designed for +<B>dwm</B>(1). + +It manages huge amounts (up to 10.000 and more) of user defined menu items +efficiently. +<A NAME="lbAF">&nbsp;</A> +<H3>Options</H3> + +<DL COMPACT> +<DT><B>-i</B> + +<DD> +makes dmenu match menu entries case insensitively. +<DT><B>-b</B> + +<DD> +defines that dmenu appears at the bottom. +<DT><B>-fn &lt;font&gt;</B> + +<DD> +defines the font. +<DT><B>-nb &lt;color&gt;</B> + +<DD> +defines the normal background color (#RGB, #RRGGBB, and color names are supported). +<DT><B>-nf &lt;color&gt;</B> + +<DD> +defines the normal foreground color (#RGB, #RRGGBB, and color names are supported). +<DT><B>-p &lt;prompt&gt;</B> + +<DD> +defines a prompt to be displayed before the input area. +<DT><B>-sb &lt;color&gt;</B> + +<DD> +defines the selected background color (#RGB, #RRGGBB, and color names are supported). +<DT><B>-sf &lt;color&gt;</B> + +<DD> +defines the selected foreground color (#RGB, #RRGGBB, and color names are supported). +<DT><B>-v</B> + +<DD> +prints version information to standard output, then exits. +</DL> +<A NAME="lbAG">&nbsp;</A> +<H2>USAGE</H2> + +dmenu reads a list of newline-separated items from standard input and creates a +menu. When the user selects an item or enters any text and presses Return, his/her +choice is printed to standard output and dmenu terminates. +<P> + +dmenu is completely controlled by the keyboard. The following keys are recognized: +<DL COMPACT> +<DT><B>Any printable character</B> + +<DD> +Appends the character to the text in the input field. This works as a filter: +only items containing this text will be displayed. +<DT><B>Left/Right (Mod1-h/Mod1-l)</B> + +<DD> +Select the previous/next item. +<DT><B>PageUp/PageDown (Mod1-k/Mod1-j)</B> + +<DD> +Select the first item of the previous/next 'page' of items. +<DT><B>Home/End (Mod1-g/Mod1-G)</B> + +<DD> +Select the first/last item. +<DT><B>Tab (Control-i)</B> + +<DD> +Copy the selected item to the input field. +<DT><B>Return (Control-j)</B> + +<DD> +Confirm selection and quit (print the selected item to standard output). Returns +<B>0</B> + +on termination. +<DT><B>Shift-Return (Control-Shift-j)</B> + +<DD> +Confirm selection and quit (print the text in the input field to standard output). +Returns +<B>0</B> + +on termination. +<DT><B>Escape (Control-bracketleft)</B> + +<DD> +Quit without selecting an item. Returns +<B>1</B> + +on termination. +<DT><B>Backspace (Control-h)</B> + +<DD> +Remove a character from the input field. +<DT><B>Control-u</B> + +<DD> +Remove all characters from the input field. +<DT><B>Control-w</B> + +<DD> +Remove all characters of current word from the input field. +</DL> diff --git a/tools.suckless.org/ii.md b/tools.suckless.org/ii.md @@ -0,0 +1,170 @@ +IRC IT (II) +=========== +ii is a minimalist FIFO and filesystem-based IRC client. It creates an irc directory tree with server, channel and nick name directories. In every directory a FIFO in file and a normal out file is created. + +The in file is used to communicate with the servers and the out files contain the server messages. For every channel and every nick name there are related in and out files created. This allows IRC communication from command line and adheres to the Unix philosophy. +example + +Join a channel as follows: `$ echo "/j #wmii" > in` +and ii creates a new #wmii (channel) directory with in and out files. + + irc/irc.oftc.net + |-- #wmii + | |-- in + | `-- out + |-- #ii + | |-- in + | `-- out + |-- #wmii + | |-- in + | `-- out + |-- chanserv + | `-- out + |-- nickserv + | |-- in + | `-- out + |-- out + `-- in + +It consists of <= 500 lines of code and is the big brother of [sic](/programs/sic.html) + +Download +-------- +* [ii 1.4](http://code.suckless.org/dl/tools/ii-1.4.tar.gz) (9.4kb) (20080809) + +Development +----------- +You can [browse](http://code.suckless.org/hg/ii) its source code repository or get a copy using [Mercurial](http://www.selenic.com/mercurial/) with following command: + +`hg clone http://code.suckless.org/hg/ii` + +Usage +------ +To make ii a bit more comfortable use it in combination with the multitail program and for example with vim. Run vim in the server directory and use key mapping like: +`map w1 :.w >> \\#ii/in<cr>` +`map w2 :.w >> \\#wmii/in<cr>` +to post to channels. Thanks to Matthias Kopfermann for this hint. + +Another cool thing is to use it with splitvt so you have multitail windows on top and for example four lines of vim at the bottom. + +There is also a blog entry which describes the whole configuration: +[http://nion.modprobe.de/blog/archives/440-Using-the-ii-irc-client.html](http://nion.modprobe.de/blog/archives/440-Using-the-ii-irc-client.html) + +Alternatives: +------------- +* use [gualteri's iirc](http://rootshell.be/~gualteri/rc/iirc) script +* use [Neptun's criis](http://www.flo.haos.ro/index.php/Ii/Criis) + +Tools +----- +* [iicol](http://www.flo.haos.ro/index.php/Ii/Iicol) - ii log colouriser + +Web frontend +------------ +phpii is a simple web frontend for ii. You can see a demo of it and download the php source here: [phpii homepage](http://yogan.meinungsverstaerker.de/phpii) + +Bots +---- + +Its also very easy to write shell script based bots with ii. As a short example look at this: + + tail -f \\#<CHANNEL>/out | + while read foo ; do + name=$(echo $foo | awk '{print $2}' | sed 's,<\\(.*\\)>,\\1,') + if awk 'BEGIN{srand(); exit rand()<.1)}' ; then + echo "$name: WHAT??" ; + fi; + done + +Its just spamming a channel but I guess your imagination is boundless. +I also heard about people using it together with nagios to get the notifications into IRC. +Remember to strip input for example with tr(1), tr -cd "0-9a-zA-Z" for example would only allow numbers and characters. + +If you want to see a live demonstration of a bot written for ii, join #grml on freenode, the grml-tips bot which searches +for [grml](http://www.grml.org) tips and gives a link or error messages is written in 45 lines of /bin/sh. No, I will not publish +the code since I really suck in shell programming :) + +Stat scripts +------------ + +If you want to use for example [pisg](http://pisg.sf.net/) to generate channel stats this will also work if you choose the irssi log format. + +Automatic reconnects +-------------------- + +If you want some kind of automatic reconnects in ii you can make a something like this in a shell script: + + while true ; do + ( sleep 5 && echo "/j #ii" > ~/irc/irc.oftc.net/in ) & + ii -s irc.oftc.net -n iifoo -f "John Doe" + done + +IPv6 +---- + +There is no official IPv6 support included but there is a patch by Alexander Clouter to enable IPv6: +[IPv6 patch by Alexander Clouter](http://www.suckless.org/~nion/ii-ipv6.patch) + + +bots for irc it (ii) +==================== + +nagios +------ + +Simple Perl script "nagios_post.pl" as interface between [Nagios](http://www.nagios.org/) and ii: + + #!/usr/bin/perl -w + + my $users = "your_nickname(s)"; + my $pipe = "$ENV{HOME}/irc/your_irc_server/#your_channel/in'; + my %color = ( + red => "\0034", + purple => "\0036", + yellow => "\0038", + clear => "\00315", + blue => "\0032\002", + green => "\0033", + normal => "\0031", + ); + + open(PIPE, '>', $pipe) or die "Can't write to $pipe: $!"; + while (<>) { + s/Host [a-z0-9_.]+ is down/$color{red}$&$color{normal}/i; + s/PROBLEM.*?CRITICAL/$color{red}$&$color{normal}/i; + + s/PROBLEM.*?WARNING/$color{yellow}$&$color{normal}/i; + s/Host [a-z0-9_.]+ is up/$color{green}$&$color{normal}/i; + + s/RECOVERY.*?OK/$color{green}$&$color{normal}/i; + + print PIPE "$users: $_"; + } + close(PIPE); + +The appropriate Nagios configuration looks like this: + + # 'notify-by-irc' command definition + define command{ + command_name notify-by-irc + command_line /usr/bin/printf "%b" "$TIME$ $NOTIFICATIONTYPE$ $HOSTNAME$/$SERVICEDESC$ $SERVICESTATE$ $SERVICEOUTPUT$\n" | /home/nagios/bin/nagios_post.pl + } + + # 'host-notify-by-irc' command-notification + define command{ + command_name host-notify-by-irc + command_line /usr/bin/printf "%b" "$TIME$ Host $HOSTALIAS$ is $HOSTSTATE$ -- $HOSTOUTPUT$\n" | /home/nagios/bin/nagios_post.pl + } + +Start ii appropriately and add notify-by-irc and host-notify-by-irc to the appropriate "service&#x5f;notification&#x5f;commands" and "host&#x5f;notification&#x5f;commands" -- and you have your own Nagios IRC bot. + +rsstail +------- + +Just piping the output of [rsstail](http://www.vanheusden.com/rsstail/) into the fifo "in" should work. More detailed examples are welcome. + + +Contact +------- +send mail to [ii@modprobe.de]( mailto:ii@modprobe.de) or feel free to join #ii on irc.oftc.net + diff --git a/tools.suckless.org/index.md b/tools.suckless.org/index.md @@ -0,0 +1,7 @@ +PROGRAMS +======== +Most programs are rather tiny. +Have fun. + +You can [browse](http://code.suckless.org/hg) the source code repositories +or [download](http://code.suckless.org/dl) the releases. diff --git a/tools.suckless.org/lsw.md b/tools.suckless.org/lsw.md @@ -0,0 +1,8 @@ +LSW +=== +Lists the titles of all running X windows to stdout, similar to ls(1). Might be +useful for script integration. + +Download +-------- +* [lsw-0.1](http://code.suckless.org/dl/tools/lsw-0.1.tar.gz) (20061013) diff --git a/tools.suckless.org/lsx.md b/tools.suckless.org/lsx.md @@ -0,0 +1,11 @@ +LSX +=== +List executables in a directory tree. It just does this, nothing else. + +Download +-------- +* [lsx-0.1](http://code.suckless.org/dl/tools/lsx-0.1.tar.gz) (20061013) + +Bugs +---- +No support for to detect symlink loops. diff --git a/tools.suckless.org/sic.md b/tools.suckless.org/sic.md @@ -0,0 +1,86 @@ +SIMPLE IRC CLIENT +================= +sic is an extremely simple IRC client. It consists of lesser than 250 lines of code. It is the little brother of [irc it](/programs/ii.html). + +Download +-------- +* [sic 1.0](http://code.suckless.org/dl/tools/sic-1.0.tar.gz) (4kb) (20080729) + +Development +----------- +You can [browse](http://code.suckless.org/hg/sic) its source code repository or get a copy using [Mercurial](http://www.selenic.com/mercurial/) with following command: + + hg clone http://code.suckless.org/hg/sic + + +<H2>SYNOPSIS</H2> + +<B>sic</B> + +[<B>-h</B> &lt;host&gt;] + +[<B>-p</B> &lt;port&gt;] + +[<B>-n</B> &lt;nick&gt;] + +[<B>-k</B> &lt;keyword&gt;] + +[<B>-v</B>] + +<A NAME="lbAD">&nbsp;</A> +<H2>DESCRIPTION</H2> + +<B>sic</B> + +is an extremely fast, small and simple irc client. It reads commands from +standard input and prints all server output to standard output. It multiplexes +also all channel traffic into one output, that you don't have to switch +different channel buffers, that's actually a feature. +<A NAME="lbAE">&nbsp;</A> +<H2>OPTIONS</H2> + +<DL COMPACT> +<DT><B>-h &lt;host&gt;</B> + +<DD> +Overrides the default host (irc.oftc.net) +<DT><B>-p &lt;port&gt;</B> + +<DD> +Overrides the default port (6667) +<DT><B>-n &lt;nickname&gt;</B> + +<DD> +Override the default nick ($USER) +<DT><B>-k &lt;keyword&gt;</B> + +<DD> +Specifies the keyword to authenticate your nick on the host +<DT><B>-v</B> + +<DD> +Prints version information to standard output, then exits. +</DL> +<A NAME="lbAF">&nbsp;</A> +<H2>COMMANDS</H2> + +<DL COMPACT> +<DT><B>:j #channel</B> + +<DD> +Join a channel +<DT><B>:l #channel</B> + +<DD> +Leave a channel +<DT><B>:m #channel/user msg</B> + +<DD> +Write a message to #channel/user +<DT><B>:s #channel/user</B> + +<DD> +Set default channel/user +<DT>Everything which is not a command is simply send the server.<DD> +<P> +</DL> diff --git a/tools.suckless.org/slock.md b/tools.suckless.org/slock.md @@ -0,0 +1,11 @@ +SLOCK +===== +Simple X display locker. Really this is the simplest X screen locker we are +aware of. It is stable and quite a lot people in this community are using it +every day when they are out with friends or fetching some food from the local +pub. + +Download +-------- +* [slock-0.9](http://code.suckless.org/dl/tools/slock-0.9.tar.gz) (20080729) + diff --git a/tools.suckless.org/sselp.md b/tools.suckless.org/sselp.md @@ -0,0 +1,9 @@ +SSELP +===== +Simple X selection printer. Prints the X selection to stdout. If there is no X +client owning the selection it just exits. Useful for scripts where you can +query the X selection without pressing mouse Button2 in cumbersome ways. + +Download +-------- +* [sselp-0.2](http://code.suckless.org/dl/tools/sselp-0.2.tar.gz) (20080729) diff --git a/tools.suckless.org/ssid.md b/tools.suckless.org/ssid.md @@ -0,0 +1,7 @@ +SSID +==== +Simple setsid replacement, nothing special about it except it being really simple. + +Download +-------- +* [ssid-0.1](http://code.suckless.org/dl/tools/ssid-0.1.tar.gz) (20061013) diff --git a/tools.suckless.org/swarp.md b/tools.suckless.org/swarp.md @@ -0,0 +1,12 @@ +SSWARP +====== +Simple pointer warping tool for X. Warps the mouse pointer to a given position, e.g.: + + swarp 100 100 + +will warp the pointer to (100, 100) on your screen. + +Download +-------- +* [swarp-0.1](http://code.suckless.org/dl/tools/swarp-0.1.tar.gz) (20061013) + diff --git a/tools.suckless.org/wmname.md b/tools.suckless.org/wmname.md @@ -0,0 +1,30 @@ +WMNAME +====== +wmname prints/sets the window manager name property of the root window similar +to how hostname(1) behaves. + +wmname is a nice utility to fix problems with JDK versions and other broken +programs assuming a reparenting window manager for instance. + +Download +-------- +* [wmname-0.1](http://code.suckless.org/dl/tools/wmname-0.1.tar.gz) + +Repository +---------- +You can [browse](http://code.suckless.org/hg/wmname) the source code or get a +copy using [Mercurial](http://www.selenic.com/mercurial/) with following +command: + + hg clone http://code.suckless.org/hg/wmname + +Usage +----- +The following command prints the window manager name, if any: + + ; wmname + +The following command sets the window manager name, e.g. + + ; wmname LG3D + diff --git a/wmi.suckless.org/_werc/config b/wmi.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=wmi.suckless.org +siteTitle='wmi' +siteSubTitle='window manager improved' diff --git a/wmi.suckless.org/_werc/lib/footer.inc b/wmi.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/wmi.suckless.org/_werc/lib/top_bar.inc b/wmi.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> + <a href="http://www.suckless.org/dl">download</a> + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> | + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/wmi.suckless.org/_werc/pub/style.css b/wmi.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/wmi.suckless.org/index.md b/wmi.suckless.org/index.md @@ -0,0 +1,28 @@ +WMI +=== +wmi was the initial project which became popular, though [wmii](/wmii/) is the +successor of wmi. The last release of wmi happened back in 2004. There are still +some occasional users of wmi. If you like to check how the good old days felt, +check it out, though its code sucks more unfortunately than our more +recent projects. + +<center>[![Screenshot](/wmi/screenshots/wmi-20080718s.png)](/wmi/screenshots/wmi-20080718.png)</center> + +Download +-------- +You can download the historic copy of +[wmi-10](http://code.suckless.org/dl/misc/wmi-10.tar.gz). Unfortunately there +is no associated repository anymore. There used to be a subversion repository +in the older days. + +Build +----- +In order to build wmi-10 on more recent systems than they were back 4 +years ago, you will need to apply [this +patch](/wmi/wmi-10_compile_fixes.diff) by Sergey Dolgov. + +Issues +------ +If you want to contact the author of wmi, use his proper email address +[garbeam@gmail.com](mailto:garbeam@gmail.com) -- the email address presented in +the wmi-10 source isn't valid anymore. diff --git a/wmi.suckless.org/screenshots/wmi-20080718.png b/wmi.suckless.org/screenshots/wmi-20080718.png Binary files differ. diff --git a/wmi.suckless.org/screenshots/wmi-20080718s.png b/wmi.suckless.org/screenshots/wmi-20080718s.png Binary files differ. diff --git a/wmi.suckless.org/wmi-10_compile_fixes.diff b/wmi.suckless.org/wmi-10_compile_fixes.diff @@ -0,0 +1,107 @@ +diff -r 6b4e7138042b src/action.cpp +--- a/src/action.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/action.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -2,6 +2,11 @@ + // See ../LICENSE.txt for license details. + // + // $Id: action.cpp 734 2004-09-27 18:15:45Z garbeam $ ++ ++extern "C" { ++#include <stdlib.h> // free ++#include <string.h> // strdup ++} + + #include <string> + #include "wmi.h" +diff -r 6b4e7138042b src/frame.h +--- a/src/frame.h Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/frame.h Sun Jul 13 22:21:27 2008 +0400 +@@ -35,7 +35,7 @@ + void focus(Client *client); + + void attach(Client *client); +- Client *Frame::detach(Client *client); ++ Client *detach(Client *client); + + virtual Window window(); + +diff -r 6b4e7138042b src/inputbar.cpp +--- a/src/inputbar.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/inputbar.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -31,7 +31,7 @@ + prompt_ = 0; + promptCounter_ = 0; + isArgument_ = false; +- entryBegin_ = entryEnd_ = 0; ++ entryBegin_ = entryEnd_ = (Sstring::iterator)0; + partitionBegin_ = selected_ = entryBegin_; + args_ = ""; + LOGDEBUG("creating input"); +@@ -233,7 +233,7 @@ + clearPrevPartitionsStack(); + } + else { +- entryBegin_ = entryEnd_ = 0; ++ entryBegin_ = entryEnd_ = (Sstring::iterator)0; + partitionBegin_ = selected_ = entryBegin_; + text_ = text; + } +diff -r 6b4e7138042b src/kernel.h +--- a/src/kernel.h Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/kernel.h Sun Jul 13 22:21:27 2008 +0400 +@@ -167,7 +167,7 @@ + + void cleanup(); + +- Prompt *Kernel::defaultPrompt() const; ++ Prompt *defaultPrompt() const; + + void setMenuMode(bool isMenuMode); + +diff -r 6b4e7138042b src/logger.cpp +--- a/src/logger.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/logger.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -2,6 +2,10 @@ + // See ../LICENSE.txt for license details. + // + // $Id: logger.cpp 734 2004-09-27 18:15:45Z garbeam $ ++ ++extern "C" { ++#include <stdlib.h> // exit ++} + + #include <iostream> + +diff -r 6b4e7138042b src/main.cpp +--- a/src/main.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/main.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -10,6 +10,7 @@ + #include <assert.h> + #include <unistd.h> // getopt stuff + #include <stdlib.h> // getenv stuff ++#include <string.h> // strlen + #include <X11/Xlib.h> + } + +diff -r 6b4e7138042b src/util.cpp +--- a/src/util.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/util.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -5,6 +5,7 @@ + + extern "C" { + #include <unistd.h> ++#include <stdlib.h> // atoi + #include <X11/Xlib.h> + } + +diff -r 6b4e7138042b src/wmiremote.cpp +--- a/src/wmiremote.cpp Sat Jan 27 17:29:39 2007 +0300 ++++ b/src/wmiremote.cpp Sun Jul 13 22:21:27 2008 +0400 +@@ -7,6 +7,7 @@ + + extern "C" { + #include <unistd.h> // getopt stuff ++#include <stdlib.h> // exit + #include <X11/Xatom.h> + #include <X11/Xlib.h> + #include <X11/Xutil.h> diff --git a/wmii.suckless.org/9p.md b/wmii.suckless.org/9p.md @@ -0,0 +1,57 @@ +TIPS ABOUT 9P CAPABILITIES +========================== + +This page covers how to mount the wmii file system on Linux or Inferno, see +[9P](http://cat-v.org/9p/) for a list of other 9P client libraries in various +languages. + +9p.ko +----- + +### 2.6.14 - 2.6.16 + + ; modprobe 9p2000 + ; mount -t 9p $WMII_NS_DIR/wmii /mnt/wmii -o proto=unix,name=$USER,noextend + +### 2.6.17 - 2.6.23 + + ; modprobe 9p + ; mount -t 9P $WMII_NS_DIR/wmii /mnt/wmii -o proto=unix,name=$USER,noextend + +### 2.6.24 - current + + ; modprobe 9pnet + ; modprobe 9p + ; mount -t 9p $WMII_NS_DIR/wmii /mnt/wmii -o trans=unix,uname=$USER,noextend,dfltgid=$(id -g),dfltuid=$(id -u) + +Afterwards the filesystem of `wmii` is exported to `/mnt/wmii`. Note that you can simplify the process using [9mount](http://sqweek.dnsdojo.org/code/9mount), with which the mount command becomes: + + ; 9mount -i 'unix!'$WMII_NS_DIR/wmii /mnt/wmii + +Inferno +------- +If you have installed [inferno](http://www.vitanuova.com/inferno/), you +can mount the wmii filesystem if you edit the wmii script through +setting a tcp-socket capable address: + + export WMII_ADDRESS=tcp!localhost!5555 + +instead of the default unix-socket file based address. + +From within inferno you can then mount the filesystem easily: + + ; mount -A tcp!localhost!5555 /mnt/wmii + +Or with unix domain sockets, you can mount them in inferno through any of a number of +ugly hacks. The following requires plan9port, and will work regardless of the value +of your $WMII_ADDRESS: + + ; mount -A {os rc -c 'exec dial $WMII_ADDRESS' >[1=0]} /mnt/wmii + +or netcat: + + ; mount -A {os sh -c 'nc -U /tmp/ns.$USER.$DISPLAY/wmii' >[1=0]} /mnt/wmii + +I suspect that the overhead of piping through dial or netcat is comparable to the overhead of TCP. + +Have fun ;) diff --git a/wmii.suckless.org/_werc/config b/wmii.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=wmii.suckless.org +siteTitle='wmii' +siteSubTitle='window manager improved 2' diff --git a/wmii.suckless.org/_werc/lib/footer.inc b/wmii.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/wmii.suckless.org/_werc/lib/top_bar.inc b/wmii.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> + <a href="http://www.suckless.org/dl">download</a> + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> | + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/wmii.suckless.org/_werc/pub/style.css b/wmii.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/wmii.suckless.org/alternative_wmiirc_scripts.md b/wmii.suckless.org/alternative_wmiirc_scripts.md @@ -0,0 +1,31 @@ +Alternative `wmiirc` scripts +============================ + +wmii was designed to be scriptable in any language you choose. Here are some +alternative `wmiirc` scripts, in various languages. Feel free to add your own, +with a short description of its features and its language. + + +sunaku's Ruby `wmiirc` +--------------------- + +[sunaku's Ruby `wmiirc`](http://github.com/sunaku/wmiirc) +manipulates wmii (in the Ruby way) through +[the Rumai library](http://snk.tuxfamily.org/lib/rumai/) +which speaks directly to wmii via the 9P2000 protocol +and features an [interactive Ruby shell for live +entertainment](http://snk.tuxfamily.org/lib/rumai/#Tutorial). + +This `wmiirc` features: + +* Logging and crash recovery. +* DSL for events, keystrokes, and actions in wmii. +* Manipulating *multiple* clients simultaneously. +* Automatic client arrangement (LarsWM, grid, diamond, etc.) +* Zooming clients to a temporary workspace. +* Closing all clients before exiting wmii. +* [Music Player Daemon (MPD)](http://mpd.wikia.com) integration. +* Shortcuts optimized for [Dvorak layout](http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) on a [Kinesis keyboard](http://www.kinesis-ergo.com/advantage.htm). +* And [so much more...](http://snk.tuxfamily.org/web/2006-07-01-wmii-3-1-configuration-in-ruby.html) + +All of this can be configured to suit your needs, of course. diff --git a/wmii.suckless.org/faq.md b/wmii.suckless.org/faq.md @@ -0,0 +1,102 @@ +FAQ +=== +### Which operating systems does wmii run on? +wmii is compatible with POSIX-compliant operating systems, including: + +* Linux +* *BSD +* Mac OS X +* Solaris +* cygwin (*reported, not confirmed*) + +### Which external libraries are needed? +* libc is the base userland library for all programs written in C, and is thus installed on all systems. +* Xlib is the base of the X Window System, thus it is installed on systems with X11 support. A separate development package might have to be installed for compiling, such as `libx11-dev` Debian-based systems. +* [libixp](/libs/libixp.html) is a stand-alone client/server 9P library + +Further dependencies are: + +* `xmessage` - A standard part of most X11 installations. + +### I've just installed the new snapshot but something doesn't work. +Please remove all old configuration files and install again. + +### OMG, how come there's a massive border at the bottom of my terminal!? +Your terminal has asked to only be resized in certain +increments, and there's not enough space for another row. `wmii` +is forced to compromise and leave blank space around it. + +### On FreeBSD, using [p9p](http://plan9.us), I get an error on the console about not being able to open /dev/fd/7. +You need to mount fdescfs on /dev/fd. See the BUGS section of +[rc(1)](http://swtch.com/plan9port/man/man1/rc.html) for +details. + +### How do I get a list of the key bindings that are currently in use? +The best place to look is the `rc.wmii` or `wmiirc` file. You +can check which one is being used via +`ps aux | grep wmii | grep rc` +while `wmii` is running. You can also check `wmii(1)` for a +table of default key bindings. + +### How do I move a window to a different view? +Just retag it. Tag it `a+b` to let it show up on both views `a` +and `b`. Or, you can tag with `+b` to make the window appear on the +`b` view without removing it from existing views. + +### How do I enable tabbing? +Tabbing has been replaced with stacking. Press `$MODKEY-s` to +set a column to stacking. If you want to hide the titlebars of +collapsed windows in a stack, run + + wmiir xwrite /tag/sel/ctl colmode sel +max + +### How do I get information about a specific client window? +In general, that's the job of X applications like `xprop`, +`xwininfo`, and click. `wmii`, however, does provide the class +and instance names of clients in their props file: + + % wmiir read /client/sel/prop + XTerm:xterm:/home/kris/wmii/-kris + +You can obtain size information about a client by reading the +index file of a given view. + + % wmiir read /tag/sel/index + +### How do I set a background image? +Use third party tools like `wmsetbg` (from WindowMaker), `qiv`, +`feh`, `xv`, `xloadimage`, `bsetbg` (from `blackbox`), etc. You +can do this from your `~/.xinitrc`, or your `rc.wmii` or +`wmiirc` files. + +### How do I define clients to be floating _and_ having a certain tag? +You simply write a rule into your `/tagrules` file: + + /Psi.*/ -> ~+psi + +### Why doesn't `UTF-8` work? +Set a Unicode(ISO-10646)-capable font in your `wmiirc`, by changing `WMII_FONT` to something like + + -*-courier-*-r-*-*-12-*-*-*-*-*-iso10646-* + +### How do I enable sequential shortcuts (like in ratpoison)? <small>or</small> +### How to combine wmii with (x)emacs? The shortcuts collide! +Some applications make extensive use of the Alt key. The +preferred solution is to use the Windows, Apple, or Penguin key +in its place. It's assigned the identifier `Mod4` on most +systems. Set the following in `rc.wmii.local` or `wmiirc`: + + MODKEY=Mod4 + +Alternatively, you can use key chains, so you're required to +press a certain key combination before wmii accepts its +shortcuts: + + MODKEY=Control-i, + +With `xev` and `xmodmap`, it is possible to find other suitable keybindings. + +### How do I resize and move windows with the mouse? + $MODKEY+LeftMouse moves a window. + $MODKEY+RightMouse resizes a window. + diff --git a/wmii.suckless.org/guide.md b/wmii.suckless.org/guide.md @@ -0,0 +1,89 @@ +A GUIDE TO wmii +=============== + +These documents are licensed under the terms of the [GNU GPLv2](http://www.gnu.org/licenses/gpl-2.0.html). + +This is a page about the beginners guide to wmii, a document written to give newcomers a good understanding of wmii, the usage, the project and its goals. The original version was written by Steffen Liebergeld in English. + +Please feel free to express your ideas/corrections/critics about this paper. It would be especially nice if a native english speaker could overlook the english paper and send his/her critique. Furthermore, new translations are always welcome. + +Also, please note that there have been many changes since wmii-3.1 so that the guide can not be applied to newer versions. + +## wmii-3.1 +<table cellpadding="5mm"> + <tr> + <th>English</th><th>Dutch</th><th>Italian</th><th>Spanish</th> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-en/guide_en">html</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-nl/guide_nl">html</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-it/guide_it">html</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-es/guide_es">html</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-en/guide_en_html.tar.gz">html.tar.gz</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-nl/guide_nl_html.tar.gz">html.tar.gz</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-it/guide_it_html.tar.gz">html.tar.gz</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-es/guide_es_html.tar.gz">html.tar.gz</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-en/guide_en.pdf">pdf</a></td> + <td>&#8212;</td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-it/guide_it.pdf">pdf</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-es/guide_es.pdf">pdf</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-en/guide_en.ps">ps</a></td> + <td>&#8212;</td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-it/guide_it.ps">ps</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-es/guide_es.ps">ps</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-en/guide_en.tex">tex</a></td> + <td>&#8212;</td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-it/guide_it.tex">tex</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-3/guide-es/guide_es.tex">tex</a></td> + </tr> +</table> + +Original guide by Steffen Liebergeld (stepardo) &#8212; perl (at) gmx (dot) org +Dutch translation by Jeremy Roon p.roon (at) &#8212; chello (dot) nl +Italian translation by Stefano Lee &#8212; wizinblack (at) gmail (dot) com +Spanish translation by Salvador Peiro (gualteri) &#8212; saoret.one/gmail.com + +## wmii-2 +<table cellpadding="5mm"> + <tr> + <th>English</th><th>German</th><th>Italian</th> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-en/beginnersguide-en">html</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-de/guide-de">html</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-it/guide-it">html</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-en.tar.gz">html.tar.gz</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-de.tar.gz">html.tar.gz</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-it.tar.gz">html.tar.gz</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-en/beginnersguide.pdf">pdf</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-de/guide-de.pdf">pdf</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-it/guide-it.pdf">pdf</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-en/beginnersguide.ps">ps</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-de/guide-de.ps">ps</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-it/guide-it.ps">ps</a></td> + </tr> + <tr> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-en/beginnersguide.tex">tex</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-de/guide-de.tex">tex</a></td> + <td><a href="http://code.suckless.org/contrib/guide/wmii-2/guide-it/guide-it.tex">tex</a></td> + </tr> +</table> + +Original guide by Steffen Liebergeld (stepardo) &#8212; perl (at) gmx (dot) org +German translation by Norman Golisz &#8212; hp (at) zcat (dot) de +Italian translation by Stefano K. Lee &#8212; wizinblack (at) gmail (dot) com + diff --git a/wmii.suckless.org/index.md b/wmii.suckless.org/index.md @@ -0,0 +1,103 @@ +![wmii](/wmii/wmii.gif) + +WINDOW MANAGER IMPROVED 2 +========================= + +wmii is a small, dynamic window manager for X11. It is scriptable, has a 9p +filesystem interface and supports classic and tiling (acme-like) window +management. It aims to maintain a small and clean (read hackable and beautiful) +codebase. + +<center> +[ +![Screenshot](/wmii/screenshots/wmii-20080117-thumb.png) +](/wmii/screenshots/wmii-20080117.png) +</center> + +Links +----- + +* Latest release: [wmii-3.6](http://code.suckless.org/dl/wmii/wmii-3.6.tar.gz) (Note that it requires [dmenu](/programs/dmenu.html) and [libixp-0.4](/libs/libixp.html), [p9p](http://plan9.us/) recommended) +* Latest snapshot: [wmii+ixp-20080520](http://code.suckless.org/dl/wmii/wmii+ixp-20080520.tgz) +* Latest devel tip: <code>hg clone [http://code.suckless.org/hg/wmii](http://code.suckless.org/hg/wmii)</code> +* Bugs: [Google Code issue tracker](http://code.google.com/p/wmii/issues) +* Mailing List: `wmii+subscribe@suckless.org` [(Archives)](http://lists.suckless.org/wmii) [(GMANE Archive)](http://dir.gmane.org/gmane.comp.window-managers.wmii) +* IRC channel: `#wmii at irc.oftc.net` [(irc log)](http://www.suckless.org/irc/) + +Notes +----- +If [plan9port](http://plan9.us/) is found at runtime, wmii will use an +alternate controlling script, written in +[rc](http://plan9.bell-labs.com/sys/doc/rc.html). `rc.wmii` supports a +`rc.wmii.local` convention which allows you to keep local customisations +separate from the main script so you don't have to merge them every time +`rc.wmii` changes. + +It is optional, the default `wmiirc` depends on only standard unix tools, +however - `rc.wmii` is better supported. All the code snippets/color schemes +on the site are written in rc and need some syntax adjustment to work in the +standard `wmiirc`. + +Development +----------- +You can [browse](http://code.suckless.org/hg/wmii) its source code repository or get a copy using [Mercurial](http://www.selenic.com/mercurial/) with following command: + + hg clone http://code.suckless.org/hg/libixp + hg clone http://code.suckless.org/hg/wmii + +Older releases +-------------- +* [wmii-3.6](http://code.suckless.org/dl/wmii/wmii-3.6.tar.gz) (historical, 2007-11-16) +* [wmii-3.5.1](http://code.suckless.org/dl/wmii/wmii-3.5.1.tar.gz) (historical, 2006-12-27) +* [wmii-3.1](http://code.suckless.org/dl/wmii/wmii-3.1.tar.gz) (historical, 2006-06-17) +* [9base-2](http://code.suckless.org/dl/misc/9base-2.tar.gz) (historical, 2006-01-25) +* [wmii-2.5.2](http://code.suckless.org/dl/wmii/wmii-2.5.2.tar.gz) (historical, 2006-01-27) +* [wmii-2](http://code.suckless.org/dl/wmii/wmii-2.tar.gz) (historical, 2005-10-21) +* [wmi-10](http://code.suckless.org/dl/misc/wmi-10.tar.gz) (historical, 2004-10-03) + +Make sure that the X Window System headers are installed, if you want to build +wmii from source. + +Packages +-------- +If there are no packages for your Linux distribution/OS yet, ask the +appropriate maintainers to create one or compile wmii from source. + +Debian +------ +Official debian packages are available in the unstable and testing repository +on debian.org. Backports for stable are available on +[backports.org](http://www.backports.org/). Prospective packages and/or +snapshots can be downloaded from the [maintainers +website](http://archive.daniel-baumann.ch/debian/packages/wmii/). + +Source Mage +----------- +A Source Mage spell for the 20070516 wmii snapshot is available. As usual, just +type + +`cast wmii` + +in a term to install it. + +FreeBSD +------- +Port is available at x11-wm/wmii. + +NetBSD +------ +A pkgsrc package for wmii is available in [wm/wmii](http://pkgsrc.se/wm/wmii) and [wip/wmii-devel](http://pkgsrc.se/wip/wmii-devel). + +OpenBSD +------- +wmii is included in the OpenBSD ports tree ([x11/wmii](http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/wmii/)), and binary packages are available from most [OpenBSD mirrors](http://openbsd.org/ftp.html). + +Arch Linux +---------- +* [wmii-3.6](http://archlinux.org/packages/search/?q=wmii) is available in the Arch \[extra\] repository. +* [wmii-hg](http://aur.archlinux.org/packages.php?ID=3497) is available in AUR \[unsupported\]. Building with `makepkg` pulls the latest hg revision. + +Gentoo +------ +Ebuild is available at x11-wm/wmii. + diff --git a/wmii.suckless.org/intro.md b/wmii.suckless.org/intro.md @@ -0,0 +1,102 @@ +INTRODUCTION +============ + +Installation +------------ +Check if the package management of your operating system already provides a +package for the latest wmii snapshot and install this, or build wmii from scratch after +[downloading](http://code.suckless.org/) the source. If you build it from +scratch, follow the instructions in the shipped README file. + +Running wmii +------------ +Add the following line to your `.xinitrc` to start `wmii` using xinit: + + until wmii; do + true + done + +In order to connect wmii to a specific display, make sure that +the `$DISPLAY` environment variable is set correctly. For example: + + DISPLAY=:1 wmii + +This will start wmii on display :1. + +And run `xinit` afterwards. (Note: make sure wmii is in your `$PATH`) + +Tagging +------- + +The classical workspace model conceives the workspace as a(n exclusive) +collection of clients, thus you can start clients on each workspace and move +them from one workspace to another. The window manager can only show one +workspace at time, so to reach your clients you have to switch between +workspaces. + +Additional operations that are performed in workspaces of classical window +managers: + +* Hide/Show +* Maximize/Minimize: give/retain all the screen to a client +* Move client to ws: moves a client to a different ws +* Sticky/Non Sticky: makes a client visible in all ws + +Tagging is a more general concept that supersedes the classical workspace +model. + +Here is a brief overview of wmii's tagging model: + +* A tag is an alphanumeric string which is associated with one or more clients. +* A view is a set of clients matching a specific tag. + +Tagging is defined by the dictionary as: **attach a tag or label to +something**, in this particular case to clients. This way a client belongs +to a set of classes. + +This way a workspace is not a set of clients but a set of tags. This enables +to: + +* have clients with one tag (so they only appear in one view exclusively). +* have clients with multiple tags (so they appear in different views, sticky). + +### tagging in wmii + +#### apply a tag + +To tag a client, the desired tag(s) are written to the */client/sel/tags* file: + + echo -n '1+2'| wmiir write /client/sel/tags + +(In this case the currently selected client was applied tags 1 and 2.) + +#### selection + +To change the view, the *view <tag>* command is written to the */ctl* file: + + echo -n view 1 | wmiir write /ctl + +(In this case only client tagged with 1 are viewed.) + +#### tag rules + + wmiir write /tagrules <<EOF + /XMMS:.*/ -> ~ + /Gimp.*:.*/ -> ~ + EOF + +(WMII uses the name from the window props ( wmiir read /client/sel/props and wmiir read /tag/sel/index ) ) + +(This is an excerpt of [wmiirc](http://suckless.org/repos/wmii/rc/wmiirc), where +the [broken](http://www.suckless.org/common/broken_programs.html) clients XMMS and Gimp are moved to the +float layer, so they're not managed by wmii.) + +Events +------ +Event-based scripting is a very powerful and useful part of wmii. It allows scripts to watch for events generated by user interaction. Anytime you move a window, change focus, click a bar, etc, you generate a specific event, which is written to wmii's internal /event file as a single line with 2-3 fields. To get the feel for it, try executing + + ; wmiir read /event + +in a terminal and generating some events, by changing focus, clicking on titlebars, etc. Once you understand how it works, you can use it in your scripts. Note: for key events, due to the nature of X11, only those keys grabbed by wmii (wmiir read /keys) will generate events. So, when creating a new keybinding in wmiirc, make sure to list it in the write to /keys and the event loop. + + diff --git a/wmii.suckless.org/related_links.md b/wmii.suckless.org/related_links.md @@ -0,0 +1,56 @@ +RELATED LINKS +============= + +Articles +-------- +* [Linux User Magazin 03/2005 (17.2.)](http://www.linux-user.de ) - Philipp Klein +* [Window Managers in the UNIX World](http://www.osnews.com/story.php?news_id=6958nced ) - Martin Stubenschrott +* [A few words about WMI](http://www.drunkenblog.com/drunkenblog-archives/000300.html ) - Richard Wareham +* [Experimenting with WMI](http://www.robfisher.net/blog/archive/2004/06/04/window-manager-improved/ ) - Rob Fisher +* Wikipedia [en](http://en.wikipedia.org/wiki/Wmii) [de](http://de.wikipedia.org/wiki/Window_manager_improved) +* [WMI Plumbing](http://web.archive.org/web/20051025131951/http://www.metawire.org/~parasitical/articles/wmi/plumbing.html) - Adam Gleave +* [German introduction to wmii-2 (and -current)](http://pengupedia.de/wmii ) +* [Blog-Entry about wmii](http://thecrypto.org/window-managing ) - TheCrypto +* [Introduction to Plan9 and wmii](http://forums.gentoo.org/viewtopic-p-2887538.html ) - Marco Squarcina / Italian +<!-- Christ! What were these two lines supposed to be?! --> +* [Linux User Magazine 01/2006 (13.12.)](http://www.linux-user.de/ausgabe/2006/01/070-desktopia-wmii/index.html) +* [English version of the above article](http://www.linux-magazine.com/issues/2006/64/no_wimps/) +* [Introduction into wmii for Ubuntu (German)](http://wiki.ubuntuusers.de/WMII) +* [Romanian info about wmii](http://wiki.lug.ro/mediawiki/index.php/WMII) +* [Working with WMII and multiple displays](http://files.aoeu.info/wmii/) - Magnus Engstroem +* [The Desktop Is Changing... But to What?](http://osnews.com/story.php?news_id=13974) - Kostis Kapelonis + +Distributions including wmii +---------------------------- +* [Debian](http://packages.debian.org/wmii ) +* [FreeBSD](http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-wm/wmii/ ) +* [Gentoo](http://packages.gentoo.org/package/x11-wm/wmii ) +* [Arch Linux](http://archlinux.org/packages/wmii/) +* [grml](http://www.grml.org ) +* [NetBSD](ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/wm/wmii/README.html ) +* [OpenBSD](http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/wmii/ ) +* [Source Mage](http://www.sourcemage.org ) +* [Ubuntu](http://packages.ubuntu.com/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=wmii ) + +Related window managers +----------------------- +* [evilwm](http://evilwm.sourceforge.net/ ) +* [Ion](http://modeemi.cs.tut.fi/~tuomov/ion/ ) +* [larswm](http://www.lab1702.net/fnurt/larswm/ ) +* [ratpoison](http://www.nongnu.org/ratpoison/ ) +* [TrsWM](http://yarick.territory.ru/trswm/ ) +* [List of many window managers](http://xwinman.org/ ) +* [rio / Plan 9 from User Space](http://swtch.com/plan9port/ ) +* [aewm](http://www.red-bean.com/~decklin/software/aewm/ ) + +Project information +------------------- +* [wmii on Advogato](http://advogato.org/proj/wmii/ ) +* [wmi on FreshMeat](http://freshmeat.net/projects/wmi ) +* [wmii on FreshMeat](http://freshmeat.net/projects/wmii ) +* [wmii on Launchpad](https://launchpad.net/products/wmii ) +* [wmii users group in last.fm](http://www.last.fm/group/wmii ) +* [wmii on ProLinux](http://www.pro-linux.de/cgi-bin/DBApp/check.cgi?ShowApp..5005.100 ) +* [wmii community in Orkut](http://www.orkut.com ) + + diff --git a/wmii.suckless.org/screenshots/wmii-20080117-thumb.png b/wmii.suckless.org/screenshots/wmii-20080117-thumb.png Binary files differ. diff --git a/wmii.suckless.org/screenshots/wmii-20080117.png b/wmii.suckless.org/screenshots/wmii-20080117.png Binary files differ. diff --git a/wmii.suckless.org/scripts_n_snips/code_snippets.md b/wmii.suckless.org/scripts_n_snips/code_snippets.md @@ -0,0 +1,120 @@ +Code snippets for wmii-snap +=========================== + +The [9P filesystem](http://en.wikipedia.org/wiki/9P) backend of wmii allows for +rich scripting possibilites, adding new features and more convenience to your +wmii. Because of the simple nature of the 9P protocol, scripting is possible in +any language, using either native 9P libraries in that language or external +tools like the supplied wmiir/[ixpc](http://libs.suckless.org/). + +Feel free to add your own scripts to this page! + +The snippets that are in `rc` syntax should be added to your `rc.wmii.local` +file. They should go inside a function `Action-overridekeys`. The `MODKEY` +variable should be set outside it. + +See this sample `rc.wmii.local`: [(3.6)](http://sqweek.dnsdojo.org/wmii/rc.wmii.local-3.6) [(newer snapshots)](http://sqweek.dnsdojo.org/wmii/rc.wmii.local-20080520) + +Cycle Views +----------- + fn next_tag { + awk -v curtag'='`{wmiir read /tag/sel/ctl | sed 1q} ' + NR==1 {first = $0} + $0==curtag { if(getline) print $0; else print first; exit }' + } + fn Key-$MODKEY-n { + wmiir xwrite /ctl view `{ read_tags | next_tag} + } + fn Key-$MODKEY-b { + wmiir xwrite /ctl view `{ read_tags | tail -r | next_tag} + } + +Tag selected client and jump to new view +---------------------------------------- +If tagged with multiple tags, it will jump to the last view of the set. + + fn Key-MODKEY-Control-t { + newtag=`{wi_tags | wi_menu} + wmiir xwrite /client/sel/tags $newtag + newtag=`{echo $newtag | sed 's/.*\+//; s/-.*//'} + wmiir xwrite /ctl view $newtag + } + +Switch to named view by number +----------------------------- + +This allows to switch to a view with its position number, regardless of the view's name. + + fn keynum { + echo `{echo $1 | sed 's/.*-//'} + } + fn tagnum { + echo `{read_tags | sed -n $1^p} + } + + for(i in `{seq 0 9}) { + fn Key-$MODKEY-$i { + wmiir xwrite /ctl view `{tagnum `{keynum $1}} + } + fn Key-Shift-$MODKEY-$i { + wmiir xwrite /client/sel/tags `{tagnum `{keynum $1}} + } + } + +Tag addition and subtraction using tag+ and tag- +------------------------------------------------ + +If you tend to rely on wimenu's completion for retagging, it can be annoying that + or - prefix +renders it useless. This snippet allows you to append the + or -, rather than prepending +it. Prepending still works as before. + + fn Key-$MODKEY-Shift-t { + tag=`{wi_tags | wimenu | sed 's/(.*)([+\-])$/\2\1/'} + wmiir xwrite /client/`{wmiir read /client/sel/ctl | sed 1q}^/tags $tag + } + +Retag all clients in a view +--------------------------- + fn clients_on { + wmiir read /tag/$1/index | awk '!/^#/ { print $2 }' + } + + fn Key-$MODKEY-r { + target=`{wi_tags | wimenu} + for(c in `{clients_on sel}){ + wmiir xwrite /client/$c/tags -sel+$target + } + wmiir xwrite /ctl view $target + } + +Cycle trough tags starting with a specific character +---------------------------------------------------- + +(No tested, but might work) +Add a event in wmiirc that calls the following code. +If you have 3 tags named plan9, planner and plant: by calling the script you will cycle between the 3. +(Note: it does not work with capitals) + + count=1 + fn TagCycle { + inputtag=$1 + currenttag=`{wmiir read /tag/sel/ctl | awk '{ print substr($2, 1, 1); exit }'} + if(~ $currenttag $inputtag) { + count=`{expr $count + 1} + maxcount=`{wi_tags | grep '^'$inputtag | wc -l} + if (test $count -gt $maxcount) + count=1 + } + if not + count=1 + gototag=`{wi_tags | grep '^'$inputtag | sed -n $count^p} + wmiir xwrite /ctl view $gototag + } + +To easily add the entire alphabet in the bound buttons you can use this code. +Add this to your rc.wmii BEFORE the other keys (you still want your other old keys to work right ?): + + # Tag cycle + key $MODKEY-A-^(a b c d e f g h i j k l m n o p q r s t u v w x y z) || fn $key { + TagCycle $1} + diff --git a/wmii.suckless.org/scripts_n_snips/index.md b/wmii.suckless.org/scripts_n_snips/index.md @@ -0,0 +1,3 @@ +Scripts and snippets +==================== +This directory contains scripts and snippets for wmii. diff --git a/wmii.suckless.org/scripts_n_snips/irssi_notifier.md b/wmii.suckless.org/scripts_n_snips/irssi_notifier.md @@ -0,0 +1,103 @@ +Irssi Message Notifier +====================== + +This script notifies you, by setting the Urgent hint on your irssi window, of messages with your nick, or in channels you care about. It can optionally display the messages on the bar. You'll need to set the title of the window running irssi to 'irssi' for this to work. I use `label`(1) from plan9port. + +This portion goes in your rc.wmii.local, or can be modified to run standalone: + + showmessage=false # true, false + + fn isirssi { ~ `{wmiir read /client/$"*/label} irssi } + fn clients { wmiir ls /client | sed 's,/,,; /^sel$/d' } + + fn Event-IRCMessage { + if(! isirssi sel) { + for(c in `{clients}) + if(isirssi $c) + wmiir xwrite /client/$c/ctl Urgent + if($showmessage) { + shift 2 + echo $WMII_NORMCOLORS $* | wmiir create /rbar/0status + } + } + } + + fn Event-ClientFocus { + if(isirssi $1) + wmiir xwrite /client/$1/ctl NotUrgent + } + +This portion is a perl script for irssi. It should go in `~/.irssi/scripts`, and can be loaded with `/script load notify`, or autoloaded by symlinking it into `~/.irssi/scripts/autoload`. The irssi `notify_channels` setting takes a list of channels to always notify you of messages to, or '*' to notify you for all channels. + + # --------------------------------------------------------------------------- + # "THE BEER-WARE LICENSE" (Revision 42): + # <fbsdaemon@gmail.com> wrote this file. As long as you retain this notice you + # can do whatever you want with this stuff. If we meet some day, and you think + # this stuff is worth it, you can buy me a beer in return. Kris Maglione + # --------------------------------------------------------------------------- + # <phk@FreeBSD.ORG> wrote this license. As long as you retain this notice you + # can do whatever you want with this stuff. If we meet some day, and you think + # this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp + # --------------------------------------------------------------------------- + + use strict; + + our $VERSION = '20070524'; + our %IRSSI = ( + authors => 'Kris Maglione', + contact => 'bsdaemon@comcast.net', + name => 'notify', + description => 'Writes certain messages to the wmii event FIFO', + license => 'BEER-WARE', + url => '', + changed => $VERSION, + modules => '', + ); + + use Irssi; + use Fcntl; + + sub should_notify ($); + + sub message_handler { + my ($server, $mesg, $nick, $address, $target) = @_; + my $mynick = $server->{nick}; + + if (not defined $target + or should_notify($target) + or $mesg =~ /\b$mynick\b/) { + $mesg =~ s/\n/\\n/g; + $target = ($target ? " in $target" : ""); + + open my $fifo, '| wmiir write /event' or return; + print $fifo "IRCMessage from $nick$target: $mesg\n"; + close $fifo; + } + } + + sub should_notify ($) { + my $target = shift; + my @notifies = split /,\s*/, Irssi::settings_get_str('notify_channels'); + + if (grep { $_ eq "*" || $_ eq $target } @notifies) { + return 1; + } + + 0; + } + + Irssi::signal_add('message private', 'message_handler'); + Irssi::signal_add('message public', 'message_handler'); + Irssi::settings_add_str('misc', 'notify_channels', ''); + +There is another way to set the label: + +Use the perl script in at this website: `http://tldp.org/HOWTO/Xterm-Title-7.html#ss7.2` +And put it into `~/.irssi/scripts/title.pl` for example. + +Content of ` ~/.irssi/scripts/autorun/title.pl`: + + system('~/.irssi/scripts/title.pl irssi'); + +This will nicely set the title for irssi. + diff --git a/wmii.suckless.org/scripts_n_snips/mail_notifier.md b/wmii.suckless.org/scripts_n_snips/mail_notifier.md @@ -0,0 +1,44 @@ +Mail Notifier +============= + +This script will notify you of mail by setting the urgent hint +on windows for mail folders in which you have new mail. It only +works for Maildirs, and assumes that you have a window on the +`mail` tag named for each folder you wish to check. The name +`inbox` is special, and is treated as the root folder. When +there are files in the `new` folder for a given window, its +urgent hint is set. Otherwise, it is unset. + + #!/usr/local/plan9/bin/rc + . 9.rc + + # Configuration + delay=5 + maildir=$home/Maildir + # End Configuration + + echo Start mail | wmiir write /event + + { wmiir read /event & + while(echo Tick) + sleep $delay + } | while(*=`{read}) + switch($1) { + case Start + if(~ $2 mail) + exit + case Tick + wmiir read /tag/mail/index | + while(l = `{read}) { + b = `{echo $l | awk -F: '{print $3}'} + if(~ $b inbox) + b = '' + if(! ~ $#b 0 && test -d $maildir/.$b/new) { + knot = '' + if(~ `{ls -l $maildir/.$b/new | wc -l} 0) + knot = Not + wmiir xwrite /client/$l(2)^/ctl $knot^Urgent + } + } + } + diff --git a/wmii.suckless.org/scripts_n_snips/themes.md b/wmii.suckless.org/scripts_n_snips/themes.md @@ -0,0 +1,257 @@ +THEMES +====== + +Various color schemes to try out. + +<style> +div#content div { + width: 100%; + border: 1px solid; + font-family: monospace; + text-indent: 1em; +} +</style> + +default +------- +<div style="background: #333333; color: #2A7F3F; border-color: #2A7F3F;"> + <div style="color: #ffffff; background: #153F1F; border: 0px; border-bottom: 1px solid #2A7F3F; margin: 0;"> + WMII_FOCUSCOLORS=('#ffffff' '#153F1F' '#2A7F3F') + </div> + <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #222222; background: #5FBF77; border-color: #2A7F3F; margin-top: .5em"> + WMII_NORMCOLORS=('#222222' '#5FBF77' '#2A7F3F') +</div> + +gray and green +---------------- +<div style="color: #A0FF00; background: #333333; border-color: #8c8c8c;"> + <div style="color: #A0FF00; background: #686363; border: 0px; border-bottom: 1px solid #8c8c8c; margin: 0;"> + WMII_FOCUSCOLORS=('#A0FF00' '#686363' '#8c8c8c') + </div> + <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #e0e0e0; background: #444444; border-color: #666666; margin-top: .5em"> + WMII_NORMCOLORS=('#e0e0e0' '#444444' '#666666') +</div> + +light blue and white +---------------------- +<div style="color: #000000; background: #ddeedd; border-color: #000000;"> + <div style="color: #000000; background: #bbc5ff; border: 0px; border-bottom: 1px solid #000000; margin: 0;"> + WMII_FOCUSCOLORS=('#000000' '#bbc5ff' '#000000') + </div> + <div style="border:0; margin:0;">WMII_BACKGROUND='#ddeedd'</div> +</div> +<div style="color: #000000; background: #f8f8f4; border-color: #f8f8f4; margin-top: .5em"> + WMII_NORMCOLORS=('#000000' '#f8f8f4' '#f8f8f4') +</div> + +blue and smoke +-------------- + +<div style="color: #ffffff; background: #333333; border-color: #4C7899;"> + <div style="color: #ffffff; background: #285577; border: 0px; border-bottom: 1px solid #4C7899; margin: 0;"> + WMII_FOCUSCOLORS=('#ffffff' '#285577' '#4C7899') + </div> + <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #888888; background: #222222; border-color: #333333; margin-top: .5em"> + WMII_NORMCOLORS=('#888888' '#222222' '#333333') +</div> + +sleepless night +--------------- +<div style="color: #ff7700; background: #333333; border-color: #ff7700;"> + <div style="color: #ff7700; background: #11111; border: 0px; border-bottom: 1px solid #ff7700; margin: 0;"> + WMII_FOCUSCOLORS=('#ff7700' '#11111' '#ff7700') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #000000; background: #ffffff; border-color: #666666; margin-top: .5em;"> + WMII_NORMCOLORS=('#000000' '#ffffff' '#666666') +</div> +<div style="font-family: terminus; margin-top: .5em;"> + WMII_FONT='-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*' +</div> + +the green +--------- +<div style="color: #66FF00; background: #888888; border-color: #66FF00;"> + <div style="color: #66FF00; background: #101010; border: 0px; border-bottom: 1px solid #66FF00; margin: 0;"> + WMII_FOCUSCOLORS=('#66FF00' '#101010' '#66FF00') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#888888'</div> +</div> +<div style="color: #EEEEEE; background: #000000; border-color: #111111; margin-top: .5em;"> + WMII_NORMCOLORS=('#EEEEEE' '#000000' '#111111') +</div> +<div style="font-family: snap; margin-top: .5em;"> + WMII_FONT='-artwiz-snap-normal-*-*-*-*-*-*-*-*-*-*-*' +</div> + +the orange +---------- +<div style="color: #000000; background: #888888; border-color: #000000;"> + <div style="color: #000000; background: #CD6D37; border: 0px; border-bottom: 1px solid #000000; margin: 0;"> + WMII_FOCUSCOLORS=('#000000' '#CD6D37' '#000000') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#888888'</div> +</div> +<div style="color: #000000; background: #848484; border-color: #000000; margin-top: .5em;"> + WMII_NORMCOLORS=('#000000' '#848484' '#000000') +</div> +<div style="font-family: lucidatypewriter; margin-top: .5em;"> + WMII_FONT='-b&h-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-*' +</div> + +crystal shining style +--------------------- +<div style="color: #fefefe; background: #333333; border-color: #5090a0;"> + <div style="color: #fefefe; background: #307080; border: 0px; border-bottom: 1px solid #5090a0; margin: 0;"> + WMII_FOCUSCOLORS=('#fefefe' '#307080' '#5090a0') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #cccccc; background: #004050; border-color: #002030; margin-top: .5em;"> + WMII_NORMCOLORS=('#cccccc' '#004050' '#002030') +</div> +<div style="font-family: fixed; margin-top: .5em;"> + WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*' +</div> + +kawai anime +----------- +<div style="color: #000000; background: #FF88FF; border-color: #000000;"> + <div style="color: #FFFFFF; background: #FF11FF; border: 0px; border-bottom: 1px solid #000000; margin: 0;"> + WMII_FOCUSCOLORS=('#FFFFFF' '#FF11FF' '#000000') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#FF88FF'</div> +</div> +<div style="color: #000000; background: #FF55FF; border-color: #000000; margin-top: .5em;"> + WMII_NORMCOLORS=('#000000' '#FF55FF' '#000000') +</div> +<div style="font-family: fixed; margin-top: .5em;"> + WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*' +</div> + + +anthrazit style +--------------- +<div style="color: #eeeeee; background: #333333; border-color: #708090;"> + <div style="color: #eeeeee; background: #506070; border: 0px; border-bottom: 1px solid #708090; margin: 0;"> + WMII_FOCUSCOLORS=('#eeeeee' '#506070' '#708090') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #bbbbbb; background: #222222; border-color: #000000; margin-top: .5em;"> + WMII_NORMCOLORS=('#bbbbbb' '#222222' '#000000') +</div> +<div style="font-family: snap; margin-top: .5em;"> + WMII_FONT='-artwiz-snap-*-*-*-*-*-*-*-*-*-*-*-*' +</div> + +acme style +---------- +<div style="color: #000000; background: #757575; border-color: #8888cc;"> + <div style="color: #000000; background: #eaffff; border: 0px; border-bottom: 1px solid #8888cc; margin: 0;"> + WMII_FOCUSCOLORS=('#000000' '#eaffff' '#8888cc') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#757575'</div> +</div> +<div style="color: #000000; background: #ffffea; border-color: #bdb76b; margin-top: .5em;"> + WMII_NORMCOLORS=('#000000' '#ffffea' '#bdb76b') +</div> +<div style="font-family: glispbold; margin-top: .5em;"> + WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*' +</div> + +blue style +---------- +<div style="color: #000000; background: #333333; border-color: #444444;"> + <div style="color: #000000; background: #9191FF; border: 0px; border-bottom: 1px solid #444444; margin: 0;"> + WMII_FOCUSCOLORS=('#000000' '#9191FF' '#444444') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #9191FF; background: #000000; border-color: #444444; margin-top: .5em;"> + WMII_NORMCOLORS=('#9191FF' '#000000' '#444444') +</div> +<div style="font-family: glispbold; margin-top: .5em;"> + WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*' +</div> + +bluedark style +-------------- +<div style="color: #EEEEEE; background: #111111; border-color: #006699;"> + <div style="color: #EEEEEE; background: #005577; border: 0px; border-bottom: 1px solid #006699; margin: 0;"> + WMII_FOCUSCOLORS=('#EEEEEE' '#005577' '#006699') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#111111'</div> +</div> +<div style="color: #BBBBBB; background: #222222; border-color: #000000; margin-top: .5em;"> + WMII_NORMCOLORS=('#BBBBBB' '#222222' '#000000') +</div> +<div style="font-family: glispbold; margin-top: .5em;"> + WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*' +</div> + +gloom +----- +<div style="color: #ffffff; background: #333333; border-color: #cccccc; margin-top: .5em;"> + <div style="color: #ffffff; background: #282828; border: 0px; border-bottom: 1px solid #cccccc; margin: 0;"> + WMII_FOCUSCOLORS=('#ffffff' '#282828' '#cccccc') + </div> + <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div> +</div> +<div style="color: #e0e0e0; background: #0a0a0a; border-color: #606060; margin-top: .5em;"> + WMII_NORMCOLORS=('#e0e0e0' '#0a0a0a' '#606060') +</div> + +Xterm style +-------------- +<div style="color: #54FF54; background: #000000; border-color: #73A5FF;"> + <div style="color: #54FF54; background: #000000; border: 0px; border-bottom: 1px solid #73A5FF; margin: 0;"> + WMII_FOCUSCOLORS=('#54FF54' '#000000' '#73A5FF') + </div> + <div style="margin: 0;">WMII_BACKGROUND='#000000'</div> +</div> +<div style="color: #A8A8A8; background: #000000; border-color: #A07040; margin-top: .5em;"> + WMII_NORMCOLORS=('#A8A8A8' '#000000' '#A07040') +</div> +<div style="margin-top: .5em;"> + WMII_FONT='*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' +</div> + +#### This script will generate the above formatting given wmii color/font variables on its standard input: + + #/usr/local/plan9/bin/rc + . /dev/fd/0 + * = ($WMII_FOCUSCOLORS $WMII_NORMCOLORS) + ff = $1; fb = $2; fr = $3 + nf = $4; nb = $5; nr = $6 + bg = $WMII_BACKGROUND + + cat<<! + <div style="color: $ff; background: $bg; border-color: $fr;"> + <div style="color: $ff; background: $fb; border: 0px; border-bottom: 1px solid $fr; margin: 0;"> + WMII_FOCUSCOLORS=('$ff' '$fb' '$fr') + </div> + <div style="margin: 0;"> + WMII_BACKGROUND='$bg' + </div> + </div> + <div style="color: $nf; background: $nb; border-color: $nr; margin-top: .5em;"> + WMII_NORMCOLORS=('$nf' '$nb' '$nr') + </div> + ! + font=`{echo $WMII_FONT | 9 sed 's/^-[^\-]+-([^\-]+).*/\1/g'} + if(test $"WMII_FONT) { + cat<<! + } + <div style="font-family: $font;"> + WMII_FONT='$WMII_FONT' + </div> + ! + diff --git a/wmii.suckless.org/wmii.gif b/wmii.suckless.org/wmii.gif Binary files differ. diff --git a/www.suckless.org/_werc/config b/www.suckless.org/_werc/config @@ -0,0 +1,3 @@ +masterSite=www.suckless.org +siteTitle='SCKLSS' +siteSubTitle='Dedicated to software which sucks less' diff --git a/www.suckless.org/_werc/lib/footer.inc b/www.suckless.org/_werc/lib/footer.inc @@ -0,0 +1,6 @@ +<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> +<!-- TODO Maybe should add a programatically generated google search box --> +<!-- <div class="right"><a href="/_users/login">User Login</div> --> + +<br /> +<br class="doNotDisplay doNotPrint" /> diff --git a/www.suckless.org/_werc/lib/top_bar.inc b/www.suckless.org/_werc/lib/top_bar.inc @@ -0,0 +1,17 @@ + <div class="left"> + <a href="http://www.suckless.org">home</a> | + <a href="http://code.suckless.org/hg">code</a> | + <a href="http://www.suckless.org/dl">download</a> | + <a href="http://dwm.suckless.org">dwm</a> | + <a href="http://libs.suckless.org">libs</a> | + <a href="http://tools.suckless.org">tools</a> | + <a href="http://wmii.suckless.org">wmii</a> | + <a href="http://wmi.suckless.org">wmi</a> + </div> + + <div class="right"> + <span class="doNotDisplay">Related sites:</span> + <!-- | <a href="http://garbe.us/update_log">site updates</a> | --> + <a href="/sitemap">site map</a> + </div> + diff --git a/www.suckless.org/_werc/pub/style.css b/www.suckless.org/_werc/pub/style.css @@ -0,0 +1,367 @@ +/* Default werc style */ + +body { + color: #000000; + background-color: #ffffff; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 84%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + + +/* # Header # */ +.superHeader { + color: black; + background-color: #eeeeee; + height: 2em; +} + +.superHeader img { + vertical-align: bottom; +} + +.superHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + background-color: #99ccff; + border-top: solid 0 #cccccc; + border-bottom: solid 0 #cccccc; + border-width: 1px 0; +} + +.midHeader a { + color: black; +} + +.headerTitle { + font-size: 200%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} +#headerSubTitle { + font-size: 50%; + font-style: italic; + margin-left: 1em; +} + +.headerTitle a { + text-decoration: none; +} + +.subHeader { + display: none; + color: black; + background-color: #99ccff; + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: black; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + background-color: transparent; +} + + +/* # Side # */ +#side-bar { + width: 16em; + float: left; + clear: left; + border-right: 1px solid #cccccc; +} + +#side-bar div { + border: 0px; +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 0.3em 0; +} + +li ul { + padding-left: 1.0em !important; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a { + color: #336699; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.35em 1ex 0.35em 2mm; + display: block; + text-transform: capitalize; + font-weight: bold!important; + font-size: 104%; +} + +.thisPage, .thisPage a { + color: black!important; + font-weight: bold; + background-color: #eeeeeee; + padding-left: 5mm; +} + +#side-bar a:hover { + color: black; + background-color: #eeeeee; + text-decoration: none; + border: 0px; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + +/* # Main Copy # */ +#main-copy { + max-width: 70em; + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: 0em 0 0 16em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid #cccccc; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ + padding: 0; +} + +#main-copy a { + color: #336699; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:hover { + text-decoration: underline; +} + +#main-copy h1, #main-copy h2 { + color: #336699; + background-color: transparent; + font-size: 135%; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid #336699; +} + +#main-copy h2 { + font-size: 115.5%; + border-bottom: 1px solid #336699; +} + +#main-copy .topOfPage { + color: #66cccc; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* # Footer # */ +#footer { + color: black; + background-color: #eeeeee; + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + + +/* GENERAL */ + +table { + border: solid 1px black; +} +th { + background-color: #abc; + border: solid 1px black; + text-align: center; +} +td { + background-color: #def; + border: solid 1px black; +} + +hr { + border-width: 0px 0px 0.1em 0px; + border-color: black; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +pre { + margin-left: 2em; + font-size: 1.2em; +} + +blockquote { + border-left: 1px solid blue; + font-style: italic; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + +.doNotDisplay { display: none; } + + +.notify_errors, +.notify_notes, +.notify_success { padding: .8em; margin-bottom: 1em; border: 1px solid #ddd; } + +.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } +.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } +.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } +.notify_errors a { color: #8a1f11; } +.notify_notes a { color: #514721; } +.notify_success a { color: #264409; } + + +/* # Page/Handler specific # */ +h1.dir-list-head, ul.dir-list { + text-transform: capitalize; + font-weight: bold; +} +ul.sitemap-list a { + text-transform: capitalize; +} + +/* # Junk: should move elsewhere # */ +/* S-pam */ +.gpam { text-align: center; } +.gpam table, .gpam th, .gpam td { border: none; } + + diff --git a/www.suckless.org/common/broken_programs.md b/www.suckless.org/common/broken_programs.md @@ -0,0 +1,44 @@ +BROKEN PROGRAMS +=============== + +There are plenty broken X programs. Go bug the developers of these +broken programs to fix them. Here are some of the main causes of this +brokenness: + +* The program assumes a specific window management model, i.e. + assumes you are using a WIMP-window manager like those found in KDE + or Gnome. This assumption breaks the [ICCCM conventions](http://tronche.com/gui/x/icccm/). +* The application uses a fixed size - this limitation does not fit + into the world of tiling window managers very well, + and can also be seen as breaking the ICCCM conventions, because a + fixed sized window assumes a specific window management model as + well (though the ICCCM does not forbid fixed-size windows). In any + case, the ICCCM requests that clients accept any size the window + manager proposes to them. +* The program is based on strange non-standard window manager + hints that only work properly with a window manager supporting + these extensions - this simply breaks the ICCCM as well. E.g. trash + icon programs. +* The program does not conform to ICCCM due to some missing or + improperly set hints. + +WORKAROUND +---------- + +If you still need some program which expects a floating WM, use it in +floating mode. + +The following programs are broken (see [cool programs](/common/cool_programs.html) for saner alternatives): + +* beep-media-player +* [Firefox](http://www.mozilla.org/products/firefox) (doesn't set the + TRANSIENT_FOR hint correctly on its download dialog) +* [GIMP](http://www.gimp.org/) (GIMP expects a float environment to + be useable) +* gqview +* gthumb +* mplayer with GUI (assumes special window management model. It works + without the GUI) +* Xchat +* xine (same as xmms) +* XMMS (assumes fixed size, doesn't set transient_for hint properly) diff --git a/www.suckless.org/common/bugs.md b/www.suckless.org/common/bugs.md @@ -0,0 +1,28 @@ +BUGS +==== + +Debugging +--------- +If you find any crashes, please send a full backtrace to the dedicated mailinglist. +You can create backtraces with `gdb`: + +Before starting a program, you may have to allow core file creation. It is +recommended that you put this in your profile: + + $ ulimit -c unlimited + +Then start the program as usual. + +After the program crashes, do the following: + + $ gdb --quiet `which program` /path/to/core + gdb> bt full + +If you encounter freezes (no crash at all) of the program, you can debug as follows: + + $ gdb --quiet `which program` --attach `pgrep -o program` + gdb> bt full + +Send the output of that command to the mailinglist along with the output of +`program -v`! Thank you! + diff --git a/www.suckless.org/common/community.md b/www.suckless.org/common/community.md @@ -0,0 +1,61 @@ +COMMUNITY +========= + +Mailing lists +------------- + +* `dwm@suckless.org` - for dwm users, development discussion, bug reports, patches, and general discussion +* `hackers@suckless.org` - commit messages and diffs from all suckless projects are posted here, and can be replied to +* `wiki@suckless.org` - for discussion about wiki, also automatic wiki commit messages are posted here. +* `wmii@suckless.org`- for wmii users, bug reports, and general discussion + +### Mailing list commands + +Attach one of the following commands to the username part of the mailing list's e-mail address: + +* `+subscribe` - subscribe to the mailing list +* `+subscribe-digest` - subscribe to the digest version of the mailing list +* `+subscribe-nomail` - subscribe without receiving e-mails from the mailing list +* `+unsubscribe` - unsubscribe from the mailing list +* `+unsubscribe-digest` - unsubscribe from the digest version +* `+unsubscribe-nomail` - receive e-mails from the maing list +* `+get-N` - retrieve message number N +* `+help` - receive detailed description of the mailing list commands + +Mailing lists web archive +------------------------- + +Archive of all mails posted to mailing lists is accessible via [http://lists.suckless.org/](http://lists.suckless.org/) + +* [dwm mailing list archive][dwmarchive] +* [hackers mailing list archive][hackersarchive] +* [wiki mailing list archive][wikiarchive] +* [wmii mailing list archive][wmiiarchive] + +Related lists +------------- + +* [9fans](http://plan9.bell-labs.com/wiki/plan9/mailing_lists/#9fans) - Fans of the [Plan 9 from Bell Labs](http://9fans.net) operating system. +* [inferno-list](http://plan9.bell-labs.com/wiki/plan9/mailing_lists/#INFERNO-LIST) - Inferno users and developers + +IRC +--- + +The channels are in the [OFTC](http://www.oftc.net) IRC network: [irc.oftc.net](irc://irc.oftc.net/) + +Official channels of suckless.org projects: + +* [#wmii](irc://irc.oftc.net/#wmii) +* [#dwm](irc://irc.oftc.net/#dwm) + +Other popular channels: + +* [#9p](irc://irc.oftc.net/#9p) +* [#acme](irc://irc.oftc.net/#acme) +* [#plan9](irc://irc.ofc.net/#plan9) (also [#plan9](irc://irc.freenode.net/#plan9)) +* [#inferno](irc://irc.freenode.net/#inferno) + +[dwmarchive]: http://lists.suckless.org/dwm/ +[hackersarchive]: http://lists.suckless.org/hackers/ +[wikiarchive]: http://lists.suckless.org/wiki/ +[wmiiarchive]: http://lists.suckless.org/wmii/ diff --git a/www.suckless.org/common/cool_programs.md b/www.suckless.org/common/cool_programs.md @@ -0,0 +1,98 @@ +COOL PROGRAMS +============= + +Some programs work well with wmii or dwm. Some general rules of thumb +for judging a programs as usable are: + +* The program will accept any window size +* The program consists of a single window (There are no nested windows, such as in Xpdf) + +This covers most console-based programs and programs from [plan9port][]. + +Text Editors +------------ +* [acme][acme] - [Rob Pike][rob]'s framing text editor for Plan 9. Included in [plan9port][]. +* [nvi](http://www.bostic.com/vi/) - A small, multiple file vi-alike. +* [sam](http://swtch.com/plan9port/man/man1/sam.html) - An editor by [Rob Pike][rob] with inspiration from ed. +* [traditional vi](http://ex-vi.sourceforge.net/) - A fixed version of the original vi. +* [vim](http://www.vim.org) (With the GUI, use `:set go+=c` to kill popup dialogs) +* [wily](http://www.cs.yorku.ca/~oz/wily/) - An acme clone for POSIX. + +Audio Players +------------- +* [cmus](http://onion.dynserv.net/~timo/cmus.html) +* [cplay](http://mask.tf.hut.fi/~flu/hacks/cplay/) +* [moc](http://moc.daper.net/) +* [mpd](http://www.musicpd.org/) - A client/server based music player with console and graphical front-ends. +* [mpg123](http://www.mpg123.de/) - A console mpg player which doesn't use auto*hell, or extra libraries. +* [mpg321](http://mpg321.sourceforge.net) +* [PyTone](http://www.luga.de/pytone/) - PyTone is a music jukebox written in Python with a curses based GUI. It provides features like crossfading and multiple players, special emphasis is put on ease of use. +* [vorbis-tools](http://www.xiph.org/) (Ogg/FLAC) - Command-line tools to play Ogg and FLAC files. + +Media Players +------------- +* [mplayer](http://www.mplayerhq.hu/) (without GUI) - You know mplayer, but you may not know that it works well without the GUI. +* smplayer + +Utilities +--------- +* [9menu](http://www.freshports.org/x11/9menu/) - A menu program based on the Blit-style menus so prevalent in Plan 9. + A take on it is included with wmii. +* [dmenu](/programs/dmenu.html) - Obvious + +Image Viewers +------------- +* [feh](http://linuxbrit.co.uk/feh/) +* [jpg/gif/bmp/png][plan9port] - Simple programs from Plan 9 to display images in no-frills windows. Included with plan9port. +* [page][plan9port] - Plan 9's image/document viewer program. Included with plan9port. +* [qiv](http://www.klografx.net/qiv/) +* [xli](http://pantransit.reptiles.org/prog/) +* [xzgv](http://sourceforge.net/projects/xzgv) + +IRC Clients +----------- +* [acme:SAC](http://caerwyn.com/acme/index.html) +* [ii](/programs/ii.html) - A FIFO based IRC client which is part of the suckless.org project. +* [ircc](http://www.r-36.net/ircc.tgz) - A no-frills, ncurses free, console-based IRC client. +* [Irc](http://swtch.com/irc/) +* [ircrc](http://plan9.bell-labs.com/sources/contrib/fgb/rc/ircrc) - An rc-based IRC client similar to ircc. Needs minor modification to run on UNIX. +* [irssi](http://www.irssi.org/) +* [sic](/programs/sic.html) - Another suckless.org IRC client. Similar to ircc. + +Mail Clients +------------ +* [heirloom-mailx](http://heirloom.sourceforge.net/mailx.html) - A mail client based on the original Berkeley Mail 8.1 with many new features. +* [Mail][plan9port] - A mail client for [acme][acme]. Included with plan9port. +* [mutt](http://www.mutt.org/) +* [muttator](http://vimperator.org/) - A Thunderbird extension to make it keyboard friendly and mutt/Vim-like. +* [nmh](http://www.nongnu.org/nmh/) +* Sylpheed claws + +Instant Messaging Clients +------------------------- +* [bitlbee](http://www.bitlbee.org/) - A program to translate IM protocols to IRC. You can now IM from your IRC client, and you don't even need to install anything. +* [centericq](http://konst.org.ua/centericq/) +* [centerim](http://www.centerim.org/) - A centericq fork. +* [climm](http://www.climm.org/) +* [mcabber](http://www.lilotux.net/~mikael/mcabber/) - A console jabber client. +* [ysm](http://ysmv7.sourceforge.net/) + +Web Browsers +------------ +* [Vimperator](http://vimperator.org/) - An extension to make Firefox keyboard friendly and Vim-like. + Developed in part by wmii's maintainer. +* [Conkeror](http://www.conkeror.org/) - A Gecko based browser, imparting it Emacs style key bindings, appearances, and behaviors. +* [Dillo](http://www.dillo.org/) (try the i18n version) +* [ELinks](http://elinks.or.cz/) +* [links2](http://links.twibright.com/) +* [Lynx](http://lynx.isc.org/) +* [w3m](http://w3m.sf.net/) + +Web Servers (httpd) +------------ +* [Nostromo](http://www.nazgul.ch/dev_nostromo.html) + +[rob]: http://herpolhode.com/rob/ +[plan9port]: http://swtch.com/plan9port/ +[acme]: http://plan9.bell-labs.com/sys/doc/acme.html + diff --git a/www.suckless.org/common/donations.md b/www.suckless.org/common/donations.md @@ -0,0 +1,34 @@ +DONATIONS +========= +We thank all people who have donated or are donating in one way or another +to a suckless.org related project. We kindly ask to continue donating to the +suckless.org project. As the project grows and grows, there are plans to get +in touch with the [GSoC](http://code.google.com/soc/2008/) in 2009 to sponsor +more less sucking projects we have in mind. + +Present +------- +Following people are currently donating in one or another way to the suckless.org project: + +* Jason Thigpen donates a slicehost server, which hosts the source code and the tarballs of our projects. +* Anselm R Garbe donates all other servers currently in use. +* Filippo Negroni donated <b> 10 GBP </b> +* Markus Schnalke donated <b> 10 EUR</b> + +Past +---- +Following people have donated to the [wmii](/wmii) resp. [dwm](/dwm) project +certain amounts of money, which have been used for the dedicated server rent +in the past: + +* Sebastian Noack donated <b> 50 EUR </b> +* Jason Thigpen donated <b> 100 USD </b> +* Markus Schnalke donated <b> 20 EUR </b> +* Enno 'Gottox' Boland donated <b>50 EUR</b> +* Ivan F. Villanueva B. donated <b>20 EUR</b> +* Alexandre Dulaunoy donated <b>100 EUR</b> +* Alexis Hildebrandt donated <b>100 EUR</b> +* Al Wong (aka alvin) donated <b>100 USD</b> +* Heiko Schlichting (aka rundstutzen) donated <b>100 EUR</b> + + diff --git a/www.suckless.org/common/dynamic_window_management.md b/www.suckless.org/common/dynamic_window_management.md @@ -0,0 +1,41 @@ +DYNAMIC WINDOW MANAGEMENT +========================= + +We think that static window management as seen in Ion or wmi-10 is a far too +rigid and inflexible working environment. In acme, larswm, and oberon, dynamic +window management frees the user from these limitations. The user can start as +many applications and windows as he likes, and easily arrange them in a useful +way, helped by the window manager - the working environment changes with the +tasks the user is performing. The experience is very fluid and natural. +Similar concepts have been introduced in wmii and dwm. + +Dynamic window management states that it is the window manager's job to manage +windows - and not the user's job to have to set up some specialized layout that +will only work for one specific work scenario. This has been the larswm motto +for a long time. In contrast to static window management, the user rarely has +to think about how to organize windows, no matter what he is doing or how many +applications are running at the same time. The window manager adapts to the +current environment and helps the user manage and mold it to his needs, rather +than forcing it to use a preset, fixed layout and trying to shoehorn all +windows and applications into it. + +Dynamic window management has many advantages - you can create and tear down +whole working environments in a matter of seconds rather than spending time +fine-tuning a fixed layout that cannot work well in all cases. The number and +nature of windows you work with changes all the time, and a dynamic window +manager lets you adapt to that and always efficiently use your precious screen +real estate. + +Some will argue that you should setup a different static workspace for each of +the tasks you perform (one for web browsing, one for email reading, one for +coding, etc.), but that is just a workaround for the limitations of static +window management, and it doesn't account for the many sub-usage patterns each +main task has. + +For example: the layout you use during debugging would probably be quite +different to the one used during refactoring, you might want to have a patch +someone emailed you in view while you look at some code, or edit a +configuration file while you look at a man page or website. Dynamic window +management lets you mix and match on the fly to always have the windows you +need in view, and only the windows you need, without the need to reserve extra +space which you may or may not end up using. diff --git a/www.suckless.org/common/faq.md b/www.suckless.org/common/faq.md @@ -0,0 +1,9 @@ +FAQ +=== +Why don't you use autoconf, et al.? +----------------------------------- +We don't use auto*hell for various reasons, start here: + +* [&#8220;Stop the autoconf insanity! Why we need a new build system.&#8221;](http://freshmeat.net/articles/view/889/) +* [&#8220;Why autoconf, automake and libtool fail&#8221;](http://www.ohse.de/uwe/articles/aal.html) +* [&#8220;[9fans] configure misery&#8221;](http://lists.cse.psu.edu/archives/9fans/2003-November/029714.html) diff --git a/www.suckless.org/common/index.md b/www.suckless.org/common/index.md @@ -0,0 +1,57 @@ +SUCK LESS PHILOSOPHY +==================== + +Our philosophy exemplified, dwm-1.0 vs dwm-5.1 +---------------------------------------------- + @@ -1,17 +1,7 @@ + void + -tag(Arg *arg) + -{ + - unsigned int i; + - + - if(!sel) + - return; + - + - for(i = 0; i < ntags; i++) + - sel->tags[i] = False; + - sel->tags[arg->i] = True; + - settitle(sel); + - if(!isvisible(sel)) + - arrange(NULL); + - else + - drawstatus(); + +tag(const Arg *arg) { + + if(sel && arg->ui & TAGMASK) { + + sel->tags = arg->ui & TAGMASK; + + arrange(); + + } + } + +Many (open source) hackers are proud if they achieve large amounts of code, +because they believe the more lines of code they've written, the more progress +they have made. The more progress they have made, the more skilled they are. +This is simply a delusion. + +Most hackers actually don't care much about code quality. Thus, if they get +something working which seems to solve a problem, they stick with it. If this +kind of software development is applied to the same source code throughout its +entire life-cycle, we're left with large amounts of code, a totally screwed +code structure, and a flawed system design. This is because of a lack of +conceptual clarity and integrity in the development process. + +Code complexity is the mother of bloated, hard to use, and totally inconsistent +software. With complex code, problems are solved in suboptimal ways, valuable +resources are endlessly tied up, performance slows to a halt, and +vulnerabilities become a commonplace. The only solution is to scrap the entire +project and rewrite it from scratch. + +The bad news: quality rewrites rarely happen, because hackers are proud of +large amounts of code. They think they understand the complexity in the code, +thus there's no need to rewrite it. They think of themselves as masterminds, +understanding what others can never hope to grasp. To these types, complex +software is the ideal. + +Ingenious ideas are simple. Ingenious software is simple. Simplicity is the +heart of the Unix philosophy. The more code lines you have removed, the more +progress you have made. As the number of lines of code in your software +shrinks, the more skilled you have become and the less your software sucks. diff --git a/www.suckless.org/common/other_projects.md b/www.suckless.org/common/other_projects.md @@ -0,0 +1,11 @@ +OTHER PROJECTS +============== +There are several other projects which are inspired by the spirit of suckless. + +* [dietline](http://news.nopcode.org/dietline.c) +* [dvtm](http://www.brain-dump.org/projects/dvtm/) +* [dzen](http://dzen.geekmode.org/) +* [kelp](http://kelp.sf.net) +* [sltar](http://s01.de/~gottox/index.cgi/proj_sltar) +* [smu](http://s01.de/~gottox/index.cgi/proj_smu) +* [bgs](http://s01.de/~gottox/index.cgi/proj_bgs) diff --git a/www.suckless.org/common/patches.md b/www.suckless.org/common/patches.md @@ -0,0 +1,28 @@ +PATCHES +======= + +diff generation +--------------- +For mercurial users: + + cd program-directory + hg diff > program-X.Y-yourpatchname.diff + +For tarballs: + + cd modified-program-directory/.. + diff -up original-program-directory modified-program-directory > program-X.Y-yourpatchname.diff + +where `X.Y` is a wmii tag name or version number. + +patch program +------------- +For mercurial users: + + cd program-directory + hg patch path/to/patch.diff + +For tarballs: + + cd program-directory + patch -p1 < path/to/patch.diff diff --git a/www.suckless.org/common/style_guide.md b/www.suckless.org/common/style_guide.md @@ -0,0 +1,49 @@ +Style guide of code hosted on suckless.org +========================================== +When it comes to code style questions, it is very likely that individual +programmers will disagree. It is absolutely fine to use an individual style for +individual projects, especially if only one developer is involved. However, if +there are two or more programmers involved in a project, a guidelines gets +handy to meet the first basic rule we follow: + +* Code developed by different individuals should follow a common style among those to found a consistent base. + +Thus consistency in the code style being used is more important than any +particular detail of the style itself. Due the fact, that most software of +suckless.org has been developed by more than one individual, some sort of +common style found in the code appeared during the past years. This common +style is described in detail, further on. + +C++ +--- +C++ was used in the early beginning and has been abandoned for various reasons. + +A summary of those reasons is: Nearly nobody understands C++ in all its +facettes and details. C++ has been designed and evolved to support any +programming language paradigm and feature invented by programming +language designers until the OO hype and beyond. This leads to mutual +exclusive programming paradigms and styles in one language and basically +destroys the simplicity and clarity of its ancestor C. The usual +workaround in the C++ world is to stick to certain C++ subsets, like only using +one calling convention, not using exceptions, not using STL but using libstdc++ +etc. + +It took quite a while for some of us to realize that C++ leads to more complex +software in general, because it provides the feature richness to do so. This is +especially dangerous if average programmers are involved in a project. In our +experience it is much more likely that a C++ project driven by average +programmers will fail, than a C project. The reason for this is simple: C++ is +hard to deal with when used in all its feature richness. + +We don't argue that C++ software performs better or worse than software written +in C. However we argue that in general C++ software performs poorer than +software written in C, because of its tendency to complexity and its hidden +pitfalls like expensive function calls in loops or too many inlines. + +All these problems do not happen with C, because C is to simple for being +misused in our opinion. + +So the second rule of this style guide concludes: + +* We use C as primary programming language because it enforces clear and simple software. + diff --git a/www.suckless.org/favicon.ico b/www.suckless.org/favicon.ico Binary files differ. diff --git a/www.suckless.org/gsoc.md b/www.suckless.org/gsoc.md @@ -0,0 +1,126 @@ +Google Summer of Code 2009 +========================== +Suckless.org is applying as a mentoring organization for [Google Summer of +Code 2009](http://code.google.com/soc/). + +Background +---------- +We are home of quality software such as dwm, dmenu, libixp, and wmii, with +a focus on simplicity, clarity and frugality. Our [philosophy](/common/) is +about keeping things simple, minimal and elitist. We believe it should become +the mainstream philosophy in the IT sector. Unfortunately the tendency to +complex, error-prone and slow software seems to be predominanat in present-day +software industry. We intend to prove the opposite with our software projects. + +Our project focuses on advanced and experienced computer users. In contrast +to the usual proprietary software world or many mainstream Free Software +projects who focus more on average and normal end users, we think that +experienced users are pretty much ignored by software projects. This is +particularly true for user interfaces, such as graphical environments on +desktop computers, on mobile devices, and in so-called Web applications. We +believe that the market of experienced users is growing continously, because +every computer user advances during the time and looks for more appropriate +solutions for his work style from time to time. + +Furthermore, minimalism quickly yields reasonable and attainable results; +other organizations with a different approach may finish with unreliable +and uncompleted projects. + +Unlike most Free Software projects strong leadership is essential to us. +Our projects are usually led by a single person, who maintains the mainline +code repository. Users discuss, review and contribute to the project on +[Dedicated project mailing lists and on IRC](/common/community.html). + +Mentors +------- +We intend that each student will be the project leader of his/her particular +project and the only individual with commit privilege for the repository. + +There will one mentor and one backup mentor per project. In addition, the +suckless.org community will act as more rigid external reviewers of the +student's progress, and also of the mentor. + +The following persons have volunteered to serve as mentor during Google +Summer of Code 2009: + +* Anselm R. Garbe <<garbeam@gmail.com>> + +If you want to act as a mentor as well, please contact Anselm before you +add yourself to the list. + +General ideas +------------- +Our project ideas for Google Summer of Code 2009 are in general intended +to focus on: + +* Graphical user interfaces for expert users (such as more advanced + concepts for mail clients, messaging clients, music players, text editors) +* Web applications for expert users collaborating the GUI concepts +* Mobile applications for expert user collaborating the GUI concepts +* General userland enhancements Unix-like operating systems, in particular + GNU/Linux +* Audio applications +* Image/Streaming/Gallery desktop and web applications +* Foundations of a new windowing system for Unix-like operating systems + (based on xorg drivers, but no X11- or XServer-dependency) +* Improvements of our existing software projects + +Conrete ideas +------------- +Post your project ideas for students projects during Google Summer of Code +2009 here. See the [FAQ entry][FAQ] on the ideas list for further details. + +The listed ideas generally require good knowledge in C and experience with +Unix-like operating systems. Their severity ranges from low to medium. +An academical background in computer science is usually not required. + +Please consider to contact us first if you want to apply for a project, so we +can discuss the ideas at first and avoid misunderstandings in the first place. + +### Unix utilities + +Although there have been several attempts to replace GNU coretutils +on GNU/Linux by smaller counterparts, no suckless collection of fully +POSIX-compliant utilities exits. Existing programmes should be evaluated +and reused if possible. + +### Port dwm to Microsoft Windows + +Many dwm users who have to use Microsoft Windows regularly have proposed to +port dwm to Microsoft Windows. There are several tiling window managers, but +unfortunately the majority are proprietary software and can't keep up with dwm. + +### ddm + +There is no suckless display manager for X11 at the moment, thus a new +dynamic display manager (ddm) should designed and implemented. + +### Comprehensive code audit + +All software hosted at suckless.org should undergo a comprehensive +code audit. This includes search for vulnerabilities, verification of +all algorithms, proof-reading of the documentation and possibly a code +clean-up. The result has to be a report on all found errors and maybe some +advice for the project maintainers. This task requires experience in this +field. + +### stm + +There seems to be a need for a suckless ticket management system, as this +is a common task in today's daily activity in business and private time +management. This task includes the design and implementation of a suckless +system that solves the problem of TTS, ARS and TRS all together. + +### Suckless programming language + +Although sufficient, C is not a perfect programming language. It suffers from +legacy syntax and semantics and lacks features that make designing libraries +and developing abstractions much easier. To address these shortcomings the +student should survey the problems of C, evaluate possible solutions and +enhance the language. + +Perhaps this is a bit utopian, but it's still worth considering. Anyhow, it +should be possible to build a working prototype by using existing software +for parsing and code generation. + +[FAQ]: http://code.google.com/opensource/gsoc/2009/faqs.html#0_1_ideas_5167658354380897_772 diff --git a/www.suckless.org/index.md b/www.suckless.org/index.md @@ -0,0 +1,48 @@ +suckless.org +============ +Dedicated to software which sucks less. + +Home of [wmii](/wmii/), [dwm](/dwm/), [libixp](/libs/libixp.html), and other quality +software with a focus on simplicity, clarity, and frugality. + +Read more about our [philosophy](/common/index.html) and join us on the [mailing list](common/community.html). + +08/02/2009 +---------- +New [dwm](/dwm/index.html) release: [dwm-5.4.1](http://code.suckless.org/dl/dwm/dwm-5.4.1.tar.gz) + +09/09/2008 +---------- +New [dmenu](/programs/dmenu.html) release: [dmenu-3.9](http://code.suckless.org/dl/tools/dmenu-3.9.tar.gz) + +09/08/2008 +---------- +New [ii](/programs/ii.html) release: [ii-1.4](http://code.suckless.org/dl/tools/ii-1.4.tar.gz) + +02/08/2008 +---------- +New [wmname](/programs/wmname.html) release: [wmname-0.1](http://code.suckless.org/dl/tools/wmname-0.1.tar.gz) + +29/07/2008 +---------- +New [sic](/programs/sic.html) release: [sic-1.0](http://code.suckless.org/dl/tools/sic-1.0.tar.gz) + +New [slock](/programs/slock.html) release: [slock-0.9](http://code.suckless.org/dl/tools/slock-0.9.tar.gz) + +New [sselp](/programs/sselp.html) release: [sselp-0.2](http://code.suckless.org/dl/tools/sselp-0.2.tar.gz) + +15/07/2008 +---------- +Launched new [www.suckless.org](http://www.suckless.org) wiki. + +09/07/2008 +---------- +New [diri](/programs/diri.html) release: [diri-0.3](http://code.suckless.org/dl/misc/diri-0.3.tar.gz) + +16/11/2007 +---------- +New [wmii](/wmii/) release: [wmii-3.6](http://code.suckless.org/dl/wmii/wmii-3.6.tar.gz). + +14/07/2007 +---------- +New [ii](/programs/ii.html) release: [ii-1.3](http://code.suckless.org/dl/tools/ii-1.3.tar.gz). diff --git a/www.suckless.org/people/Anselm.md b/www.suckless.org/people/Anselm.md @@ -0,0 +1,4 @@ +ABOUT Anselm (aka arg aka garbeam) +================================== + +Currently nothing special. diff --git a/www.suckless.org/people/Anydot.md b/www.suckless.org/people/Anydot.md @@ -0,0 +1,6 @@ +Anydot +====== + +Some day, there might be something. Coming soon :-) + +Test2 diff --git a/www.suckless.org/people/Gottox.md b/www.suckless.org/people/Gottox.md @@ -0,0 +1,6 @@ +Gottox +====== + +Author of more sucking suckless software. + +* [site](http://s01.de/~gottox/) diff --git a/www.suckless.org/people/Kris.md b/www.suckless.org/people/Kris.md @@ -0,0 +1,247 @@ +Kris Maglione aka JG +==================== + +I'm the current maintainer of [wmii](/wiki/wmii/). + +This is a place for me to post the random scripts that I'm compelled to write and consider useful. + +Scripts +------- +*Note:* I've updated most of these, and haven't posted the updates... I'll get around to it eventually. + +All of these scripts are written in rc, and require plan9port to run. + +* [webpaste](/~jg/webpaste) - A script which reads its standard input or the files + on its command line and prints a URI where the data can be retrieved. Requires: curl. + +* [pasteweb](/~jg/pasteweb) - Similar to webpaste, but reads the contents of your + clipboard and replaces them with a URI where the contents can be retrieved. + Requires: curl, and one of xclip, xsel, or sselp (in which case, it will print the URI) + +* [plastfm](/~jg/plastfm) - An rc script which connects to Last.FM and plays its stream with + a command-line mp3 player. Commands are read from the standard input and song info is + printed to the standard error. Requires: mpg123 or similar client. *This has been replaced + by [last](/hg.rc/last).* + +* [eris.rc](/~jg/eris.rc) - This is an IRC bot, written in rc, of course, which prints mercurial + commits to channels. The name comes from George Neis' python version. Requires: sic or similar. + +* [hgnotify.rc](/~jg/hgnotify.rc) - This is an mailing list bot which posts mercurial commits + along with their diffs to a mailing list, or arbitrary mailing address. The sender, subject, + and date all reflect those of the commit. Requires: A sendmail compatible MTA. + +* [logger.rc](/~jg/logger.rc) - A simple IRC logger bot, which uses the httplog logger to handle + log rotation. It also extracts lines beginning with 'BUG' and writes them to a separate file. + Requires: httplog, sic. + + +`wmii` Scripts +============== +These are just some of the random wmii scripts I've written. +I find them immensely useful, and they serve as good examples. +Most use the `wmii.rc` script which I've written to make +`rc.wmii` more straightforward, and plugins easier. But, I haven't +released it yet, so bear with me. + +`rc.keymap` +----------- +A simple keymap-changer applet. It doesn't know any keyboard +shortcuts for the moment. + + #!/bin/rc + . 9.rc + . wmii.rc keymap + + # Begin Configuration + bar=s7~1keymap + choices=(us dvorak) + # End Configuration + + keymap=$choices(1) + + fn setkeymap { + if(! ~ $"* '') { + keymap=$"* + setxkbmap $keymap + echo km:$"keymap | wmiir create /rbar/$bar + } + } + + setkeymap $keymap + + fn Event-RightBarMouseDown { + if(! $1 1 && ~ $2 $bar) + setkeymap `{wi_9menu -initial $keymap $choices} + } + + wi_eventloop + +`rc.vol` +-------- +Adjust the volume with Alt-Plus/Alt-Minus (should use `$MODKEY`...). +My first bar just happens to be named `agabaga`, because I picked +a random word which started with a ages ago, and the name stuck. + + #!/bin/rc + . 9.rc + . wmii.rc + + # Begin Configuration + numbars = 20 + mixer = pcm + bar = agabaga + delay = 2 + # End Configuration + + fn mset { + var=$1; shift + eval $var' = `{hoc -e $"*}' + } + + mset div 100 / $numbars + + fn readvol { mixer $* | awk -F'[ :]+' '{print $7}' | head } + + xpid = () + + fn changevol { + diff = $1; shift + cur = `{readvol $mixer} + mset new $cur + '(' $diff ')' + + mixer $mixer $new >/dev/null + + awk -vnew'='$new -vdiv'='$div -vn'='$numbars \ + 'BEGIN{ s=sprintf("% *s", new/div, "|"); + gsub(/ /, "-", s); + printf "[% -*s] %d%%", n, s, new; + exit }' | + wmiir write /rbar/$bar + + /bin/kill $xpid >[2]/dev/null # Let's hope this isn't reused... + { sleep $delay; wmiir xwrite /rbar/$bar ' ' }& # Bug... + xpid = $apid + } + + fn Key-Mod1-^(KP_Add Shift-plus) { + changevol $div + } + + fn Key-Mod1-^(KP_Subtract Shift-minus) { + changevol -$div + } + + wi_eventloop + +`rc.mail` +--------- +A mail monitor. I've posted it elsewhere. It reads the names of +windows on the mail tag and checks for mail in Maildirs with +corresponding names. It treats `inbox` specially. This is posted +elsewhere. + + #!/bin/rc + . 9.rc + + # Configuration + #How often to check + delay=5 + maildir=$home/Maildir + # End Configuration + + echo Start mail | wmiir write /event + + { wmiir read /event & + while(echo Tick) + sleep $delay + } | while(*=`{read}) + switch($1) { + case Start + if(~ $2 mail) + exit + case Tick + wmiir read /tag/mail/index | + while(l = `{read}) { + b = `{echo $l | awk -F: '{print $3}'} + if(~ $b inbox) + b = '' + if(! ~ $#b 0 && test -d $maildir/.$b/new) { + if(~ `{ls -l $maildir/.$b/new | wc -l} 0) + wmiir xwrite /client/$l(2)^/ctl Urgent off + if not + wmiir xwrite /client/$l(2)^/ctl Urgent on + } + } + } + +`rc.status` +----------- +My date/time/load average bar. Straightforward. + + #!/bin/rc + . 9.rc + . wmii.rc rc.status + # periodically print date and load average to the bar + + fn date { /bin/date $* } + + bar_load=s5load + bar_date=s9date + bar_time=time + bars=($bar_date $bar_load) + + fn sigterm sigint { + for(i in ($bars $bar_time)) + wmiir remove /rbar/$i >[2]/dev/null + exit + } + + for(i in $bars $bar_time) + wmiir remove /rbar/$i >[2]/dev/null + + sleep 2 + for(i in $bars) + echo -n $wmiinormcol | wmiir create /rbar/$i + echo -n $wmiifocuscol | wmiir create /rbar/$bar_time + + { + while (wmiir xwrite /rbar/$bar_time `{date +'%H:%M:%S %Z'} + && wmiir xwrite /rbar/$bar_date `{date +'%a, %e %b'} + && wmiir xwrite /rbar/$bar_load `{uptime | sed 's/.*://; s/,//g'}) + sleep 1 + } >[2]/dev/null + +`rc.temp` +--------- +A temperature monitor for the bar. It has Fahrenheit along with +Celsius, because I'm stuck using both (tell someone in the US that +it's -3°C outside and expect little more than a blank stare). + +This one uses weatherget. It's in ports... I don't know where else +to find it. + + #!/bin/rc + . 9.rc + + # Begin Configuration + zip=12345 # For those outside the us, this needn't be a zip code. + bar=/rbar/s7temp + pidf=$home/.wmii-3.5/pid.temp + + deg=° + # End Configuration + + /usr/bin/kill `{cat $pidf} >[2]/dev/null + echo $pid >$pidf + + wmiir create $bar </dev/null + + while() { + {weatherget -s $zip -m; weatherget -s $zip -S} | + awk '$1=="Temperature"{print $3"'$deg'"$4}' | + tr '\012' ' ' | + wmiir create $bar || + exit + sleep 600 + } + diff --git a/www.suckless.org/people/Other_people.md b/www.suckless.org/people/Other_people.md @@ -0,0 +1,70 @@ +OTHER PEOPLE +============ + +The following people are/were involved mainly in wmii and dwm development as +developers and contributors. If you are missing, feel free to add yourself. + +* Alexandre DE DOMMELIN (contributed a theme and works on PHP based theme configurator) +* [Anthony Martin](http://pbrane.org) (ality) (developer, bug fixes, documentation) +* AntThyKem (contributed rpm package) +* Bernhard Leiner (wmipager improvements) +* Bob Crochelt (various feedback) +* Brian Dorsey (contributed various feedback) +* carmee (contributed various feedback) +* chem (bugs and various feedback) +* Christian Schneider (provides the Slackware package) +* Christof Musik (various feedback, small fixes) +* [Christoph Wegscheider](http://www.wegi.net) (python bindings of old libixp, former irc logging) +* Daniel W&auml;ber (wabu) (fixes and patches) +* Denis Grelich (ex-maintainer) +* Fabian Braennstroem (contributed archlinux packages) +* Fernan Bolando (one of the most active WMI testers, contributed various ideas and feedback concerning the slot) +* Fernando T. C. Lemos (contributed several themes) +* Filippo Erik Negroni (contributes wiki documentation to dwm) +* Dr. Frank Boehme (one of the first WMI users, contributed various ideas) +* Frank Ehmsen (contributed several bug reports and various good feature requests) +* Gabriel (various feedback, various color schemes) +* Gavin McCullagh (contributed various ideas) +* Georg Neis (Developer, documentation, tests) +* grayrest (great ideas for the menu, select-frame policy beside many other valuable ideas) +* Hannes Klas (contributed themes and maintains some translations in the Wiki) +* Henning Bekel (various feedback concerning the ratpoison shortcut handling) +* Dr. Johann Pfefferl (several patches which fixed many issues) +* John Pham (Debian Packager, Sysadmin) +* Jonas Domeij (various feedback concerning wmii, default wmi-10 theme) +* Jukka Salmi (fixes and patches) +* Kathryn Andersen (contributed nice theme and valuable newbie feedback) +* Kris Malfettone (various feedback concerning wmir) +* Malte Zorn (various feedback) +* Marcel Manthe (Developer of PATH expansion in wmi-10 input mode) +* Marcin Pawlik (contributed Control-keys patch for input mode) +* Mark Weinem (contributed various ideas) +* Markus Lindorfer (contributed patch to compile on Solaris) +* Martin Moncrieff (various feedback concerning Mathematica issues) +* Mathieu L (contributed various feedback) +* Matthew Allen (contributed several themes and great art assets, works on the WMI mascot) +* Michael Ihde (provided several fixes to the container.h class and documentation) +* [Nico Golde (nion)](http://www.ngolde.de) (testing, fixes, wmii-2 blue theme, [ii developer](http://irc.suckless.org)) +* [Norman Golisz](http://www.zcat.de) (documentation) +* Norman K&ouml;hring (pSy) (developer of szs) +* Oliver Kopp (contributed various feedback) +* Oliver Rendgen (Documentation) +* PEYROUX Jean (BSD Port Maintainer (all platforms)) +* Rainer Trusch (contributed several bug reports and some ideas) +* Rajesh Menon (contributed various feedback) +* Robert Lillack (contributed some ideas to the new window concept) +* Ryan Sorensen (provided various debug input) +* Salva Peiro (gualteri) (user & translation guide-es) +* Sander van Dijk (developer) +* Sebastian Hartmann (Manual pages for wmii) +* Sebastian Roth (several bugfixes in C and Makefiles, Doxyfile) +* [Stefan Kuttler](http://www.netbeisser.de) (inventor of project name) +* Stefan Tibus (fixes and patches) +* [Steffen Liebergeld](http://www.inf.tu-dresden.de/~s1010824) ("A guide to wmii" author) +* Steve Hoffman (various feedback, small fixes) +* Szabolcs Nagy (fixes and patches) +* Tobias Walkowiak (provided various feedback) +* Tuncer Ayaz (contributed some grammar fixes for the Improved GUI concepts paper) +* Uwe Zeisberger (code review, bug fixings) +* Wilson Oliveira (contributed the [wmizer tool](http://clientes.netvisao.pt/petrucci/)) +* yiyus || Jesus Galan (dwm patches a go-go) diff --git a/www.suckless.org/people/Uriel.md b/www.suckless.org/people/Uriel.md @@ -0,0 +1,7 @@ +Uriel +===== +* Homepage: <http://uriel.cat-v.org/> (Previously <http://cat-v.org/who/uriel/>) +* Advogato: <http://advogato.org/person/uriel/> +* See also: <http://www.cat-v.org>, <http://doc.cat-v.org>, <http://harmful.cat-v.org> +* Werc: <http://gsoc.cat-v.org/projects/werc> + diff --git a/www.suckless.org/people/index.md b/www.suckless.org/people/index.md @@ -0,0 +1,3 @@ +People +====== +These are short pages for active members of the suckless.org community. Active contributors are welcome to post information about themselves, and to post relevant material. diff --git a/www.suckless.org/people/spaceinvader.md b/www.suckless.org/people/spaceinvader.md @@ -0,0 +1,4 @@ +spaceinvader +============ + +sandbox page to test dweb diff --git a/www.suckless.org/wiki/index.md b/www.suckless.org/wiki/index.md @@ -0,0 +1,60 @@ +THIS WIKI +========= +This wiki is rather unusual. It currently consists of a [shell +script](http://code.suckless.org/hg/genosite/file) of less than 100 LOC and a +[mercurial](http://www.selenic.com/mercurial) repository containing the wiki +contents and keeping track of the version history and changes. All wiki pages +are written using [markdown](http://daringfireball.net/projects/markdown/) +syntax. + +If you would like to contribute new content, you can clone the wiki to your +local host using the following command: + + hg clone http://www.suckless.org:8000/hg/wiki + +You can make changes to the wiki, though your changes will be reviewed by the +suckless moderators before going public into the mainstream web site. Please +make sure to pull for incoming changes before you push your changes, to +minimize any problems. + + hg push + +The wiki repository above is world-writable. Your changes will be visible +at the PREVIEW upstream wiki web site for upcoming changes at +<http://www.suckless.org:8000/> shortly (*within 5 minutes*). This web site +contains an additional disclaimer at the bottom that any content is not our +responsibility, and is only intended to give you an idea how your changes will +look like once they are accepted. The traffic from this URL is throttled to +*5kb/s* as well, to prevent anyone's abusing it for temporary uploads and +downloads. + +Rules +----- +* If any abuse happens, we will disable the PREVIEW upstream wiki, keep this + in mind. We kindly ask you to not destroy the way we like to collaborate + with the community. +* Please do not add files bigger than *100kb*. +* Please do not add any binary files except screenshots or images related to our software. + You are allowed to add your code patches to the wiki if you do not have an + external web server to serve them to the community. The extension of patches + should be `.diff`. +* The extension of newly created Markdown files has to be `.md`. +* Please do not add HTML files or inline JavaScript. + +*Note:* We perform automatic pre-checks before the PREVIEW upstream wiki is +updated, e.g. following things will be denied: + +* Files with extensions we don't accept. +* Files bigger than 100kb +* Any symbolic links, regardless where they link to + +Credits +------- +Most of the look and feel of this wiki has been developed by [Marco +Squarcina](http://www.minimalblue.com). + +Bugs +---- +Mercurial aborts with the message "unknown bundle compression type" if you want +to push with version 0.9.1. (Maybe this affects every version before 1.0.) +If you use Debian Etch, there is a backport. diff --git a/www.suckless.org/wiki/sandbox.md b/www.suckless.org/wiki/sandbox.md @@ -0,0 +1,17 @@ +SANDBOX +========= +This is a test sandbox, to show all features of markdown. + +Topic +----- +[a link](http://www.suckless.org) + + a bold text + +*italics* + + +Comment +----- +Please add all possibilities of markdown, I had no time for reviewing the code. -- Zwansch +