Skip to content

Commit 8eb64b2

Browse files
author
viz
committed
update docs and add license
1 parent 9636b3f commit 8eb64b2

File tree

2 files changed

+46
-11
lines changed

2 files changed

+46
-11
lines changed

license

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
BSD 2-Clause License
2+
3+
Copyright (c) 2019, viz
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

readme

+21-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ A simple "theme" manager in rust. It's stupidly simple to use.
55
You give tm a text file with 16 colors and a template file, tm
66
creates complete file out of the template and text file.
77

8-
WARNING: There might be some bugs!
8+
If for some reason, you want to add more than 16 colors,
9+
you can do so by changing lib.rs file. But I will not
10+
guarantee that it will work!
911

1012
building
1113
==========
@@ -30,15 +32,18 @@ nothing less. It's plain and simple.
3032
templates
3133
===========
3234

33-
The template layout is quite different from the python
34-
version. Consequently, the colors file is quite different
35+
The template layout is slightly different from the python
36+
version. Consequently, the colors file is slightly different
3537
too. In this version, the colors file should not have a # in
3638
the color definition. So #ffffff becomes ffffff
3739

3840
If the template files need a #, you mark the color as #Xn
3941
where n is the nth color in the given file.
4042
A typical template marker looks like this `color0="#X0"`
4143

44+
Some examples can be found at
45+
https://github.com/vizs/home/tree/master/etc/tm
46+
4247
exit codes
4348
============
4449

@@ -51,16 +56,21 @@ below
5156
5 - not enough arguments
5257
6 - couldn't read template
5358

54-
todo
55-
======
59+
env vars
60+
==========
61+
62+
tm's template dir can be set using an env var. tm first
63+
looks for TM_TEMPLATE_DIR, if it is not set, it falls
64+
back to $XDG_CONFIG_HOME/tm, if $XDG_CONFIG_HOME is not
65+
set, it falls back to $HOME/.config/tm
66+
67+
output dir
68+
============
5669

57-
A lot of stuff...
58-
[ ] Refactor code
59-
[x] Add comments in write_to_template function in template.rs
60-
[x] Rewrite utils.py in Rust
61-
[ ] Use s.insert(0, something) to prepend instead of format!
70+
The finished files are stored in $XDG_CACHE_HOME/tm, if
71+
$XDG_CACHE_HOME is not set, it falls back to $HOME/.cache/tm
6272

6373
license
6474
=========
6575

66-
Still not sure... Might use BSD License
76+
Licensed under BSD 2-Clause License

0 commit comments

Comments
 (0)