about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* makefile now sets permissions for executables and man pagesarg@10ksloc.org2006-07-201-0/+6
|
* removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling ↵arg@10ksloc.org2006-07-204-114/+85
| | | | remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
* implemented regexp matching for rulesarg@10ksloc.org2006-07-194-32/+40
|
* applied Jukka's patch with s/ModKeyMask/MODKEY/garg@10ksloc.org2006-07-194-24/+25
|
* removed TODO, because dwm is nearly finishedarg@10ksloc.org2006-07-191-1/+0
|
* reapplied my default keybindingsarg@10ksloc.org2006-07-191-1/+10
|
* alternate dwm.pngarg@10ksloc.org2006-07-191-0/+0
|
* Added tag 0.3 for changeset 7e66082e5092fb0bccd18a3695a0bec52c80fdb2arg@10ksloc.org2006-07-191-0/+1
|
* some changes in the html page 0.3arg@10ksloc.org2006-07-191-2/+2
|
* prepared 0.3arg@10ksloc.org2006-07-191-10/+1
|
* fixed the bug mentioned by Sanderarg@10ksloc.org2006-07-191-3/+7
|
* refactored Sanders code somewhatarg@10ksloc.org2006-07-193-15/+8
|
* implemented fallback for too many clients in stacked modearg@10ksloc.org2006-07-192-3/+10
|
* and another fix...arg@10ksloc.org2006-07-191-1/+1
|
* yet another typo fixarg@10ksloc.org2006-07-191-2/+2
|
* fixed a typoarg@10ksloc.org2006-07-191-1/+1
|
* floating clients get random (x,y) offsets nowarg@10ksloc.org2006-07-191-0/+7
|
* applied Sanders resize patch, fixed lower bugarg@10ksloc.org2006-07-195-19/+43
|
* changed CFLAGsarg@mmvi2006-07-181-5/+5
|
* firefox instance is different nowarg@mmvi2006-07-181-1/+1
|
* changed occurrences of wmii.de into 10kloc.org in dwm.html, because ↵Anselm R. Garbe2006-07-181-8/+8
| | | | 10kloc.org is already working
* implemened distinguishing float/managed geometries of clients (works quite well)Anselm R. Garbe2006-07-185-78/+105
|
* pop on heretagAnselm R. Garbe2006-07-183-8/+16
|
* added heretag command which allows to tag a client of a foreign tag with ↵Anselm R. Garbe2006-07-186-10/+42
| | | | current tag
* using EXIT_stuff in exit() nowAnselm R. Garbe2006-07-182-8/+7
|
* simplified MakefileAnselm R. Garbe2006-07-172-3/+2
|
* added new stuffAnselm R. Garbe2006-07-171-9/+6
|
* updated htmlAnselm R. Garbe2006-07-171-9/+9
|
* patched dwmAnselm R. Garbe2006-07-173-30/+46
|
* updated READMEAnselm R. Garbe2006-07-171-2/+2
|
* Added tag 0.2 for changeset 0a6472e2203994bc5738d40a340d26f7ec9d6062Anselm R. Garbe2006-07-171-0/+1
|
* updated html 0.2Anselm R. Garbe2006-07-171-1/+1
|
* ordered variables in structs and source files alphabeticallyAnselm R. Garbe2006-07-177-77/+70
|
* slight change to dwm.1Anselm R. Garbe2006-07-171-1/+2
|
* simplified man pageAnselm R. Garbe2006-07-162-36/+29
|
* another XSyncAnselm R. Garbe2006-07-161-0/+1
|
* several additions in mouse handling ;)Anselm R. Garbe2006-07-165-65/+59
|
* fixed XSync handling and finished man pageAnselm R. Garbe2006-07-155-16/+64
|
* changing XFlush into XSyncAnselm R. Garbe2006-07-154-6/+11
|
* sanitized other stuffAnselm R. Garbe2006-07-155-142/+136
|
* proceeded with cleaning up, sorting functions, etcAnselm R. Garbe2006-07-157-543/+532
|
* rearranged several stuffAnselm R. Garbe2006-07-1510-444/+442
|
* sanitized namesAnselm R. Garbe2006-07-147-72/+72
|
* rearrangedAnselm R. Garbe2006-07-149-377/+374
|
* I prefer the tiled/floating indicator on the right sideAnselm R. Garbe2006-07-141-5/+9
|
* bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) modeAnselm R. Garbe2006-07-142-1/+7
|
* draw bar on exposure ;)Anselm R. Garbe2006-07-143-7/+9
|
* Added tag 0.1 for changeset d31b5ad96b0ba7b5b0a30928fcf000428339a577Anselm R. Garbe2006-07-141-0/+1
|
* prep 0.1 0.1Anselm R. Garbe2006-07-144-9/+11
|
* fixed crash on zoom if only 1 client existsAnselm R. Garbe2006-07-141-3/+9
|
"p"><span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Delimiter">;</span> <span class="Delimiter">}</span> else if <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Delimiter">;</span> <span class="Delimiter">}</span> else <span class="Delimiter">{</span> raise_error &lt;&lt; maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;first ingredient of 'restore' should be a string, but got &quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>to_string<span class="Delimiter">()</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span> case RESTORE: <span class="Delimiter">{</span> string filename<span class="Delimiter">;</span> if <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> filename = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span class="Delimiter">}</span> else if <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> filename = read_mu_string<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> if <span class="Delimiter">(</span>Current_scenario<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// do nothing in tests</span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string contents = slurp<span class="Delimiter">(</span><span class="Constant">&quot;lesson/&quot;</span>+filename<span class="Delimiter">);</span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> if <span class="Delimiter">(</span>contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> else products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>new_mu_string<span class="Delimiter">(</span>contents<span class="Delimiter">));</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(code)</span> string slurp<span class="Delimiter">(</span>const string&amp; filename<span class="Delimiter">)</span> <span class="Delimiter">{</span> ostringstream result<span class="Delimiter">;</span> ifstream fin<span class="Delimiter">(</span>filename<span class="Delimiter">.</span>c_str<span class="Delimiter">());</span> fin<span class="Delimiter">.</span>peek<span class="Delimiter">();</span> if <span class="Delimiter">(</span>!fin<span class="Delimiter">)</span> <span class="Identifier">return</span> result<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span class="Comment">// don't bother checking errno</span> const int N = <span class="Constant">1024</span><span class="Delimiter">;</span> char buf[N]<span class="Delimiter">;</span> while <span class="Delimiter">(</span>has_data<span class="Delimiter">(</span>fin<span class="Delimiter">))</span> <span class="Delimiter">{</span> bzero<span class="Delimiter">(</span>buf<span class="Delimiter">,</span> N<span class="Delimiter">);</span> fin<span class="Delimiter">.</span>read<span class="Delimiter">(</span>buf<span class="Delimiter">,</span> N-<span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// leave at least one null</span> result &lt;&lt; buf<span class="Delimiter">;</span> <span class="Delimiter">}</span> fin<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span class="Identifier">return</span> result<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span> SAVE<span class="Delimiter">,</span> <span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span> put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;save&quot;</span><span class="Delimiter">,</span> SAVE<span class="Delimiter">);</span> <span class="Delimiter">:(before &quot;End Primitive Recipe Checks&quot;)</span> case SAVE: <span class="Delimiter">{</span> if <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise_error &lt;&lt; maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;'save' requires exactly two ingredients, but got &quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>to_string<span class="Delimiter">()</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> if <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Delimiter">;</span> <span class="Delimiter">}</span> else if <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Delimiter">;</span> <span class="Delimiter">}</span> else <span class="Delimiter">{</span> raise_error &lt;&lt; maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;first ingredient of 'save' should be a string, but got &quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>to_string<span class="Delimiter">()</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> if <span class="Delimiter">(</span>!is_mu_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> raise_error &lt;&lt; maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;second ingredient of 'save' should be an address:array:character, but got &quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>to_string<span class="Delimiter">()</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span> case SAVE: <span class="Delimiter">{</span> if <span class="Delimiter">(</span>Current_scenario<span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Comment">// do nothing in tests</span> string filename<span class="Delimiter">;</span> if <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> filename = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span class="Delimiter">}</span> else if <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> filename = read_mu_string<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> ofstream fout<span class="Delimiter">((</span><span class="Constant">&quot;lesson/&quot;</span>+filename<span class="Delimiter">).</span>c_str<span class="Delimiter">());</span> string contents = read_mu_string<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> fout &lt;&lt; contents<span class="Delimiter">;</span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> if <span class="Delimiter">(</span>!exists<span class="Delimiter">(</span><span class="Constant">&quot;lesson/.git&quot;</span><span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Comment">// bug in git: git diff -q messes up --exit-code</span> <span class="Comment">// explicitly say '--all' for git 1.9</span> int status = system<span class="Delimiter">(</span><span class="Constant">&quot;cd lesson; git add --all .; git diff HEAD --exit-code &gt;/dev/null || git commit -a -m . &gt;/dev/null&quot;</span><span class="Delimiter">);</span> if <span class="Delimiter">(</span>status != <span class="Constant">0</span><span class="Delimiter">)</span> raise_error &lt;&lt; <span class="Constant">&quot;error in commit: contents &quot;</span> &lt;&lt; contents &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(code)</span> bool exists<span class="Delimiter">(</span>const string&amp; filename<span class="Delimiter">)</span> <span class="Delimiter">{</span> struct stat dummy<span class="Delimiter">;</span> <span class="Identifier">return</span> <span class="Constant">0</span> == stat<span class="Delimiter">(</span>filename<span class="Delimiter">.</span>c_str<span class="Delimiter">(),</span> &amp;dummy<span class="Delimiter">);</span> <span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->