summary refs log blame commit diff stats
path: root/lib/dirstore.go
blob: bb58a9dc417826f5d6aaf68178033d715fe22dbc (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                      

                                          


                              

                                                   









                                              








                                                                             
package lib

type DirStore struct {
	dirs      []string
	msgStores map[string]*MessageStore
}

func NewDirStore() *DirStore {
	msgStores := make(map[string]*MessageStore)
	return &DirStore{msgStores: msgStores}
}

func (store *DirStore) Update(dirs []string) {
	store.dirs = make([]string, len(dirs))
	copy(store.dirs, dirs)
}

func (store *DirStore) List() []string {
	return store.dirs
}

func (store *DirStore) MessageStore(dirname string) (*MessageStore, bool) {
	msgStore, ok := store.msgStores[dirname]
	return msgStore, ok
}

func (store *DirStore) SetMessageStore(name string, msgStore *MessageStore) {
	store.msgStores[name] = msgStore
}
<li> dwm don't distinguishes between layers, there is no floating or tiled layer. Wether the clients of currently selected tag are in tiled mode or not, you can re-arrange all clients on the fly. Popup- and fixed-size windows are treated floating, however. </li> <li> dwm is customized through editing its source code, that makes it extremely fast and secure - it does not process any input data which hasn't been known at compile time, except window title names and status text read from 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 <b>only</b> have to learn C (at least editing header files). </li> <li> 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. </li> <li> dwm uses 1-pixel borders to provide the maximum of screen real estate to clients. Small titlebars are only drawn in front of unfocused clients. </li> <li> dwm reads from standard input to print arbitrary status text (like the date, load, battery charge). That's much simpler than larsremote, wmiir and what not... </li> <li> It can be downloaded and distributed under the conditions of the <a href="http://10kloc.org/cgi-bin/hgwebdir.cgi/dwm?f=f10eb1139362;file=LICENSE;style=raw">MIT/X Consortium license</a>. </li> <li> Optionally you can install <b>dmenu</b> to extend dwm with a wmii-alike menu. </li> </ul> <h4>Links</h4> <ul> <li><a href="http://10kloc.org/cgi-bin/man/man2html?query=dwm">Man page</a></li> <li><a href="http://10kloc.org/shots/dwm-20060810a.png">Screenshot of tiled mode</a> (20060810)</li> <li><a href="http://10kloc.org/shots/dwm-20060810b.png">Screenshotof floating mode</a> (20060810)</li> <li><a href="http://10kloc.org/download/poster.ps">A4 poster (PostScript)</a></li> <li>Mailing List: <a href="http://10kloc.org/cgi-bin/mailman/listinfo/dwm">dwm at wmii dot de</a> <a href="http://10kloc.org/pipermail/dwm/">(Archives)</a></li> <li>IRC channel: <code>#dwm</code> at <code>irc.oftc.net</code></li> </ul> <h3>Download</h3> <ul> <li><a href="http://10kloc.org/download/dwm-0.8.tar.gz">dwm 0.8</a> (14kb) (20060810)</li> <li><a href="http://10kloc.org/download/dmenu-0.3.tar.gz">dmenu 0.3</a> (7kb) (20060810)</li> </ul> <h3>Development</h3> <p> dwm is actively developed in parallel to wmii. You can <a href="http://10kloc.org/cgi-bin/hgwebdir.cgi/dwm">browse</a> its source code repository or get a copy using <a href="http://www.selenic.com/mercurial/">Mercurial</a> with following command: </p> <p> <code>hg clone http://10kloc.org/cgi-bin/hgwebdir.cgi/dwm</code> </p> <p> <code>hg clone http://10kloc.org/cgi-bin/hgwebdir.cgi/dmenu</code> </p> <h3>Miscellaneous</h3> <p> You can purchase this <a href="https://www.spreadshirt.net/shop.php?op=article&article_id=3298632&view=403">tricot</a> if you like dwm and the dwm logo, which has been designed by Anselm. </p> <p><small>--Anselm</small></p> </body> </html>