aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-09-05Use ClipboardStore to set clipboardreset-clipboardTeddy Wing
Swap ClipboardContext with ClipboardStore to copy to the system clipboard. Also add some documentation to the ClipboardStore::set_context function.
2016-09-05ClipboardStore: Rename "last", only set it on first runTeddy Wing
* Rename `last` to `original` because we only want to set it the first time we set the clipboard. Subsequent times we set the clipboard contents should not affect this saved value. * Only set `original` on first run of the clipboard `set_contents` function.
2016-09-05ClipboardStore proof of conceptTeddy Wing
The new type `ClipboardStore` wraps `ClipboardContext`, allowing us to save the contents of the clipboard before resetting it. We will then be able to reset the clipboard to this original value. This commit includes some old code from when I was originally thinking about this problem before I decided to make a separate module for it. That code should be deleted. One caveat to think about in the future is how to reset the clipboard to the original value after a period of time. In other words, how to pass the original contents value to a spawned child process. Also, we need to make sure that we're only setting `last` once. Subsequent calls should not change the `last` value. And now that I think about that, "last" is probably the wrong name for this. It should be something like "original".
2016-08-17README: Add information about `g` & `G` mappingsv0.2.0Teddy Wing
2016-08-17Cargo: Increase version v0.1.1 -> v0.2.0Teddy Wing
2016-08-17Merge branch 'g-jump-mappings'Teddy Wing
2016-08-17Add support for `g` and `G` movementsTeddy Wing
`g`: moves the selection to the first option `G`: moves the selection to the last option This allows for faster selection if there are more than 2–3 options. Using `g` still allows `gg` to work since doubling the command doesn't change its meaning.
2016-08-06Cargo: Update version v0.1.0 -> v0.1.1v0.1.1Teddy Wing
2016-08-06Merge branch 'fix-passwords-containing-colon-space'Teddy Wing
2016-08-06strip_key: Fix for values that contain ": "Teddy Wing
Values that contained ": " would not be parsed correctly for copying to the clipboard. If, for example, a password contained ": ", those characters and any following them wouldn't be copied. This change allows such passwords to be copied correctly.
2016-08-06Cargo: Increase version v0.0.1 -> v0.1.0v0.1.0Teddy Wing
2016-08-06README.md: Add usage instructions within the TUITeddy Wing
Enumerate the commands available in the interactive interface and describe what they do.
2016-08-06Add screencastTeddy Wing
Include a Gif screencast displayed in the README.
2016-08-06Add READMETeddy Wing
Include a description of the program, how to use it, install and uninstall instructions, and license information. A placeholder Demo section is also written in where a short screencast is expected to be inserted.
2016-08-06Add license (GPLv3+)Teddy Wing
Also include brief notices in the source files. Not a fan of the huge blocks of text that the FSF recommends.
2016-08-06Add Bash completionTeddy Wing
Create a Bash completion file that refers to the `_pass_complete_entries` function from the `pass` Bash completion file. The same completion options are given as when using `pass show`.
2016-08-06Merge branch 'call-pass'Teddy Wing
2016-08-06parse_options: Add a short sentence of documentationTeddy Wing
2016-08-06Extract options from both `pass` and STDINTeddy Wing
Get option extraction/parsing working both for STDIN and for calls to `pass show`. If no argument is passed to the executable or the first argument is "-", options are read from STDIN. Otherwise, the first argument is passed to `pass show`, the output of which is parsed as options.
2016-08-06Call `pass show` with the given argument and run Passextract on resultTeddy Wing
Temporarily comment out code that deals with STDIN to get this feature working. It complicated things to leave it in right now. Given an argument that isn't "-" (STDIN), we pass that argument to `pass show`. Users correctly get a password prompt from `pass`, and the output from the command gets sent to the Passextract TUI for display in the menu and copying.
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-06Add a test file that can be piped to the programTeddy Wing
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-06Cargo: Install 'clipboard' crateTeddy Wing
Allows us to copy to the system clipboard with a very simple interface.
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-05.gitignore: Ignore /private/ directoryTeddy Wing
2016-08-05Cargo: Remove 'termion' dependency, use 'rustty'Teddy Wing
Decided to remove Termion in favour of Rustty because it seems like it has a simpler interface.
2016-08-05Cargo: Install "termion" 1.0Teddy Wing
Terminal library to help with creating a text user interface.
2016-08-05Add .gitignore: Ignore Rust /target/ build directoryTeddy Wing
2016-08-05Initial commit. Cargo init.Teddy Wing
Initialise a new project with `cargo init --bin`.