greenclip Documentation

repository·master·Indexed 23 days ago

https://github.com/erebe/greenclip

A clipboard manager that integrates with Rofi, dmenu, or fzf to allow users to switch between previous clipboard selections. Supports text, small images, application blacklisting, and configuration via a TOML file.

Tokens
742
Snippets
2
Records
6
Agent score
31%

What's inside greenclip

  1. Migrate from greenclip 2.x to 3.x

    master

    To upgrade from version 2.x to 3.x, follow these steps to avoid configuration conflicts:

    1. Kill all currently running greenclip processes.
    2. Delete your old configuration file (~/.config/greenclip.toml).
    3. Delete your old cache files (located in ~/.cache/greenclip*).
    4. Start the new version of greenclip.
  2. Use greenclip with rofi

    master

    Greenclip is designed to work with rofi to browse and select clipboard history. To use it, you must first run the greenclip daemon, then invoke rofi with the greenclip print modifier.

    1. Start the daemon: Run greenclip daemon in the background.
    2. Open the clipboard menu: Use the following rofi command to display your history. Selecting an entry will automatically place it into your clipboard.
  3. Install greenclip

    master

    Greenclip is distributed as a static binary. You can download it directly to your $PATH or install it via the Arch Linux AUR.

    Manual Installation: Download the binary using wget and move it to a directory in your $PATH.

    Arch Linux Installation: Use yay to install the package from the AUR.

  4. Configure greenclip

    master

    Configuration is handled via a TOML file located at ~/.config/greenclip.toml.

    Key configuration options include:

    • history_file: Path to the file where history is stored.
    • max_history_length: Maximum number of items to keep in history.
    • max_selection_size_bytes: Size limit for selections (set to 0 for unlimited).
    • trim_space_from_selection: Whether to trim whitespace.
    • use_primary_selection_as_input: If true, merges X Primary selection with clipboard selection.
    • blacklisted_applications: A list of application names to ignore.
    • enable_image_support: Enables/disables image copying.
    • image_cache_directory: Directory for cached images.
    • static_history: A list of strings to be permanently added to the end of your history.
    [greenclip]
      history_file = "/home/erebe/.cache/greenclip.history"
      max_history_length = 50
      max_selection_size_bytes = 0
      trim_space_from_selection = true
      use_primary_selection_as_input = false
      blacklisted_applications = []
      enable_image_support = true
      image_cache_directory = "/tmp/greenclip"
      static_history = [
     '''¯\_(ツ)_/¯''',
    ]
  5. Clear greenclip history

    master

    If the greenclip clear command behaves unexpectedly while the daemon is running, you must stop the daemon first. Use the following command to safely clear the history and restart the daemon:

    pkill greenclip && greenclip clear && greenclip daemon &

    pkill greenclip && greenclip clear && greenclip daemon &