From 5cb100f5647abeb01548b49cdda2a217bff2bea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 12 Feb 2020 01:27:16 +0100 Subject: [PATCH] add stuff for alias to README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index bb96339..2b5a865 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,11 @@ And then reload users systemd systemctl --user restart workdirfs.service ``` +### Alias +If you want, add an alias in your configuration (e.g. ~/.bashrc /etc/bash.bashrc /etc/profile.d/aliases... whatever you want) to go quick to archive or ~/Work. +``` + alias gowork='[ -e $(xdg-user-dir WORK) ] && cd $(xdg-user-dir WORK)' + alias goarchive='[ -e $(xdg-user-dir ARCHIVE) ] && cd $(xdg-user-dir ARCHIVE)' +``` +On every restart of users systemd, the xdg-configuration for xdg-user-dir WORK and ARCHIVE is being updated, so the alias should work always. Even if you change the path to XDG\_WORK\_DIR or XDG\_ARCHIVE\_DIR in systemd unit.