about summary refs log tree commit diff stats
path: root/subx/apps/dquotes
Commit message (Expand)AuthorAgeFilesLines
* 5455Kartik Agaram2019-07-221-0/+0
* 5443 - standard library is now self-hostedKartik Agaram2019-07-221-0/+0
* 5442Kartik Agaram2019-07-221-0/+0
* 5438 - raise error on uppercase hexKartik Agaram2019-07-211-0/+0
* 5437Kartik Agaram2019-07-211-0/+0
* 5436 - support newlines in dquotesKartik Agaram2019-07-211-0/+0
* 5434Kartik Agaram2019-07-211-0/+0
* 5433Kartik Agaram2019-07-211-0/+0
* 5429Kartik Agaram2019-07-201-0/+0
* 5426Kartik Agaram2019-07-201-0/+0
* 5422Kartik Agaram2019-07-191-0/+0
* 5408Kartik Agaram2019-07-161-0/+0
* .Kartik Agaram2019-07-131-0/+0
* .Kartik Agaram2019-07-131-0/+0
* start distinguishing table lookups from insertsKartik Agaram2019-07-101-0/+0
* zero out new rows returned by get-or-insertKartik Agaram2019-07-101-0/+0
* .Kartik Agaram2019-07-101-0/+0
* mostly done with emit-outputKartik Agaram2019-07-091-0/+0
* pull a couple more functions into subx-commonKartik Agaram2019-07-081-0/+0
* .Kartik Agaram2019-07-081-0/+0
* preserve truthiness of non-booleansKartik Agaram2019-07-081-0/+0
* .Kartik Agaram2019-07-081-0/+0
* .Kartik Agaram2019-07-071-0/+0
* move `is-label?` to `subx-common`Kartik Agaram2019-07-071-0/+0
* Merge branch 'master' into surveyKartik Agaram2019-07-031-0/+0
|\
| * 5218Kartik Agaram2019-05-221-0/+0
| * Merge branch 'dquotes-3'Kartik Agaram2019-05-201-0/+0
|/|
| * clean up a redundant primitiveKartik Agaram2019-05-201-0/+0
| * .Kartik Agaram2019-05-201-0/+0
| * dquotes now doneKartik Agaram2019-05-201-0/+0
| * standardize the loop in skip-string-in-sliceKartik Agaram2019-05-201-0/+0
| * support string literals in emit-string-literal-dataKartik Agaram2019-05-201-0/+0
| * support string literals in emit-metadataKartik Agaram2019-05-201-0/+0
| * move local variable up following conventionsKartik Agaram2019-05-191-0/+0
| * convention: source arg in ESIKartik Agaram2019-05-191-0/+0
| * handle words with just metadataKartik Agaram2019-05-191-0/+0
| * minor style tweaks for emit-metadataKartik Agaram2019-05-191-0/+0
| * skip-string: fix a bug in computing in->readKartik Agaram2019-05-181-0/+0
| * minor style cleanupKartik Agaram2019-05-181-0/+0
| * add a bounds checkKartik Agaram2019-05-181-0/+0
| * another failing testKartik Agaram2019-05-171-0/+0
| * dquotes: failing tests for parsing string literalsKartik Agaram2019-05-161-0/+0
* | another phase that supports the new segment syntaxKartik Agaram2019-05-171-0/+0
* | 5181Kartik Agaram2019-05-171-0/+0
|/
* 5180Kartik Agaram2019-05-161-0/+0
* complete the skeleton of dquotes.subxKartik Agaram2019-05-151-0/+0
* .Kartik Agaram2019-05-141-0/+0
* fix a stale register value in dquotes.subxKartik Agaram2019-05-141-0/+0
* Merge branch 'dquotes' into dquotes-1Kartik Agaram2019-05-131-0/+0
|\
| * Merge branch 'master' into dquotesKartik Agaram2019-05-101-0/+0
| |\
="bp">self.app_aunpack(c) if f.video or f.audio: if f.video: c.flags += 'd' return self.either(c, 'mplayer', 'totem') if f.image: return self.either(c, 'feh', 'eye_of_gnome', 'mirage') if f.document: return self.app_editor(c) # ----------------------------------------- application definitions def app_pager(self, c): return tup('less', *c) @depends_on('vim') def app_vim(self, c): return tup('vim', *c) def app_editor(self, c): try: default_editor = os.environ['EDITOR'] except KeyError: pass else: parts = default_editor.split() exe_name = os.path.basename(parts[0]) if exe_name in self.fm.executables: return tuple(parts) + tuple(c) return self.either(c, 'vim', 'emacs', 'nano') @depends_on(app_editor, Applications.app_self) def app_edit_or_run(self, c): if c.mode is 1: return self.app_self(c) return self.app_editor(c) @depends_on('mplayer') def app_mplayer(self, c): if c.mode is 1: return tup('mplayer', *c) elif c.mode is 2: args = "mplayer -fs -sid 0 -vfm ffmpeg -lavdopts " \ "lowres=1:fast:skiploopfilter=all:threads=8".split() args.extend(c) return tup(*args) elif c.mode is 3: return tup('mplayer', '-mixer', 'software', *c) else: return tup('mplayer', '-fs', *c) @depends_on("eog") def app_eye_of_gnome(self, c): c.flags += 'd' return tup('eog', *c) @depends_on('mirage') def app_mirage(self, c): c.flags += 'd' return tup('mirage', *c) @depends_on('feh') def app_feh(self, c): arg = {1: '--bg-scale', 2: '--bg-tile', 3: '--bg-center'} c.flags += 'd' if c.mode in arg: return tup('feh', arg[c.mode], c.file.path) if c.mode is 4: return tup('gimp', *c) if len(c.files) > 1: return tup('feh', *c) from collections import deque directory = self.fm.env.get_directory(c.file.dirname) images = [f.path for f in directory.files if f.image] position = images.index(c.file.path) deq = deque(images) deq.rotate(-position) return tup('feh', *deq) @depends_on('aunpack') def app_aunpack(self, c): if c.mode is 0: c.flags += 'p' return tup('aunpack', '-l', c.file.path) return tup('aunpack', c.file.path) @depends_on('apvlv') def app_apvlv(self, c): c.flags += 'd' return tup('apvlv', *c) @depends_on('make') def app_make(self, c): if c.mode is 0: return tup("make") if c.mode is 1: return tup("make", "install") if c.mode is 2: return tup("make", "clear") @depends_on('elinks') def app_elinks(self, c): c.flags += 'D' return tup('elinks', *c) @depends_on('opera') def app_opera(self, c): return tup('opera', *c) @depends_on('firefox') def app_firefox(self, c): return tup("firefox", *c) @depends_on('javac') def app_javac(self, c): return tup("javac", *c) @depends_on('java') def app_java(self, c): def strip_extensions(file): if '.' in file.basename: return file.path[:file.path.index('.')] return file.path files_without_extensions = map(strip_extensions, c.files) return tup("java", files_without_extensions) @depends_on('zsnes') def app_zsnes(self, c): return tup("zsnes", c.file.path) @depends_on('evince') def app_evince(self, c): return tup("evince", *c) @depends_on('wine') def app_wine(self, c): return tup("wine", c.file.path) @depends_on('totem') def app_totem(self, c): if c.mode is 0: return tup("totem", "--fullscreen", *c) if c.mode is 1: return tup("totem", *c)