Last active
December 24, 2022 22:55
-
-
Save CouldBeThis/75bdee138b7356cd9c5908520229953c to your computer and use it in GitHub Desktop.
Thunar custom actions ~/.config/Thunar/uca.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<actions> | |
<action> | |
<icon></icon> | |
<name>β¨ _Copy path to clipboard</name> | |
<submenu></submenu> | |
<unique-id>1671863021510925-2</unique-id> | |
<command>echo -n %f | xclip -selection "clipboard"</command> | |
<description>_Copy Current Path</description> | |
<range>*</range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon></icon> | |
<name>βΆ π New folder with items</name> | |
<submenu></submenu> | |
<unique-id>1671861174205655-1</unique-id> | |
<command>NEW_FOLDER=$(/usr/bin/zenity --entry --title 'Move into new folder' --text 'Please enter a name for the new folder') && mkdir "$NEW_FOLDER" && mv %F "$NEW_FOLDER"</command> | |
<description>Select any number of file/folders. A dialog will popup in which you can write the name of a new folder to create. Selected Files will be moved there.</description> | |
<range>*</range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon>utilities-terminal</icon> | |
<name>β _Terminal Here</name> | |
<submenu></submenu> | |
<unique-id>1633867917298852-1</unique-id> | |
<command>exo-open --working-directory %f --launch TerminalEmulator</command> | |
<description>Example for a custom action</description> | |
<range></range> | |
<patterns>*</patterns> | |
<startup-notify/> | |
<directories/> | |
</action> | |
<action> | |
<icon>system-search</icon> | |
<name>Search</name> | |
<submenu></submenu> | |
<unique-id>1367866030392913-3</unique-id> | |
<command>catfish %f</command> | |
<description>find files and folders</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
</action> | |
<action> | |
<icon>application-archive-zip</icon> | |
<name>πβΆ un _zip to folder</name> | |
<submenu></submenu> | |
<unique-id>1634131184762465-33</unique-id> | |
<command>unzip %f -d %d/%n-unzipped</command> | |
<description>unzip %f -d %d/%n-unzipped</description> | |
<range></range> | |
<patterns>*.zip</patterns> | |
<startup-notify/> | |
<other-files/> | |
<text-files/> | |
</action> | |
<action> | |
<icon>terminator-layout</icon> | |
<name>ο§ _Root _terminal here</name> | |
<submenu>ο§ root actions</submenu> | |
<unique-id>1634129811544040-14</unique-id> | |
<command>pkexec xfce4-terminal --default-working-directory=%f</command> | |
<description>pkexec xfce4-terminal --default-working-directory=%f</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<text-files/> | |
</action> | |
<action> | |
<icon>folder-red</icon> | |
<name>ο§ Thunar Root</name> | |
<submenu>ο§ root actions</submenu> | |
<unique-id>1367866030392883-2</unique-id> | |
<command>pkexec thunar %f</command> | |
<description>Thunar Root</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
</action> | |
<action> | |
<icon>draw-polygon-star</icon> | |
<name>ο§ _Edit file as root (_kate)</name> | |
<submenu>ο§ root actions</submenu> | |
<unique-id>1634130076732119-20</unique-id> | |
<command>pkexec kate %f</command> | |
<description>pkexec kate %f</description> | |
<range></range> | |
<patterns>*</patterns> | |
<startup-notify/> | |
<directories/> | |
<text-files/> | |
</action> | |
<action> | |
<icon>emblem-symbolic-link</icon> | |
<name>β΄ _Make _sym _link</name> | |
<submenu></submenu> | |
<unique-id>1634130062541926-19</unique-id> | |
<command>ln -Ts %f %n"-ln"</command> | |
<description>ln -Ts %f %n"-ln"</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon>insert-link</icon> | |
<name>β _Make _hard _link</name> | |
<submenu></submenu> | |
<unique-id>1634130130971567-22</unique-id> | |
<command>ln %f %n"-hardlink"</command> | |
<description>ln %f %n"-hardlink"</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<other-files/> | |
<text-files/> | |
</action> | |
<action> | |
<icon>meld</icon> | |
<name>β Compare selected files/directories</name> | |
<submenu></submenu> | |
<unique-id>1634130280296473-24</unique-id> | |
<command>meld %F</command> | |
<description>Compare files and directories with meld</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<text-files/> | |
</action> | |
<action> | |
<icon>baobab</icon> | |
<name>π΄ View disk usage of the current directory</name> | |
<submenu>π΄ diskuse</submenu> | |
<unique-id>1634130206678804-23</unique-id> | |
<command>baobab %d</command> | |
<description>baobab %d</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon></icon> | |
<name>π΄ size - total</name> | |
<submenu>π΄ diskuse</submenu> | |
<unique-id>1635103957659535-2</unique-id> | |
<command>du -h -c %N | grep total | zenity --text-info</command> | |
<description>total size of selected item(s)</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon></icon> | |
<name>π΄ size - each + total</name> | |
<submenu>π΄ diskuse</submenu> | |
<unique-id>1635103991434009-3</unique-id> | |
<command>du -chs %N | zenity --text-info</command> | |
<description>If multiple items selected, will display total size as well as size of each one seperately.</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon></icon> | |
<name>β Change Multiple File Permissions</name> | |
<submenu></submenu> | |
<unique-id>1671863451022346-4</unique-id> | |
<command>ans=$(zenity --height=350 --list --text "change files permissions" --checklist --column "pick" --column "options" TRUE "user-read" TRUE "user-write" FALSE "user-exec" FALSE "group-read" FALSE "group-write" FALSE "group-exec" FALSE "all-read" FALSE "all-write" FALSE "all-exec" --separator=":"); if [ "$ans" != "" ]; then searchuserread="user-read"; searchuserwrite="user-write"; searchuserexec="user-exec"; user1="0" ; user2="0" ; user3="0" ; searchgroupread="group-read"; searchgroupwrite="group-write"; searchgroupexec="group-exec"; group1="0" ; group2="0" ; group3="0" ; searchallread="all-read"; searchallwrite="all-write"; searchallexec="all-exec"; all1="0" ; all2="0" ; all3="0" ; case $ans in *"$searchuserread"*) user1="4" ;; esac ; case $ans in *"$searchuserwrite"*) user2="2" ;; esac ; case $ans in *"$searchuserexec"*) user3="1" ;; esac ; case $ans in *"$searchgroupread"*) group1="4" ;; esac ; case $ans in *"$searchgroupwrite"*) group2="2" ;; esac ; case $ans in *"$searchgroupexec"*) group3="1" ;; esac ; case $ans in *"$searchallread"*) all1="4" ;; esac ; case $ans in *"$searchallwrite"*) all2="2" ;; esac ; case $ans in *"$searchallexec"*) all3="1" ;; esac ; u=$(($user1 + $user2 + $user3)) ; g=$(($group1 + $group2 + $group3)) ; a=$(($all1 + $all2 + $all3)) ; result="$u$g$a" ; chmod $result %F || { zenity --error --text="an error occurred!\ncheck if you are allowed\nto change permissions\nof the selected files"; } ; fi</command> | |
<description>Allows user to change file permissions of one or multiple files with small GUI. </description> | |
<range>*</range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
<action> | |
<icon>kr_diskusage</icon> | |
<name>π΄ Disk Usage (baobab)</name> | |
<submenu>π΄ diskuse</submenu> | |
<unique-id>1622791401529558-3</unique-id> | |
<command>baobab %d</command> | |
<description>Disk usages by directory and its sub directories as a pie chart</description> | |
<range></range> | |
<patterns>*</patterns> | |
<directories/> | |
<audio-files/> | |
<image-files/> | |
<other-files/> | |
<text-files/> | |
<video-files/> | |
</action> | |
</actions> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment