workdirfs/README.md

42 lines
1.4 KiB
Markdown
Raw Normal View History

2020-02-11 15:14:26 +01:00
# workdirfs
2016-04-11 00:40:01 +02:00
2020-02-11 15:14:26 +01:00
This repo contains a fuse-filesystem, which creates automagically a directory in users $HOME
and subdir in directory $HOME/archive/workdir with todays date as subdirname.
All directories are created, if not existent.
2016-04-11 00:40:01 +02:00
2020-02-11 15:14:26 +01:00
It also contains a systemd-unit for users systemd-process, which will start on login and ends, when user logs out.
2016-04-11 00:40:01 +02:00
2020-02-11 15:17:28 +01:00
## System Requriements
2020-02-11 16:10:32 +01:00
python3 is requried and also this packages:
2020-02-11 15:17:28 +01:00
### Debian based systems
```
sudo apt install python3-fuse python3-fusepy
```
### Redhat based systems
```
sudo dnf install python3-fusepy
```
2020-02-11 16:10:32 +01:00
## Installation
Run setup.sh, to install it for all user.
2020-02-12 00:50:24 +01:00
This script will do the next steps for you. Reload users systemd and start service
2020-02-11 16:10:32 +01:00
And then reload users systemd
```
systemctl --user daemon-reload
systemctl --user restart workdirfs.service
```
2020-02-12 01:27:16 +01:00
### 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.
2020-02-11 16:10:32 +01:00
2020-02-12 01:27:16 +01:00
```
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.