-
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
15 changed files
with
425 additions
and
121 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ | |
*.bkup | ||
|
||
test.db | ||
|
||
clipy |
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 |
---|---|---|
|
@@ -18,3 +18,5 @@ test: | |
.PHONY: clean | ||
clean: | ||
rm -f clipy debug.log | ||
|
||
# TODO vhsをMakefile化する |
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,65 @@ | ||
# 📋clipy: Manage Your Clipboard History | ||
|
||
clipy is a simple tool that saves your clipboard history to a local sqlite database and lets you browse and select entries using an fzf-like interface. | ||
|
||
<img src="assets/clipy-demo.gif" width="700"> | ||
|
||
## How to install | ||
|
||
To install clipy using Go, run: | ||
|
||
```sh | ||
$ go install github.com/szktkfm/clipy/cmd/clipy@latest | ||
``` | ||
|
||
Or, download it: | ||
|
||
[GitHub Releases](https://github.com/szktkfm/clipy/releases) | ||
|
||
## How to use | ||
|
||
Run `clipy shell` to generate a shell script, and then add it to your zshrc or bashrc file for seamless integration. | ||
|
||
```sh | ||
$ clipy shell zsh | tee -a ~/.zshrc | ||
|
||
# https://github.com/szktkfm/clipy | ||
# Run daemon | ||
clipy | ||
|
||
__clipy_history() { | ||
BUFFER="${BUFFER}"$(clipy history --tmux) | ||
CURSOR=${#BUFFER} | ||
zle redisplay | ||
} | ||
zle -N __clipy_history | ||
|
||
# Bind the function to Ctrl+j | ||
bindkey "^j" __clipy_history | ||
``` | ||
|
||
```sh | ||
$ source ~/.zshrc | ||
``` | ||
|
||
Use the `clipy` command to start a background daemon. This daemon monitors your clipboard for new entries and saves them to the local sqlite database. | ||
|
||
```sh | ||
$ clipy | ||
``` | ||
|
||
Access your clipboard history with the `clipy history` command. If you've set up the shell integration, you can invoke this with Ctrl + J for quick access. | ||
|
||
```sh | ||
$ clipy history | ||
``` | ||
|
||
If you're using tmux, you can display the history in a popup using `tmux display-popup`. | ||
|
||
That's it! 🚀 | ||
|
||
## Future Work or Idea | ||
|
||
Sync Across Machines: Integrate with Litestream to sync clipboard history between machines seamlessly. | ||
|
||
Clipboard Server: Run clipy as a centralized clipboard server to share and manage history across multiple devices. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.