my thunar custom actions
xfce's default file manager, thunar, includes the very handy ability to be able to make your own entries for commands that appear in the context menu and toolbar. these are all pretty simple for the most part, but improve functionality a lot in my opinion. to install, either recreate it in the gui under the Edit > Configure Custom Actions... menu, or paste them into ~/.config/Thunar/uca.xml
.
all filetypes
copy path
this one is ESSENTIAL imo. i got it from here.
<icon>edit-paste</icon>
<name>Copy path</name>
<submenu></submenu>
<unique-id>1730355018458780-1</unique-id>
<command>echo -n %f | xclip -selection clipboard</command>
<description></description>
<range>*</range>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
images
extract merged layers from krita .kra
i'm allergic to using krita's export function. .kra files are really just normal archive files like .zip or .rar that krita knows how to read a certain way, and one of the files inside is an image made from all visible layers merged together, so you can use a normal archive extracter and get the merged image. it's so fast!
<icon>krita</icon>
<name>krita extract</name>
<submenu></submenu>
<unique-id>1732979021856571-1</unique-id>
<command>unzip -p %f mergedimage.png > %f.png && rename 's/.kra.png$/.png/' %f.png</command>
<description></description>
<range><em></range>
<patterns></em>.kra</patterns>
<other-files/>
</action>
rotate image/s -90 degrees
to make an action to rotate right, just remove the - from -90.
<icon>object-rotate-left</icon>
<name>rotate 90</name>
<submenu></submenu>
<unique-id>1730468624739762-1</unique-id>
<command>mogrify -rotate -90 %F</command>
<description></description>
<range><em></range>
<patterns></em></patterns>
<image-files/>
</action>
make image/s grayscale
changes to grayscale colorspace then changes back to rgb colorspace while keeping the gray look.
<icon>paint</icon>
<name>make grayscale</name>
<submenu></submenu>
<unique-id>1730470535847837-2</unique-id>
<command>mogrify -colorspace gray %F && mogrify -define png:color-type=6 %F</command>
<description></description>
<range>*</range>
<patterns>*</patterns>
<image-files/>
</action>
remove transparency from image/s
replaces transparency in an image with a white background.
<icon>grid-rectangular</icon>
<name>remove transparency</name>
<submenu></submenu>
<unique-id>1732082394438418-1</unique-id>
<command>mogrify -background white -flatten %F</command>
<description></description>
<range><em></range>
<patterns></em></patterns>
<image-files/>
</action></p></div>