- commit
- 05df226b2ecebc09a1edafeaeb1cd924dbf44999
- parent
- 02695452fc0331b00e21ec7ea746bf52e5db9224
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-11-17 10:10
write ~/.cache/wal/sequences
Diffstat
| M | xiwal/term.py | 8 | ++++++-- |
1 files changed, 6 insertions, 2 deletions
diff --git a/xiwal/term.py b/xiwal/term.py
@@ -1,10 +1,14 @@ -1 1 import os 1 2 import glob 2 3 3 4 from . import lch 4 5 5 66 -1 def apply(scheme):7 -1 for path in glob.glob('/dev/pts/[0-9]*'):-1 7 def apply(scheme, cachefile='~/.cache/wal/sequences'): -1 8 cachefile = os.path.expanduser(cachefile) -1 9 os.makedirs(os.path.dirname(cachefile), exist_ok=True) -1 10 -1 11 for path in [cachefile] + glob.glob('/dev/pts/[0-9]*'): 8 12 with open(path, 'w') as tty: 9 13 for i in range(0, 16): 10 14 tty.write('\033]4;%i;%s\033\\' % (i, scheme[i]))