aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2016-08-06Add documentation for `strip_key`v0.0.1Teddy Wing
2016-08-06Make selection arrow movement code DRYTeddy Wing
Remove the duplication of these lines for the `j` and `k` commands by extracting them to a function.
2016-08-06Set window title in knockout textTeddy Wing
Make the title appear in white-on-black knockout text.
2016-08-06Remove unused variable in getchar pattern matchTeddy Wing
Use `_` for the default/general case. Do nothing in this case, just continue looping.
2016-08-06Remote the "test" lineTeddy Wing
Delete this line from the TUI display and adjust the real output lines to be one line higher.
2016-08-06Remove `set_cursor` callsTeddy Wing
Don't move the cursor when the selection is changed. It was flickering, which looked rather distracting. Removing the cursor makes the interface look more fluid and snappy.
2016-08-06Parse options from STDINTeddy Wing
Read STDIN and get all lines that start with "e: ", "u: ", and "p: ". If none are found, exit. These lines get added to the `options` vector which then gets displayed in the TUI. Since the contents of the vector are different from our hard-coded one, use a borrow on the clipboard write call.
2016-08-06Handle `Result` on clipboard `set_contents`Teddy Wing
Change the colour of the selection arrow to red if there's an error and green if the clipboard was written to successfully. The colour only lasts for 100 milliseconds because that's the refresh rate of the loop. This seems to be a nice way to briefly offer a visual notification and automatically return the interface to normal right afterward.
2016-08-06knockout_cell: Use name instead of hex code byteTeddy Wing
Better readability and it's the same. It looked a little darker than white, that's why I changed it, but they're the same.
2016-08-06Copy line value to clipboard when Enter key is pressedTeddy Wing
2016-08-06Add a function that strips the "key" part from the lineTeddy Wing
Lines are formatted like: e: email@example.com This function turns that into: email@example.com It will be used to strip the "key" so that we can copy only the "value" part of the line to the system clipboard.
2016-08-06Move the selection marker with `j` & `k`Teddy Wing
The selection arrow can now be moved. Not liking the code duplication. We'll have to figure something out to sort that.
2016-08-06Initial trial of selection trackingTeddy Wing
Decided to track the location of the selection in a struct and make a function to move the current selection. But I can't mutably borrow the terminal because it's already mutable. Will need to rethink this.
2016-08-05Print a list of options to the TUITeddy Wing
Create a hard-coded list of options for testing and print them to the terminal interface. These will eventually be selectable with `j`,`k`.
2016-08-05Add an arrow markerTeddy Wing
Print a URLView-like arrow for choice selection.
2016-08-05Allow both 'q' and Ctrl-C to quitTeddy Wing
Alo update the title text with information on how to quit.
2016-08-05Test terminal outputTeddy Wing
Output a single string to the terminal in the alternate screen. This allows us to test the base functionality of what we'll need for a dialog a la URLView. Used Rustty's examples as a big reference.
2016-08-05Initial commit. Cargo init.Teddy Wing
Initialise a new project with `cargo init --bin`.