Giter Site home page Giter Site logo

tm's Introduction

 tm
====

A simple "theme" manager in rust. It's stupidly simple to use.
You give tm a text file with 16 colors and a template file, tm
creates complete file out of the template and text file.

If for some reason, you want to add more than 16 colors,
you can do so by changing lib.rs file. But I will not
guarantee that it will work!

 building
==========

Grab cargo to compile tm. Good thing about tm is that it only
depends on the standard libraries, you don't need any other
external libraries at all!

After downloading cargo, run the following commands
(assuming that you're in the same path as tm's source)
`cargo install --path ./`

If you have setup cargo bin path correctly, it should've
installed it in your $PATH.

 running
=========

Basic usage:

To run tm, you do `tm /path/to/colors`. Nothing more,
nothing less. It's plain and simple.

enable verbose -> -v
help -> -h

 templates
===========

The template layout is slightly different from the python
version. Consequently, the colors file is slightly different
too. In this version, the colors file should not have a # in
the color definition. So #ffffff becomes ffffff

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

Some examples can be found at
https://github.com/vizs/home/tree/master/etc/prog.d/tm

 exit codes
============

tm returns a variety of exit codes, all of them are given
below

1 - finished file couldn't be written
2 - template cache dir couldn't be created
3 - template couldn't be copied to template cache dir
4 - template cache dir couldn't be removed
5 - not enough arguments
6 - couldn't read template
7 - invalid path given

 env vars
==========

tm's template dir can be set using an env var. tm first
looks for TM_TEMPLATE_DIR, if it is not set, it falls
back to $XDG_CONFIG_HOME/tm, if $XDG_CONFIG_HOME is not
set, it falls back to $HOME/.config/tm

 output dir
============

The finished files are stored in $XDG_CACHE_HOME/tm, if
$XDG_CACHE_HOME is not set, it falls back to $HOME/.cache/tm

 license
=========

Licensed under BSD 2-Clause License

tm's People

Contributors

9viz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

tm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.