Docu review done: Wed 31 Jul 2024 02:40:17 PM CEST
taskwarrior
Table of content
Installation
$ apt install taskwarrior
Configuration
The configuration is done in the file ~/.taskrc
and stores all the data configured in the variable data.location inside of the ~/.taskrc
file. Default is ~/.task
You can include additional configs by adding lines like
include /absolut/path/to/file
include ~/relativ/path/to/file
Include holidays
To include the holidays for your country you it is enough that you include the dedicated file for your country.
These files can be found in the directory /usr/share/taskwarrior/
.
Update holiday file
You can update the holiday files with the perl script update-holidays.pl
which is part of the package.
$ sudo /usr/share/doc/taskwarrior/examples/update-holidays.pl --locale xx-XX --file /usr/share/taskwarrior/holidays.xx-XX.rc
Sample for updating file
$ sudo /usr/share/doc/taskwarrior/examples/update-holidays.pl --locale de-AT --file /usr/share/taskwarrior/holidays.de-AT.rc
Suggestion
A suggestion from my side is, if you want to add your vacation days into taskwarrior, just define them as holidays. So what I did was the following
- I generated a new rc file:
$ vim .task/vacation.rc
- In the file you than just add your vacations like this:
Just make sure that your
ID
is higher than the normalID
(holiday.xx-XX[ID]
) from holidays which got imported. I just start with 100, because there will never be 100 public holidays in Austria ;)
holiday.de-AT100.name=Vacation
holiday.de-AT100.date=20200821
holiday.de-AT101.name=Vacation
holiday.de-AT101.date=20200822
holiday.de-AT102.name=Vacation
holiday.de-AT102.date=20200823
holiday.de-AT103.name=Vacation
holiday.de-AT103.date=20200824
holiday.de-AT104.name=Vacation
holiday.de-AT104.date=20200825
holiday.de-AT105.name=Vacation
holiday.de-AT105.date=20200826
holiday.de-AT106.name=Vacation
holiday.de-AT106.date=20200827
holiday.de-AT107.name=Vacation
holiday.de-AT107.date=20200828
holiday.de-AT108.name=Vacation
holiday.de-AT108.date=20200829
holiday.de-AT109.name=Vacation
holiday.de-AT109.date=20200830
- Next thing is that you have to add the file as an include to your ~/.taskrc config and you are done.
- If you are now running
task calendar
you will see that your vacations will have the same highlighting than holidays.