Commit graph

8 commits

Author SHA1 Message Date
8635b580bd
[styler] Add universal theme filter function
Added universal theme filtering. Universal means the theme exists for
each installed package. This is a (rough) way of knowing that it can
apply to every intended application -- though of course will not work if
more packages are installed than intended to be changed with processors.

The `styler list themes` command will default to only show universal
themes. To list all themes invoke with `styler list themes all`.

Styler will cache the available themes after the first retrieval. The
first retrieval still takes a while (~8.7 seconds for me), but
subsequent retrievals are much quicker. Cache will automatically be
rebuilt whenever a new package is downloaded, or an already downloaded
package is updated.
The filter function, as it stands it quite inefficient and could use
a better algorithm.

Uses rg or grep in descending preference.
2020-06-19 15:15:55 +02:00
9919c68975
Improve styler documentation
Replaced `list templates` with correct command `list packages` in styler
command line help printout.
2020-02-16 14:28:28 +01:00
b344242dff Standardize and document styler cli commands
Removed superfluous styler `--theme`-style options, instead relying on
the commands provided to be the primary way of interaction.

Documented the new standardized ways with the `help` command and added
improved documentation for all avaliable options.
2020-02-05 23:51:49 +01:00
d1438b216c Styler add empty argument check 2020-02-04 22:00:13 +01:00
edfb305ef3 Add theme function
The theme function provides a quick but temporary switch to a specific
theme.

Themes can be applied with `styler theme [themename]`, they will be
instantly applied to all enabled applications. They will be lost on
restarts of the application or machine however.

Themes can be applied permanently with `styler set [themename]`, they
will be written into the application's settings. This *will* change
things in your local filesystem, so be wary. Generally, processors
should take the least invasive approach and use inclusion to append the
theme to the application's other settings.

But be *careful* with this option, and when in doubt double-check what
the processors you have installed do before losing your settings.
2020-02-01 11:00:29 +01:00
acbe002f87 Add download function to styler
Can take input in the form user/repo and pulls packages from github into
its package directory. Documented use of new function.

Can download both processors and packages. Styler decides between
both with their naming schemes, searching for `/base16-` or `baseproc16-`
respectively. For example:

username/base16-programname - package
username/baseproc16-programname - processor

If it can not determine it based on name alone, it will assume to be
dealing with a processor but spit out a warning for the user.

Styler processors use same layout as packages, such that package and
processor directories are mirrors of each other. So:

`chriskempson/base16-vim` lies in the packages directory,
`marty-oehme/vim-processor` mirrors it.

This opens up the way for custom processors.
2020-02-01 11:00:29 +01:00
4838aecb75 Add list function to styler
Can list available themes, packages, and processors. Invoked by `styler
list` and then the intended target. When invoked without any valid
target will remind the user to supply one.

`list`, `--list`, `-l` are aliases and perform the same function.

Examples:

`styler list themes`

`styler --list packages`

`styler -l processors`
2020-02-01 11:00:29 +01:00
2ee8453750 Add styler theming framework
Sets up basic theming program styler which can be called to change
theming of various applications.
2020-02-01 10:59:42 +01:00