summaryrefslogtreecommitdiff
path: root/src/vtcol.rs
Commit message (Collapse)AuthorAgeFilesLines
* vtcol: fix conditional codePhilipp Gesang2022-08-081-22/+16
|
* edit: present color palettePhilipp Gesang2022-08-081-2/+2
| | | | | No actual editing functionality yet, just the colors layed out as squares on an 8?2 grid.
* edit: set up a rudimentary 60fps windowPhilipp Gesang2022-08-081-2/+38
| | | | Not much to see yet.
* bin: prepare for scheme editorPhilipp Gesang2022-08-081-0/+25
| | | | | Optionally build against slint (sixtyfps) to provide an “edit” subcommand.
* lib: rework caps flag handlingPhilipp Gesang2022-08-081-6/+35
|
* bin: lib: address some clippy lintsPhilipp Gesang2021-12-221-2/+4
| | | | Mostly about match autoref / autoderef kicking in.
* bin: add switch for flag defaultsPhilipp Gesang2021-12-221-20/+33
|
* lib: implement “kb flags”Philipp Gesang2021-12-121-18/+242
| | | | | | | | A const-genericized version of the “kb leds” implementation. Does seem to consistently run into EINVAL no matter what flags we provide. Also incomplete as KDGKBLED / KDSKBLED pack more info into higher bits of their argument.
* bin: move “leds” subcommand under “kb” namespacePhilipp Gesang2021-12-121-100/+135
| | | | | | | | | | | | | So instead of $ vtcol leds get that functionality is now available as $ vtcol kb leds get anticipating the keyboad related functions that are about to come.
* bin: allow specifying the console on the command linePhilipp Gesang2021-12-121-63/+117
| | | | | | | | | | | | | As in: $ vtcol --console /dev/tty6 colors get solarized $ vtcol --console /dev/tty6 colors set phosphor $ vtcol --console /dev/tty6 colors get phosphor That simplifies testing so much I wonder why the heck I needed this long to finally implement it.
* bin: make --verbose a global argumentPhilipp Gesang2021-12-121-1/+2
| | | | It shouldn’t matter where exactly it appears on the command line.
* bin: refactor job into member functions + traitPhilipp Gesang2021-12-121-188/+222
|
* bin: lib: implement setting state of individual LEDsPhilipp Gesang2021-12-121-16/+95
|
* bin: implement led revertPhilipp Gesang2021-12-121-7/+23
| | | | | | | | | | | | Command: $ vtcol leds set --revert Implementing this detail of KDSETLED: [I]f a higher order bit is set, the LEDs revert to normal: displaying the state of the keyboard functions of caps lock, num lock, and scroll lock.
* bin: implement “leds set” subcommandPhilipp Gesang2021-12-121-5/+34
| | | | | | | Currently only supports setting the raw state from an integer value: $ vtcol leds set -8 2
* move color ops into subcommandPhilipp Gesang2021-12-111-202/+247
| | | | | | | | | | | | So what used to be $ vtcol set solarized becomes $ vtcol colors set solarized etc.
* add KDGETLED subcommand to vtcol-binPhilipp Gesang2021-12-081-1/+59
| | | | | | | | | Actually we add both subcommand and sub-subcommand. Example: [*] 15:52:40 phg@acheron vtcol $ vtcol leds get Caps: false, Num: true, Scroll: false
* be more specific about what “list” doesPhilipp Gesang2021-12-081-1/+1
|
* move base64 handling out of PalettePhilipp Gesang2021-11-251-11/+7
| | | | | Try and not encumber the lower level types with more dependencies than needed.
* add base64 input to ‘dump’Philipp Gesang2021-11-241-7/+23
|
* add base64 input for ‘set’Philipp Gesang2021-11-241-0/+14
|
* add base64 output for ‘get’Philipp Gesang2021-11-241-5/+19
|
* optionally clear after each fade stepPhilipp Gesang2021-11-231-3/+14
|
* implement fadingPhilipp Gesang2021-11-231-2/+97
| | | | vtcol fade --ms 1000 --frequency 10 --to solarized & dmesg
* switch RawPalette to integer representationPhilipp Gesang2021-11-161-3/+3
| | | | | Introducing a simple type for RGB colors. That awkward string representation for RawPalette got unwieldy quick.
* move console handling into libPhilipp Gesang2021-11-151-99/+10
| | | | | All operations are now exposed through wrappers that are member functions of ``vtcol::Console``.
* turn Fd into proper wrapperPhilipp Gesang2021-11-151-16/+14
|
* drop bespoke ioctl() wrapperPhilipp Gesang2021-11-151-16/+3
|
* lib: split out libraryPhilipp Gesang2021-11-151-533/+48
| | | | | | | Not really a satisfactorily clean split as of yet but it’s a start. Error types have been changed from anyhow to io::Error in ``lib.rs`` so as to not force an error handling crate on downstream users.
* make rustdoc shut up about snippetsPhilipp Gesang2021-11-121-0/+1
|
* bring “dump” out put in line with scheme formatPhilipp Gesang2021-11-121-24/+36
| | | | | | | This revamps the output in a way that allows feeding the result back into vtcol: $ vtcol dump solarized |vtcol set -
* fix argument handling for “dump” subcommandPhilipp Gesang2021-11-111-2/+2
| | | | D’oh!
* avoid hard coding builtin namesPhilipp Gesang2021-11-111-47/+103
|
* add green monochrome theme (phosphor)Philipp Gesang2021-11-101-0/+21
|
* add toggle subcommandPhilipp Gesang2021-11-101-0/+48
|
* stick to asciiPhilipp Gesang2021-11-101-4/+4
| | | | We can’t count on Unicode in the Linux console.
* implement subcommand get (GIO_CMAP)Philipp Gesang2021-11-101-36/+89
| | | | | Get the currently active color palette using ioctl(GIO_CMAP) and attempt to match it against the builtin schemes.
* adopt a subcommand uiPhilipp Gesang2021-11-101-60/+90
| | | | | | | | Regroup the cli arguments into subcommands: $ vtcol dump $SCHEME $ vtcol list $ vtcol set $SCHEME
* use trait for deriving ColorPhilipp Gesang2021-11-101-34/+36
|
* add GIO_CMAP wrapperPhilipp Gesang2021-11-101-0/+16
| | | | We should be able to get the currently active palette.
* clean up struct PalettePhilipp Gesang2021-11-101-43/+43
|
* turn Palette into newtypePhilipp Gesang2021-11-101-13/+10
|
* rework error handlingPhilipp Gesang2021-11-101-53/+102
| | | | anyhow!() ftw.
* remove interfering --help optionPhilipp Gesang2021-11-101-7/+0
|
* drop unused code from get_console_fd()Philipp Gesang2021-11-101-22/+11
|
* apply some clippy lintsPhilipp Gesang2021-11-101-15/+12
|
* fix overblown numeric handlingPhilipp Gesang2021-11-101-12/+12
| | | | The ergonomics of these changed quite a while back.
* remove redundant lifetimePhilipp Gesang2021-11-101-1/+1
|
* switch from lazy_static to atomicsPhilipp Gesang2021-11-101-7/+4
| | | | Yeah const fn!
* deal with bitrot and archaic idiomsPhilipp Gesang2021-11-101-94/+90
| | | | Mostly adapting to match ergonomics.