diff options
author | Determinant <tederminant@gmail.com> | 2020-05-22 14:14:27 -0400 |
---|---|---|
committer | Determinant <tederminant@gmail.com> | 2020-05-22 14:14:27 -0400 |
commit | 6ac1467a93fffa629ee56874eaa21ed2cae25805 (patch) | |
tree | 7270026fd23ae5d004dd2fc604cedb721da4d24d /name2color.py | |
parent | 16ebad6bff9eb0ddac853e57b642e41ce5310a75 (diff) |
distinguish the saved states for sessionsv1.1
Diffstat (limited to 'name2color.py')
-rwxr-xr-x | name2color.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/name2color.py b/name2color.py index 2137687..a473301 100755 --- a/name2color.py +++ b/name2color.py @@ -14,7 +14,6 @@ def error(msg): print("ColorTag: {}\n".format(msg)) -saved_state = os.path.expanduser("~/.tmux-colortag.state") # add your favorite color code (256) here as candidates colors = [ 63, 64, 65, 68, 103, 107, @@ -23,6 +22,7 @@ colors = [ ] parser = argparse.ArgumentParser(description='Maps tmux window tags to colors.') +parser.add_argument('session', type=str, help='session name') parser.add_argument('idx', type=int, help='index of the window') parser.add_argument('name', type=str, help='name of the window') parser.add_argument('--color-idx', type=int, help='manually change the color mapping for an index') @@ -34,6 +34,9 @@ args = parser.parse_args() state = {} changed = True +saved_state = os.path.expanduser( + "~/.tmux-colortag-{}.state".format(args.session)) + try: with open(saved_state, "rb") as f: _state = pickle.load(f) |