https://github.com/fabiomux/kde-servicemenus/blob/main/copy_to_klipper/copy_to_klipper.desktop provides a submenu with several actions:
KDE service menu available under the Dolphin contextual menu, which adds the ability to copy in the clipboard the details of the selected file:
- Full filename
- Path only
- Filename only
- Filename without extension
- md5 checksum
- sha256 checksum
- sha512 checksum
- mime type
- file type
- file size (bytes format)
- file size (human-readable format)
- file permissions (octal format)
- file permissions (human-readable format)
- group id
- group name
- file user id
- file user name
- last access
- last modification
- mount point
All of these have Exec=
lines that I donât understand. For example, âDesktop Action copy_filename_name_noextâ has this Exec=
line (currently line #65 in the link above):
Exec=exe=
command -v qdbus-qt5 || command -v qdbus;x=%n;$exe org.kde.klipper /klipper setClipboardContents "${x%.*}"
- I havenât seen
Exec=exe
before - What does
command -v
mean incommand -v qdbus-qt5 || command -v qdbus
? - What is
$exe
? - According to The Exec key,
%n
is deprecated and thereâs no description of its role
(Iâm guessing x=%n
and ${x%.*}
relate to parameter expansion.)