summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2021-12-12 00:20:11 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2021-12-12 00:20:11 +0100
commit7426d6278f640d1b0c541586013329f9132a7a5f (patch)
tree721abd65056b08884f246265447dc4711a8c4c2b
parentf2bcdd724a45cc31ec86d799ff3e8a6f340ccdac (diff)
downloadvtcol-7426d6278f640d1b0c541586013329f9132a7a5f.tar.gz
update readme
-rw-r--r--README.rst53
1 files changed, 38 insertions, 15 deletions
diff --git a/README.rst b/README.rst
index 21b80b2..9c07b63 100644
--- a/README.rst
+++ b/README.rst
@@ -2,11 +2,13 @@
VTCOL
###############################################################################
-Change the color scheme of the virtual Linux console. Inspired by the
-setcolors_ utility.
+Change the color scheme (and more) of the virtual Linux console.
+
+Color schemes
+-------------------------------------------------------------------------------
+
+Use ``vtcol colors`` to manipulate the console palette.
-Usage
------
**vtcol** knows two ways of loading a color scheme: From a set of predefined
palettes or by loading it from a definition file. The latter accepts input in
the format supported by setcolors_. (Not much effort has been put into ensuring
@@ -22,7 +24,7 @@ Three color schemes are predefined:
Invoke **vtcol** with the ``set`` command specifying the scheme of your
choice: ::
- $ vtcol set solarized_light
+ $ vtcol colors set solarized_light
In order to view the available schemes, use the ``list`` command. Should the
scheme specified not resolve to one of the predefined ones, **vtcol** will fall
@@ -30,39 +32,58 @@ back on interpreting the name as that of a file. Likewise, loading a scheme
directly from a definition file is accomplished by specifying the ``--file``
argument to ``set``. ::
- $ vtcol set --file ./schemes/solarized
+ $ vtcol colors set --file ./schemes/solarized
Instead of an actual scheme or file name, these parameters accept ``-``
as an argument in order to read from ``stdin``. ::
- $ vtcol set -
+ $ vtcol colors set -
To show the current scheme of the active console use the ``get`` subcommand: ::
- $ vtcol get
+ $ vtcol colors get
solarized_dark
+With the ``-base64`` switch ``vtcol`` outputs a binary representation of color
+schemes: ::
+
+ $ vtcol colors get --base64
+ ACs23DIvhZkAtYkAJovS0zaCKqGY7ujVACs2y0sWWG51ZXuDg5SWbHHEk6Gh/fbj
+
+which can then be re-applied with ``vtcol set``::
+
+ $ vtcol colors set --base64 \
+ ACs23DIvhZkAtYkAJovS0zaCKqGY7ujVACs2y0sWWG51ZXuDg5SWbHHEk6Gh/fbj
+
It is also possible to use vtcol to switch between two themes by means of the
``toggle`` subcommand. E. g. to cycle between “dark mode” and “light mode”: ::
- $ vtcol toggle solarized solarized_light
+ $ vtcol colors toggle solarized solarized_light
To view a scheme’s definition, for instance in order to verify that **vtcol**
parses it correctly, use the ``dump`` command. ::
- $ vtcol dump default
- $ vtcol dump ./schemes/solarized
+ $ vtcol colors dump default
+ $ vtcol colors dump ./schemes/solarized
This will print the color definitions contained in the scheme; if the specified
name does not resolve to a pre-defined scheme it will be interpreted as a file
name instead.
+Keyboard LEDs
+-------------------------------------------------------------------------------
+
+Show the current state of the keyboard LEDs: ::
+
+ $ vtcol leds get
+ caps: false, num: true, scroll: false
+
Building
---------
+-------------------------------------------------------------------------------
Use Cargo to obtain a binary: ::
- $ cargo build
+ $ cargo build --features=vtcol-bin
To generate the manpage, run ::
@@ -71,7 +92,8 @@ To generate the manpage, run ::
*rst2man* from the *Docutils* suite needs to be installed for this.
Background
-----------
+-------------------------------------------------------------------------------
+
The default palette that comes with a Linux terminal was inherited from a long
history of virtual console implementations. The colors assigned were chosen for
pragmatic reasons but that palette may not harmonize with everybody’s taste.
@@ -83,7 +105,8 @@ included as predefined palettes; the same is true of the Linux default palette,
so they can be conveniently restored when experimenting.
About
------
+-------------------------------------------------------------------------------
+
The **vtcol** source code is available from the `canonical repository`_.
**vtcol** is redistributable under the terms of the `GNU General Public
License`_ version 3 (exactly). Patches or suggestions welcome.