-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
91 additions
and
814 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,13 @@ | |
name = "shrtcut" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["Shane Stephenson <[email protected]>"] | ||
readme = "README.md" | ||
description = "A simple clipboard shortcut manager." | ||
homepage = "https://github.com/UnsafeOats/shorty" | ||
repository = "https://github.com/UnsafeOats/shorty" | ||
license = "MIT" | ||
keywords = ["clipboard", "copy", "paste", "text", "shortcut"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Shane Stephenson | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# shrtcut | ||
|
||
### what even is this? | ||
a simple clipboard shortcut manager. set shortcuts and pull them into your global clipboard. | ||
|
||
### how to even use it? | ||
to set shortcuts, edit your `.shrtcut.toml` file and simply add them under the `[shortcuts]` section. as an example, to create a shortcut to Google, you could update your `[shortcuts]` block to look like: | ||
```console | ||
foo@bar: ~$ cat $(shrtcut --configs) | ||
[settings] | ||
width=300 | ||
height=40 | ||
|
||
[shortcuts] | ||
google="google.com" | ||
``` | ||
|
||
to pull up a gui that lets you select a shortcut from a dropdown list, simply run: | ||
```console | ||
foo@bar: ~$ shortcut # No arguments will pull up GUI | ||
|
||
foo@bar: ~$ shortcut --select # The --select/-s argument will also pull up GUI | ||
``` | ||
|
||
the point of this program was to make it easy to select from a list of saved urls. the plan is to include a command to start a listener loop and check for a user-specified key combination to bring up the selection gui. for now, you should use a hotkey program (via shortcuts on windows, spark/fastscripts/etc on mac, bind on linux) and set it to run `shrtcut --select` | ||
|
||
there are some other goodies in here that let you copy shortcuts from the terminal, add new shortcuts from the terminal, and others. to see the full list, you can run the help command like so: | ||
```console | ||
foo@bar: ~$ shrtcut --help | ||
A simple clipboard shortcut manager. | ||
|
||
Usage: shrtcut [options] [shortcut] | ||
[options]: --help, -h, --version, -v, --grab, -g, --select, -s, --add, -a, --configs, -c | ||
[shortcut]: shortcut name | ||
|
||
Examples: | ||
shrtcut --help | ||
shrtcut --version | ||
shrtcut --select | ||
shrtcut --configs | ||
shrtcut --grab google | ||
shrtcut --add current | ||
``` | ||
|
||
### license? | ||
mit. | ||
|
||
### planned work: | ||
- write more comprehensive unit tests. | ||
- create listener command that will listen for user-specified keypresses and open the shortcut ui when pressed so users don't need to manually map the commands in their operating system (see develop branch for this development). | ||
- considering switching from setting shortcuts in the `.shrtcut.toml` file to being stored in an embedded db, but this would make it harder to migrate my urls to be available in `shrtcut`. possibly store shortcuts in an embedded db and create a command to load shortcuts in from a csv/toml file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[settings] | ||
height=40 | ||
width=300 | ||
default="oatbread" | ||
default="google" | ||
|
||
[shortcuts] | ||
google="google.com" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
A simple clipboard shortcut manager. | ||
|
||
Usage: shrtcut [options] [shortcut] | ||
[options]: --help, -h, --version, -v, --grab, -g, --select, -s, --add, -a, --config, -c | ||
[options]: --help, -h, --version, -v, --grab, -g, --select, -s, --add, -a, --configs, -c | ||
[shortcut]: shortcut name | ||
|
||
Examples: | ||
shrtcut --help | ||
shrtcut --version | ||
shrtcut --select | ||
shrtcut --config | ||
shrtcut --configs | ||
shrtcut --grab google | ||
shrtcut --add current |