about summary refs log tree commit diff stats
path: root/README
Commit message (Collapse)AuthorAgeFilesLines
* small change to READMEAnselm R. Garbe2006-09-281-1/+1
|
* updated README 1.7arg@mmvi2006-09-261-1/+1
|
* small changes to dwm.1, rearranged order within main event loopAnselm R.Garbe2006-08-211-1/+1
|
* applied Sanders doc changes, added a PHONY line and changed the output of ↵arg@10ksloc.org2006-08-031-1/+2
| | | | config.h creation somewhat
* implemented the idea presented by Sander for dwm targetarg@10ksloc.org2006-08-021-2/+1
|
* fixed a type in README, and patched config.mkarg@10ksloc.org2006-08-021-1/+1
|
* removed the CONFIG variable from config.mk, renamed config.h into ↵arg@10ksloc.org2006-08-021-5/+1
| | | | config.default.h, after first clone/extract one needs to copy config.default.h to config.h, that is easier than always heavy typing make CONFIG=blafasel
* simplified READMEarg@10ksloc.org2006-08-011-4/+1
|
* centralized/externalized configuration to config.harg@10ksloc.org2006-08-011-2/+6
|
* applied Sanders patchesarg@10ksloc.org2006-08-011-8/+9
|
* s/sleep 5/sleep 2/arg@10ksloc.org2006-07-211-1/+1
|
* changed the status info README hint (more simple now, no extra script necessary)arg@10ksloc.org2006-07-211-7/+1
|
* added a note how to achieve status info in the bararg@10ksloc.org2006-07-211-1/+17
|
* updated READMEAnselm R. Garbe2006-07-171-2/+2
|
* added dev.c instead of kb.cAnselm R. Garbe2006-07-131-1/+1
|
* small changes to READMEAnselm R. Garbe2006-07-131-3/+3
|
* added logo+descriptionAnselm R. Garbe2006-07-131-13/+12
|
* removed unnecessary crapAnselm R. Garbe2006-07-131-4/+2
|
* added mouse-based resizalsAnselm R. Garbe2006-07-111-9/+1
|
* updated READMEAnselm R. Garbe2006-07-111-5/+15
|
* fixed several stuff (gridwm gets better and better)Anselm R. Garbe2006-07-111-0/+1
|
* initial importAnselm R. Garbe2006-07-101-0/+40
self, item): return item in self.tags def add(self, *items, **others): if 'tag' in others: tag = others['tag'] else: tag = self.defautag self.sync() for item in items: self.tags[item] = tag self.dump() def remove(self, *items): self.sync() for item in items: try: del(self.tags[item]) except KeyError: pass self.dump() def toggle(self, *items, **others): if 'tag' in others: tag = others['tag'] else: tag = self.default_tag self.sync() for item in items: try: if item in self and tag in (self.tags[item], self.default_tag): del(self.tags[item]) else: self.tags[item] = tag except KeyError: pass self.dump() def marker(self, item): if item in self.tags: return self.tags[item] else: return self.default_tag def sync(self): try: f = open(self._filename, 'r') except OSError: pass else: self.tags = self._parse(f) f.close() def dump(self): try: f = open(self._filename, 'w') except OSError: pass else: self._compile(f) f.close() def _compile(self, f): for path, tag in self.tags.items(): if tag == self.default_tag: # COMPAT: keep the old format if the default tag is used f.write(path + '\n') elif tag in ALLOWED_KEYS: f.write('{0}:{1}\n'.format(tag, path)) def _parse(self, f): result = dict() for line in f: line = line.strip() if len(line) > 2 and line[1] == ':': tag, path = line[0], line[2:] if tag in ALLOWED_KEYS: result[path] = tag else: result[line] = self.default_tag return result def __nonzero__(self): return True __bool__ = __nonzero__