Skip to content

misc0110/dolphin-copy-to-clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Copy File Content to Clipboard for KDE Dolphin

This small add on adds a context menu entry in KDE Dolphin that lets you copy the content of any file directly into the clipboard. Right click a file and choose "Copy file content to clipboard". The content will be placed in the clipboard as bytes or text.

The project contains:

  • copy-file-content.desktop
  • install.sh

Both files are placed in this repository.

Requirements

You need one of the following tools:

  • wl-clipboard (Wayland)
  • xclip (X11)

The install script checks for these tools and stops if none are available.

Installation

Run the install script:

./install.sh

What the script does:

  • Checks for wl-copy or xclip
  • Creates the directory ~/.local/share/kio/servicemenus if needed
  • Copies the desktop file into that directory
  • Makes the desktop file executable

After installation, restart all Dolphin windows.

Usage

  1. Open Dolphin
  2. Right click any file
  3. Choose "Copy file content to clipboard"

The content of the file is now in your clipboard.

Uninstallation

Remove the installed service menu file:

rm ~/.local/share/kio/servicemenus/copy-file-content.desktop

Restart Dolphin afterward.

Notes

  • The entry appears for all file types
  • The script uses a simple shell command that pipes file content into either wl-copy or xclip

If you want improvements or more features, feel free to open an issue or send a pull request.

About

A small Dolphin (KDE) extension to directly copy the content of a file to the clipboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages