No description
Find a file
2020-02-12 17:30:08 +01:00
.gitignore Initial commit 2016-04-11 01:38:25 +03:00
LICENSE Initial commit 2016-04-11 01:38:25 +03:00
README.md add stuff for alias to README 2020-02-12 01:27:16 +01:00
requirements.txt Update requirements.txt 2017-01-11 09:18:40 -08:00
setup-myuser.sh change configs 2020-02-12 17:30:08 +01:00
setup.sh change configs 2020-02-12 17:30:08 +01:00
uninstall.sh change configs 2020-02-12 17:30:08 +01:00
workdirfs.conf change configs 2020-02-12 17:30:08 +01:00
workdirfs.py fix string 2020-02-12 17:16:53 +01:00
workdirfs.service change configs 2020-02-12 17:30:08 +01:00

workdirfs

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.

It also contains a systemd-unit for users systemd-process, which will start on login and ends, when user logs out.

System Requriements

python3 is requried and also this packages:

Debian based systems

    sudo apt install python3-fuse python3-fusepy

Redhat based systems

    sudo dnf install python3-fusepy

Installation

Run setup.sh, to install it for all user. This script will do the next steps for you. Reload users systemd and start service And then reload users systemd

    systemctl --user daemon-reload
    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.