1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 20:19:46 +00:00

- add ability to use "write transformation"

- only allow a single transformation per dotfile
- refactoring and bug fixes
This commit is contained in:
deadc0de6
2018-12-06 13:19:57 +01:00
parent 1d53602769
commit 37db5cd68c
9 changed files with 262 additions and 112 deletions

View File

@@ -55,10 +55,8 @@ exec bspwm
f.write(' actions:\n')
for action in d.actions:
f.write(' - {}\n'.format(action.key))
if len(d.trans) > 0:
f.write(' trans:\n')
for action in d.trans:
f.write(' - {}\n'.format(action.key))
if d.trans_r:
f.write(' trans: {}\n'.format(d.trans_r.key))
f.write('profiles:\n')
f.write(' {}:\n'.format(profile))
for d in dotfiles:
@@ -154,7 +152,7 @@ exec bspwm
tr = Action('testtrans', cmd)
f9, c9 = create_random_file(tmp, content=trans1)
dst9 = os.path.join(dst, get_string(6))
d9 = Dotfile(get_string(6), dst9, os.path.basename(f9), trans=[tr])
d9 = Dotfile(get_string(6), dst9, os.path.basename(f9), trans_r=tr)
# to test template
f10, _ = create_random_file(tmp, content='{{@@ profile @@}}')