git-annex/doc/tips/file_manager_integration.mdwn
https://launchpad.net/~maestro-alubia 5e7d3113f7
2014-03-24 15:47:48 +00:00

55 lines
1.6 KiB
Markdown

Integrating git-annex and your file manager provides an easy way to select
annexed files to get or drop.
## 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
## 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.