Skip to content

hisuic/hspool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hspool

Personal Rofi-powered launcher for reusable commands and short text snippets.


Overview

hspool is a lightweight CLI tool for storing and quickly retrieving reusable strings such as:

  • shell commands
  • email addresses
  • frequently used text snippets

Entries are searched through Rofi, and can either be copied to the clipboard, executed as commands, or opened in a browser.

This tool is intentionally simple and minimal.

It is not:

  • a clipboard history tool
  • a password manager
  • a secret storage system

It is designed as a personal snippet pool for fast reuse.


Features

  • Store reusable commands and text snippets
  • Search entries using Rofi
  • Copy snippets to clipboard or execute commands
  • Open selected entries in a browser or search for them on the web
  • Separate public and private data stores
  • Minimal JSON Lines storage format
  • XDG-friendly file locations
  • No external Python dependencies

Requirements

The following tools must be available:

  • Python 3
  • rofi or rofi-wayland
  • wl-copy
  • nerdfonts

Optional but recommended:

  • notify-send

Setup

Clone the repository:

git clone https://github.com/yourname/hspool.git
cd hspool

Make the script executable:

chmod +x hspool

Create a symlink so the command is available globally:

ln -s $(pwd)/hspool ~/.local/bin/hspool

Ensure ~/.local/bin is in your PATH.


Usage

Launch the selector

hspool

This opens a Rofi menu where entries can be searched and selected.

Displayed format:

[CMD]   hyprctl reload              [Hyprland config reload]
[TXT]   yourname@example.com        [Main personal email]

Open in Browser

hspool --browser

This opens the same selector, but the selected entry is handled as a browser target:

  • http://... or https://... entries are opened directly
  • other text is searched using the configured search URL

Add an entry (interactive)

hspool -add

You will be prompted for:

  • content
  • description
  • action (copy or exec)
  • storage location (public or private)

Add an entry (non-interactive)

Example:

hspool -add --store public --action exec \
  --description "Hyprland config reload" \
  -- "hyprctl reload"

Example for storing text:

hspool -add --store private --action copy \
  --description "Main personal email" \
  -- "me@example.com"

Data and Paths

hspool follows XDG conventions.

Config file:

~/.config/hspool/config.toml

Data files:

~/.local/share/hspool/public.jsonl
~/.local/share/hspool/private.jsonl

Each entry is stored as one JSON object per line.

Example:

{"content":"hyprctl reload","action":"exec","description":"Hyprland config reload"}

Both files are loaded when searching.


Config

Configuration is optional.

Default behavior works without a config file.
This example below shows the default configuration.

Example ~/.config/hspool/config.toml:

[rofi]
prompt = "hspool"
width = "80%"

[data]
files = [
  "~/.local/share/hspool/public.jsonl",
  "~/.local/share/hspool/private.jsonl"
]

[browser]
browser_command = "firefox"
search_url = "https://www.google.com/search?q={query}"

Warning

private.jsonl is not encrypted. Do not store secrets in this file.
hspool is a convenience tool, not a secure secret manager.

About

Personal Rofi-powered launcher for reusable commands and short text snippets.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages