1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// vim:fileencoding=utf-8:noet
//! Port of `powerline/bindings/awesome/powerline-awesome.py`.
//!
//! awesome WM `powerline-awesome` script — top-level entry point that
//! parses the `interval` CLI arg and calls `run()` on the
//! `AwesomeThread` module. Upstream is a binary script invoked via
//! `python -m powerline.bindings.awesome.powerline-awesome`; the
//! Rust analog is a binary at `src/bin/powerline-awesome.rs` (TBD)
//! that delegates here.
// #!/usr/bin/env python // py:1
// from __future__ import (unicode_literals, division, absolute_import, print_function) // py:3
// import sys // py:5
// from powerline.bindings.wm import DEFAULT_UPDATE_INTERVAL // py:7
// from powerline.bindings.wm.awesome import run // py:8
use crateDEFAULT_UPDATE_INTERVAL;
use craterun;
/// Port of `main()` from
/// `powerline/bindings/awesome/powerline-awesome.py:11`.
///
/// Python:
/// ```python
/// def main():
/// try:
/// interval = float(sys.argv[1])
/// except IndexError:
/// interval = DEFAULT_UPDATE_INTERVAL
/// run(interval=interval)
/// ```