git-annex/doc/tips/file_manager_integration.mdwn
Joey Hess b6d46c212e git-annex (5.20140402) unstable; urgency=medium
* unannex, uninit: Avoid committing after every file is unannexed,
    for massive speedup.
  * --notify-finish switch will cause desktop notifications after each
    file upload/download/drop completes
    (using the dbus Desktop Notifications Specification)
  * --notify-start switch will show desktop notifications when each
    file upload/download starts.
  * webapp: Automatically install Nautilus integration scripts
    to get and drop files.
  * tahoe: Pass -d parameter before subcommand; putting it after
    the subcommand no longer works with tahoe-lafs version 1.10.
    (Thanks, Alberto Berti)
  * forget --drop-dead: Avoid removing the dead remote from the trust.log,
    so that if git remotes for it still exist anywhere, git annex info
    will still know it's dead and not show it.
  * git-annex-shell: Make configlist automatically initialize
    a remote git repository, as long as a git-annex branch has
    been pushed to it, to simplify setup of remote git repositories,
    including via gitolite.
  * add --include-dotfiles: New option, perhaps useful for backups.
  * Version 5.20140227 broke creation of glacier repositories,
    not including the datacenter and vault in their configuration.
    This bug is fixed, but glacier repositories set up with the broken
    version of git-annex need to have the datacenter and vault set
    in order to be usable. This can be done using git annex enableremote
    to add the missing settings. For details, see
    http://git-annex.branchable.com/bugs/problems_with_glacier/
  * Added required content configuration.
  * assistant: Improve ssh authorized keys line generated in local pairing
    or for a remote ssh server to set environment variables in an
    alternative way that works with the non-POSIX fish shell, as well
    as POSIX shells.

# imported from the archive
2014-04-02 21:42:53 +01:00

100 lines
3.1 KiB
Markdown

Integrating git-annex and your file manager provides an easy way to select
annexed files to get or drop.
[[!toc]]
## GNOME (nautilus)
Recent git-annex comes with built-in nautilus integration. Just pick the
action from the menu.
[[!img assistant/nautilusmenu.png]]
[[!img assistant/downloadnotification.png]]
This is set up by making simple scripts in
`~/.local/share/nautilus/scripts`, with names like "git-annex get"
## KDE (Dolphin/Konqueror)
Create a file `~/.kde4/share/kde4/services/ServiceMenus/git-annex.desktop` with the following contents:
[Desktop Entry]
Type=Service
ServiceTypes=all/allfiles
MimeType=all/all;
Actions=GitAnnexGet;GitAnnexDrop;
X-KDE-Priority=TopLevel
X-KDE-Submenu=Git-Annex
X-KDE-Icon=git-annex
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
[Desktop Action GitAnnexGet]
Name=Get
Icon=git-annex
Exec=git-annex get --notify-start --notify-finish -- %U
[Desktop Action GitAnnexDrop]
Name=Drop
Icon=git-annex
Exec=git-annex drop --notify-start --notify-finish -- %U
## XFCE (Thunar)
XFCE uses the Thunar file manager, which can also be easily configured to allow for custom actions. Just go to the "Configure custom actions..." item in the "Edit" menu, and create a custom action for get and drop with the following commands:
git-annex drop --notify-start --notify-finish -- %F
for drop, and for get:
git-annex drop --notify-start --notify-finish -- %F
This gives me the resulting config on disk, in `.config/Thunar/uca.xml`:
<action>
<icon>git-annex</icon>
<name>git-annex get</name>
<unique-id>1396278104182858-3</unique-id>
<command>git-annex get --notify-start --notify-finish -- %F</command>
<description>get the files from a remote git annex repository</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
<action>
<icon>git-annex</icon>
<name>git-annex drop</name>
<unique-id>1396278093174843-2</unique-id>
<command>git-annex drop --notify-start --notify-finish -- %F</command>
<description>drop the files from the local repository</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
The complete instructions on how to setup actions is [in the XFCE documentation](http://docs.xfce.org/xfce/thunar/custom-actions).
## your file manager here
Edit this page and add instructions!
## general
If your file manager can run a command on a file, it should be easy to
integrate git-annex with it. A simple script will suffice:
#!/bun/sh
git-annex get --notify-start --notify-finish -- "$@"
The --notify-start and --notify-stop options make git-annex display a
desktop notification. This is useful to give the user an indication that
their action took effect. Desktop notifications are currently only
implenented for Linux.