I'm have written a "Eject" feature for removable devices because if you choose "Safely Remove" it powers down and disconnects the device. I find this is highly annoying because you now have to pull the USB stick or SDCard out and re-insert it to use again.
I have it written and it totally works:
โ
The code above is in ~/.local/share/solid/actions/eject_removable.desktop and works immediately when the file is placed there. When I select "Disks and Devices"
The part I need help with is a want to option to unmount to only appear when the device is actually mounted. I believe this is the line that might make this happen:
but I tried to add "AND StorageVolume.mounted == true" and this only causes the action to not show at all. It seems the option I want is not what I guessed at.
What I'm asking is if anyone knows of a resource that has all the available Predicates in it. I've gone through the KDE tutorial but have found no index.
I have it written and it totally works:
Code:
[Desktop Entry] Actions=open; Type=Service X-KDE-Action-Custom=true X-KDE-Solid-Predicate=[ IS StorageVolume AND StorageVolume.ignored == false ] [Desktop Action open] Exec=udisksctl unmount -b %d Icon=media-eject Name=Unmount Removable Device
The code above is in ~/.local/share/solid/actions/eject_removable.desktop and works immediately when the file is placed there. When I select "Disks and Devices"
The part I need help with is a want to option to unmount to only appear when the device is actually mounted. I believe this is the line that might make this happen:
Code:
X-KDE-Solid-Predicate=[ IS StorageVolume AND StorageVolume.ignored == false ]
What I'm asking is if anyone knows of a resource that has all the available Predicates in it. I've gone through the KDE tutorial but have found no index.






Comment