summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "lib: implement “kb flags”"Philipp Gesang2021-12-221-61/+71
| | | | | | | This partially reverts commit 92f35f8e90199e4d9dfbcc545be456f4c2d7a1ce. The keyboard modifiers behave too differently from the LED state for the const generics to pay off.
* lib: implement “kb flags”Philipp Gesang2021-12-122-113/+303
| | | | | | | | 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.
* lib: add ioctl wrappers for KDGKBLED / KDSKBLEDPhilipp Gesang2021-12-121-43/+111
| | | | | Reusing the same definitions as we have for KD{G,S}ETLED as they’re practically the same.
* lib: close console fd on dropPhilipp Gesang2021-12-121-0/+14
|
* doc: expand man page some morePhilipp Gesang2021-12-121-4/+40
|
* bin: allow specifying the console on the command linePhilipp Gesang2021-12-122-64/+118
| | | | | | | | | | | | | 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.
* doc: add screenshots to readmePhilipp Gesang2021-12-123-6/+15
|
* bin: refactor job into member functions + traitPhilipp Gesang2021-12-121-188/+222
|
* doc: describe led setting in readme and manpagePhilipp Gesang2021-12-123-5/+18
|
* bin: lib: implement setting state of individual LEDsPhilipp Gesang2021-12-122-17/+120
|
* bin: implement led revertPhilipp Gesang2021-12-122-7/+26
| | | | | | | | | | | | 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-122-6/+61
| | | | | | | Currently only supports setting the raw state from an integer value: $ vtcol leds set -8 2
* update readmePhilipp Gesang2021-12-121-15/+38
|
* doc: update manpage for colors/leds splitPhilipp Gesang2021-12-121-20/+91
|
* move color ops into subcommandPhilipp Gesang2021-12-112-203/+248
| | | | | | | | | | | | So what used to be $ vtcol set solarized becomes $ vtcol colors set solarized etc.
* add KDGETLED subcommand to vtcol-binPhilipp Gesang2021-12-082-2/+86
| | | | | | | | | Actually we add both subcommand and sub-subcommand. Example: [*] 15:52:40 phg@acheron vtcol $ vtcol leds get Caps: false, Num: true, Scroll: false
* add ioctl wrappers for KDGETLED / KDSETLEDPhilipp Gesang2021-12-081-5/+119
|
* be more specific about what “list” doesPhilipp Gesang2021-12-081-1/+1
|
* misc: add nix derivationPhilipp Gesang2021-11-253-1/+76
|
* move archlinux stuff to subdirPhilipp Gesang2021-11-255-0/+0
|
* move base64 handling out of PalettePhilipp Gesang2021-11-252-25/+26
| | | | | Try and not encumber the lower level types with more dependencies than needed.
* don’t panic!() on open(2) failurePhilipp Gesang2021-11-241-10/+10
|
* add base64 input to ‘dump’Philipp Gesang2021-11-241-7/+23
|
* add base64 input for ‘set’Philipp Gesang2021-11-242-0/+45
|
* add base64 output for ‘get’Philipp Gesang2021-11-243-6/+25
|
* optionally clear after each fade stepPhilipp Gesang2021-11-232-6/+27
|
* implement fadingPhilipp Gesang2021-11-232-3/+195
| | | | vtcol fade --ms 1000 --frequency 10 --to solarized & dmesg
* get rid of useless lifetimesPhilipp Gesang2021-11-221-5/+5
|
* switch RawPalette to integer representationPhilipp Gesang2021-11-162-51/+96
| | | | | Introducing a simple type for RGB colors. That awkward string representation for RawPalette got unwieldy quick.
* add KDGKBTYPE wrapperPhilipp Gesang2021-11-151-8/+14
|
* namespace ioctl related symbolsPhilipp Gesang2021-11-151-45/+53
|
* move console handling into libPhilipp Gesang2021-11-152-104/+162
| | | | | All operations are now exposed through wrappers that are member functions of ``vtcol::Console``.
* use idiomatic syscall error wrappersPhilipp Gesang2021-11-151-24/+48
| | | | | A simplified version of the function used in std which aren’t made public.
* turn Fd into proper wrapperPhilipp Gesang2021-11-152-21/+39
|
* drop bespoke ioctl() wrapperPhilipp Gesang2021-11-151-16/+3
|
* decontaminate library from clap and anyhow depsPhilipp Gesang2021-11-152-12/+28
|
* lib: split out libraryPhilipp Gesang2021-11-153-533/+580
| | | | | | | 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.
* add rustdoc to doc recipePhilipp Gesang2021-11-121-1/+7
|
* 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!
* add build recipe for binaryPhilipp Gesang2021-11-111-5/+14
|
* fill in manpagePhilipp Gesang2021-11-111-11/+152
|
* add built instructions for manpagePhilipp Gesang2021-11-113-1/+26
|
* avoid hard coding builtin namesPhilipp Gesang2021-11-112-48/+104
|
* add green monochrome theme (phosphor)Philipp Gesang2021-11-101-0/+21
|
* add toggle subcommandPhilipp Gesang2021-11-103-1/+54
|
* update readmePhilipp Gesang2021-11-101-28/+27
|