Migrate from .stow-rename to --dotfiles
This commit is contained in:
parent
2cd7ee3bf7
commit
f309f3a7a6
20 changed files with 0 additions and 2 deletions
29
dot-config/swiftbar/lib/taskpaper/__init__.py
Normal file
29
dot-config/swiftbar/lib/taskpaper/__init__.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import base64
|
||||
import inspect
|
||||
import os.path as p
|
||||
import sys
|
||||
|
||||
PATH = p.dirname(p.abspath(inspect.getfile(inspect.currentframe())))
|
||||
|
||||
def count(file, icon='default'):
|
||||
project = ''
|
||||
items = []
|
||||
with open(p.expanduser(file)) as f:
|
||||
for line in f:
|
||||
if project.lower() == 'archive': break
|
||||
line = line.strip()
|
||||
if line.endswith(':'):
|
||||
project = line[:-1]
|
||||
elif line.startswith('- ') and '@done' not in line:
|
||||
items.append('%s (%s)' % (line[2:], project))
|
||||
|
||||
if not items: return
|
||||
|
||||
with open(p.join(PATH, icon + '.png')) as img:
|
||||
icon = base64.b64encode(img.read())
|
||||
|
||||
print("%d | templateImage='%s'" % (len(items), icon))
|
||||
print('---')
|
||||
print("%s | terminal=false bash=/usr/bin/open param1='%s'" % (file, p.expanduser(file)))
|
||||
print('---')
|
||||
for item in items: print(item)
|
BIN
dot-config/swiftbar/lib/taskpaper/default.png
Normal file
BIN
dot-config/swiftbar/lib/taskpaper/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 413 B |
BIN
dot-config/swiftbar/lib/taskpaper/ecoach.png
Normal file
BIN
dot-config/swiftbar/lib/taskpaper/ecoach.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 468 B |
Loading…
Add table
Add a link
Reference in a new issue