wok-next rev 17294
pcmanfm: add few custom actions
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Oct 30 01:16:39 2014 +0200 (2014-10-30) |
parents | cd967cdca7ae |
children | 2a61932b3f01 |
files | pcmanfm/receipt pcmanfm/stuff/actions/development-menu.desktop pcmanfm/stuff/actions/gvfs-info.desktop pcmanfm/stuff/actions/gvfs-mount-archive.desktop pcmanfm/stuff/actions/root.desktop pcmanfm/stuff/actions/rootedit.desktop pcmanfm/stuff/actions/show-ca-parameters.desktop pcmanfm/stuff/actions/slideshow.desktop pcmanfm/stuff/actions/wallpaper.desktop pcmanfm/stuff/gvfs-mount-archive.sh |
line diff
1.1 --- a/pcmanfm/receipt Thu Oct 30 01:06:47 2014 +0200 1.2 +++ b/pcmanfm/receipt Thu Oct 30 01:16:39 2014 +0200 1.3 @@ -39,9 +39,15 @@ 1.4 1.5 # XDG autostart desktop file (lxsession will use it automatically) 1.6 cp -a $stuff/autostart $fs/etc/xdg 1.7 - 1.8 - # Fix icon in pcmanfm.desktop 1.9 + 1.10 + # Change icon in pcmanfm.desktop 1.11 sed -i 's/Icon=.*/Icon=folder/' \ 1.12 $install/usr/share/applications/pcmanfm.desktop 1.13 cp -a $install/usr/share/applications $fs/usr/share 1.14 + 1.15 + # Add custom actions 1.16 + mkdir -p $fs/usr/share/file-manager 1.17 + cp -a $stuff/actions $fs/usr/share/file-manager 1.18 + cp -a $stuff/gvfs-mount-archive.sh $fs/usr/bin 1.19 + chmod +x $fs/usr/bin/gvfs-mount-archive.sh 1.20 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/pcmanfm/stuff/actions/development-menu.desktop Thu Oct 30 01:16:39 2014 +0200 2.3 @@ -0,0 +1,7 @@ 2.4 +[Desktop Entry] 2.5 +Type=Menu 2.6 +ItemsList=gvfs-info;show-ca-parameters; 2.7 + 2.8 +Icon=applications-development 2.9 +Name=SliTaz Development Actions 2.10 +Name[ru]=Разработка SliTaz
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/pcmanfm/stuff/actions/gvfs-info.desktop Thu Oct 30 01:16:39 2014 +0200 3.3 @@ -0,0 +1,12 @@ 3.4 +[Desktop Entry] 3.5 +Type=Action 3.6 +TargetLocation=true 3.7 +Icon=help-about 3.8 +Profiles=gvfs-info; 3.9 +Name=GVFS info 3.10 +Name[ru]=Информация GVFS 3.11 + 3.12 +[X-Action-Profile gvfs-info] 3.13 +Exec=sh -c "gvfs-info %u 2>&1 | sed -e '/: /!s|$|&\\n|g' -e '/: /s|: |\\n|1g' | yad --title='GVFS info' --window-icon='gtk-info' --list --width=600 --height=320 --column='Name' --column='Value' --button='gtk-close'" 3.14 + 3.15 +#NoExec=sh -c "gvfs-info %u | yad --center --title='GVFS info' --window-icon='gtk-info' --text-info --width=600 --height=320 --fore=#FFF --back=#000 --fontname=monospace --button='gtk-close'"
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/pcmanfm/stuff/actions/gvfs-mount-archive.desktop Thu Oct 30 01:16:39 2014 +0200 4.3 @@ -0,0 +1,11 @@ 4.4 +[Desktop Entry] 4.5 +Type=Action 4.6 +Name=Mount the archive 4.7 +Name[ru]=Подключить архив 4.8 +Icon=package-x-generic 4.9 +Profiles=on_archive; 4.10 + 4.11 +[X-Action-Profile on_archive] 4.12 +TryExec=/usr/lib/gvfs/gvfsd-archive 4.13 +Exec=gvfs-mount-archive.sh '%u' 4.14 +MimeTypes=application/zip;application/gzip;application/x-cd-image;application/x-compressed-tar;application/x-bzip-compressed-tar;application/vnd.android.package-archive;application/x-xpinstall;application/x-raw-disk-image;application/x-rar;application/x-cpio;application/x-7z-compressed;application/x-tazpkg;application/x-ms-dos-executable;
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/pcmanfm/stuff/actions/root.desktop Thu Oct 30 01:16:39 2014 +0200 5.3 @@ -0,0 +1,11 @@ 5.4 +[Desktop Entry] 5.5 +Type=Action 5.6 +Name=Open Folder As Root 5.7 +Name[ru]=Открыть папку от имени Root 5.8 +Icon=dialog-password 5.9 +Profiles=root_on_folder; 5.10 + 5.11 +[X-Action-Profile root_on_folder] 5.12 +ShowIfTrue=test $(whoami) != root 5.13 +Exec=tazbox su "pcmanfm %u" 5.14 +MimeTypes=inode/directory;
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/pcmanfm/stuff/actions/rootedit.desktop Thu Oct 30 01:16:39 2014 +0200 6.3 @@ -0,0 +1,10 @@ 6.4 +[Desktop Entry] 6.5 +Type=Action 6.6 +Name=Edit as Root 6.7 +Name[ru]=Править от имени Root 6.8 +Icon=dialog-password 6.9 +Profiles=file_root_edit; 6.10 + 6.11 +[X-Action-Profile file_root_edit] 6.12 +Exec=subox "editor %f" 6.13 +MimeTypes=text/*;
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/pcmanfm/stuff/actions/show-ca-parameters.desktop Thu Oct 30 01:16:39 2014 +0200 7.3 @@ -0,0 +1,9 @@ 7.4 +[Desktop Entry] 7.5 +Type=Action 7.6 +Name=Show Custom Actions parameters 7.7 +Name[ru]=Параметры Custom Actions 7.8 +Profiles=any; 7.9 +Icon=document-properties 7.10 + 7.11 +[X-Action-Profile any] 7.12 +Exec=yad --title="Info" --window-icon="gtk-info" --list --text="Custom Actions parameters for the selected items:" --column="Description" --column="Parameter" --column="Value" "(first) basename" %%b "%b" "space-separated list of basenames" %%B "%B" "" "" "" "count of selected items" %%c "%c" "" "" "" "(first) base directory" %%d "%d" "space-separated list of base directory\nof each selected items" %%D "%D" "" "" "" "(first) file name" %%f "%f" "space-separated list of selected file names" %%F "%F" "" "" "" "hostname of the (first) URI" %%h "%h" "" "" "" "mimetype of the (first) selected item" %%m "%m" "space-separated list of the mimetypes\nof the selected items" %%M "%M" "" "" "" "username of the (first) URI" %%n "%n" "port number of the (first) URI" %%p "%p" "scheme of the (first) URI" %%s "%s" "" "" "" "(first) URI" %%u "%u" "space-separated list of selected URIs" %%U "%U" "" "" "" "(first) basename without the extension" %%w "%w" "space-separated list of basenames\nwithout their extension" %%W "%W" "" "" "" "(first) extension" %%x "%x" "space-separated list of extensions" %%X "%X" --height=370 --width=768 --button="gtk-close"
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/pcmanfm/stuff/actions/slideshow.desktop Thu Oct 30 01:16:39 2014 +0200 8.3 @@ -0,0 +1,31 @@ 8.4 +[Desktop Entry] 8.5 +Type=Action 8.6 +Name=Run Slideshow 8.7 +Name[ru]=Запустить слайдшоу 8.8 +Icon=image-x-generic 8.9 +Profiles=viewnior_on_folder;viewnior_on_images;gpicview_on_folder;gpicview_on_images; 8.10 + 8.11 +[X-Action-Profile viewnior_on_folder] 8.12 +TryExec=viewnior 8.13 +ShowIfTrue=test -n "$(find %f -maxdepth 1 -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' -iname '*.gif' -o -iname '*.svg')" 8.14 +Exec=viewnior --fullscreen --slideshow %f 8.15 +MimeTypes=inode/directory; 8.16 + 8.17 +[X-Action-Profile viewnior_on_images] 8.18 +TryExec=viewnior 8.19 +Exec=viewnior --fullscreen --slideshow %F 8.20 +MimeTypes=image/*; 8.21 +SelectionCount=>1 8.22 + 8.23 +[X-Action-Profile gpicview_on_folder] 8.24 +TryExec=gpicview 8.25 +ShowIfTrue=test -n "$(find %f -maxdepth 1 -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' -iname '*.gif' -o -iname '*.svg')" 8.26 +Exec=gpicview --slideshow %f 8.27 +MimeTypes=inode/directory; 8.28 + 8.29 +[X-Action-Profile gpicview_on_images] 8.30 +TryExec=gpicview 8.31 +#Bug: gpicview shows other images after selected 8.32 +Exec=gpicview --slideshow %F 8.33 +MimeTypes=image/*; 8.34 +SelectionCount=>1
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/pcmanfm/stuff/actions/wallpaper.desktop Thu Oct 30 01:16:39 2014 +0200 9.3 @@ -0,0 +1,11 @@ 9.4 +[Desktop Entry] 9.5 +Type=Action 9.6 +Name=Set as wallpaper 9.7 +Name[ru]=Сделать фоном рабочего стола 9.8 +Icon=preferences-desktop-wallpaper 9.9 +Profiles=image_wallpaper; 9.10 + 9.11 +[X-Action-Profile image_wallpaper] 9.12 +MimeTypes=image/*; 9.13 +Exec=pcmanfm -w %f 9.14 +SelectionCount==1
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/pcmanfm/stuff/gvfs-mount-archive.sh Thu Oct 30 01:16:39 2014 +0200 10.3 @@ -0,0 +1,4 @@ 10.4 +#!/bin/sh 10.5 +# gvfs-mount-archive: simple wrapper for PCManFM action "Mount archive" 10.6 + 10.7 +gvfs-mount "archive://$(echo "$1" | sed 's|:|%3A|g;s|/|%2F|g')"