» Main »
daglink - symlink management
Published by Tim Cuthbertson
- Overview
This is a Zero Install feed. To add this program to your Applications menu, choose Zero Install -> Add New Program from the Applications menu. e.g. on Ubuntu:
If you don't see this menu item, install the zeroinstall-injector package from your distribution's repository, or from 0install.net.
Drag the feed's URL to the dialog box that appears. Other environments may use other systems. For example, if you are a ROX desktop user, drag the link to AddApp instead.
Alternatively, to run it from the command-line:
$ 0launch http://gfxmonk.net/dist/0install/daglink.xml
The 0alias command can be used to create a short-cut to run it again later.
If you don't have the 0launch command, download it from the 0install.net web-site, which also contains documentation about how the Zero Install system works.
- Full name
- Description
# daglink ..because trees are boring ### Why would you need this? - You have customised a lot of files in your system - you want to keep them in a central location, in order to: - back them up easily - keep track of them - (maybe) version control them - you want to link different things into different (or the same) locations depending on hostname - e.g link a different /etc/apt.sources.list depending on distribution version - you want a tool that is so meta, it can install itself ## What does it do? daglink makes symbolic links. The main usage is linking various well-known paths to somewhere within a self-contained config directory. E.g. you can keep all your settings in ~/dev/config, and creates links to files / folders within it from e.g /etc/apt/sources.list.d, /etc/sessions.d, ~/.vimrc. Really it can be used for any configuration that requires well-known paths and you wish to store the contents of such files in a place of your choosing. ## Configuration: All the configuration is in one file, that is by default searched for in `~/.config/daglink/links.yml`. But you can use `-c` to provide your own config path. The basic entry looks like this: /etc/path/to/wherever: path: ~/config/whatever-config This will link `/etc/path/to/wherever` to `~/config/whatever-config`. You can use relative paths as the `path` value, they are taken from the current directory (or from the `--base` option). ### Tags: You probably don't want to link the same things to the same places on every computer you use. For this, you can use tags. To specify that a directive only applies for a given tag, you can use: /etc/path/to/wherever: path: ~/config/whatever-config tags: home (`tags` is a space-separated list, the directive will be applied if you have specified all of the given tags) To specify multiple targets for a single location, use a list: /etc/path/to/wherever: - path: ~/config/home-config tags: home - path: ~/config/work-config tags: work **Note**: this will fail if more than one directive matches the provided set of tags, as that would be impossible to do. ### zero install If you love zero-install (I do), you can use daglink to make sure a location contains the latest version of a given feed. For example, you can add daglink itself to run whenever you login with this rather self-referential entry: ~/.config/autostart/daglink-update.desktop: uri: http://gfxmonk.net/dist/0install/daglink.xml extract: daglink-update.desktop Since you can't provide command-line arguments to that startup item, you will also need to make sure your config file can be found at `~/.config/daglink/links.yml`. By now you can probably guess how I suggest you do that: ~/.config/daglink/links.yml: path: links.yml The beauty of this is that if you have a development version of daglink registered for that interface it will be used, otherwise it'll be cached from the internet and updated periodically, just like any other zero install feed. There aren't many cases where it's a good idea to keep symlinks of 0install implementations around, but I think symlinks to desktop items can be quite useful - especially if you want to take this configuration to a new machine. ## Meta: You can provide more than just paths in the configuration. There is a `meta` section which allows you to specify: #### zero install aliases If you're going to use the same uri over and over again, this allows you to define an alias. E.g: meta: zeroinstall_aliases: config: http://example.com/0install/my-config.xml ~/.vimrc: uri: config extract: vimrc #### default basedir If you don't specify --basedir, daglink will take the base directory form the meta section (if it exists): meta: basedir: ~/dev/config #### default tags per-hostname If you want to use daglink to update your symlinks automaically, you'll want to put per-machine tags in your config. These tags are only used if you don't specify any tags on the command line itself: meta: hosts: hostname_1: tags: - ubuntu-maverick - xmodmap fedora_hosts: regex: "fed.*" tags: - fedora-15 - xkb The `regex` value, if present, will take precedence over the default exact hostname matching. For a complete example config, feel free to peek at my own configuration: <https://github.com/gfxmonk/app-customisations/blob/master/meta/links.yml> ## Usage: 0launch http://gfxmonk.net/dist/0install/daglink.xml --help
- Homepage
- Available versions
The list below is just for information; Zero Install will automatically select one of these versions for you.
Version Released Stability Platform Download 0.1 2011-06-07 Any Download (2198 bytes) 0.1.1 2011-06-08 Any Download (3085 bytes) 0.1.2 2011-06-10 Any Download (3151 bytes) 0.1.3 2011-06-10 Any Download (3099 bytes) 0.2 2012-01-22 Any Download (4015 bytes) 0.2.1 2012-02-04 Any Download (4012 bytes) 0.2.2 2012-02-05 Any Download (4123 bytes) 0.2.3 2012-04-28 Any Download (3765 bytes) 0.3.1 2013-02-08 Any Download (4043 bytes) 0.3.2 2013-03-29 Any Download (4116 bytes) 0.4 2014-05-29 Any Download (4138 bytes) 0.5 2015-09-09 Any Download (4215 bytes) - Required libraries
The list below is just for information; Zero Install will automatically download any required libraries for you.