Clipixir (clipixir v0.1.0)
View SourceClipixir is a terminal clipboard manager and history tracker.
Features
- Auto-promotes most recent clipboard entry.
- Deduplicates and stores last 1000 clipboard texts.
- Tracks usage count and last used timestamp.
- Plain text history file, easy to inspect or backup.
- Robust against crash, restarts, accidental bad lines.
Example
# Start tracking clipboard in the background
{:ok, _pid} = Clipixir.start_link([])
# List clipboard history (returns list of %{value, count, last_used, ...})
Clipixir.list_history()
# Promote a copied entry explicitly (if not already tracked)
Clipixir.promote_to_top_and_dedup("your copied content")
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1
.
Returns a list of %{value, encoded, last_used, count}
entries, newest first.
Promotes the given clipboard string to the top of the history, increments its usage count, and removes older duplicate entries. Also updates the timestamp.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback implementation for GenServer.init/1
.
Returns a list of %{value, encoded, last_used, count}
entries, newest first.
Example
iex> Clipixir.list_history()
[%{value: "foobar", count: 4, last_used: 1715753340, encoded: ...}, ...]
Promotes the given clipboard string to the top of the history, increments its usage count, and removes older duplicate entries. Also updates the timestamp.
iex> Clipixir.promote_to_top_and_dedup("foo bar")
:ok # (side effect: updates file)