fruitcombo

go back

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.

audio

open playlist in vlc

i store my playlists as .m3u files in their own dedicated directories to be able to also save cover art and annotations. this makes enqueueing them take 1 less click.

<action>
<icon>folder-music</icon>
<name>open with vlc</name>
<submenu></submenu>
<unique-id>1730463808278673-1</unique-id>
<command>vlc %f/*.m3u</command>
<description></description>
<range>*</range>
<patterns>*</patterns>
<directories/>
</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!

<action>
<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.

<action>
<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>
convert image/s to grayscale

be warned this doesn't just make an image appear grayscale but changes the index to grayscale only.

<action>
<icon>paint</icon>
<name>make grayscale</name>
<submenu></submenu>
<unique-id>1730470535847837-2</unique-id>
<command>mogrify -colorspace gray %F</command>
<description></description>
<range>*</range>
<patterns>*</patterns>
<image-files/>
</action>
remove transparency from image/s

this replaces transparency in an image with a white background.

<action>
<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>

all filetypes

copy path

this one is ESSENTIAL imo. i got it from here.

<action>
<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>