Support for Linux, macOS and Windows
A Tool to record timings for tasks per category and remembering to terminate work sessions.
There are many different task to do with a computer. At the end of the day one sometimes does not know what one has done today. If working on projects as business one has to log the hours per project, too.
Where has all the time gone?
What did I do all the time?
This tool tries to solve both problems at once:
- The Tools opens a dialog on computer startup and asks for the current/ upcoming task:
- Name of the task
- Category of the task
- Planned time to work on the task
- If the planned time is over, the tools asks again for the next task.
- So the tool logs the used time per task and category
- Also the tools limits the time per task and reminds to do other things
- And so on ....
- Of course
- One can continue the same task after the limit (the next dialog is just a reminder)
- One can pause the tool
If a dialog opens, give a name for the current task and choose a category. Also give a time limit,
this can be a absolute value like 12:00
or 22:30
or a relative one like 1h
, 20m
or
1h10m
. The system will open the next dialog after the time limit was reached.
When the dialog opens and you need additional time for the last task, you can write a relative time value
like 5m
and prepend a +
without giving a name. So only typing +5m
will give you five minutes more
for your last task.
You can also shutdown the PC (the task will end with the shutdown).
If you don't know what your current task ist, try the overview at ttt o
.
If you need a short break, you can use the button Pause
in the dialog (will be around 1 minute).
If you need a longer break, you can disable the tool by executing ttt t
and enable afterwards with
another ttt t
.
If you have to stop your current task before the limit is reached, you can run ttt new
to start a new task (will open dialog).
The statistics can be printed using ttt s
, which will show daily stats by default.
Other stat-commands for different periods and filters:
ttt s -names Website
ttt s day -names Website,SocialMedia
ttt s week -cats Work,Hobby
ttt s month -cats Hobby -names Website
ttt s all
ttt s range 2020-01-11 2020-01-15
ttt s range 2020-01-11
The available categories can be edited using ttt conf cats add|del|list
,
When deleting a category, the corresponding task won't be deleted too. The categories
are used to display the values in the dropdown of the dialogs.
If some typo has occurred there is are two possibilities to change finished tasks:
ttt conf merge
Merge tasks of different names into one single name. With other words e.g. rename tasks calledProectX
toProjectX
.ttt conf edit 2020-01-21
Edit the finished tasks of a specified day. The system will show a list of all tasks finished that day. Afterwards one can choose a task and either change or delete it. While changing allows to change the name, category and duration.
The system can synchronize the completed tasks across multiple devices. There are two ways to synchronize your tasks:
- Use a local directory where the client will save a copy of each completed task. If the directory is synchronized across multiple devices (e.g. using NextCloud, GoogleDrive, OneDrive, ...) the clients on other devices will also save a copy of their completed task in the directory. In the end the client can load all local tasks and all task from other devices into one stats view.
- Use a sync server. All clients pushe the tasks to a server
and other devices can load them from their.
See https://github.com/KIMB-technologies/TaskTimeTerminateServer
for a sync server implementation.
If the inital sync fails on windows, one may check that
extension=php_openssl.dll
is defined inphp.ini
When synchronisation is enabled the stats view will show a new
column Other devices
if the shown tasks were
completed on other devices, too. By giving the argument
-localOnly
only local tasks will be shown. Also it is possible
to filter for devices by using e.g. -devices Desktop
.
Synchronisation can be enabled using the ttt conf sync server|directory
command.
Type ttt conf sync directory
to enable directory syncing, the system
will ask for a local directory (the directory should only be used for
TTT synchronisation and synced to the other devices e.g. via Netxcloud).
Next the client will ask for a name, this name has to be unique for
each device and will be shown in the stats view of the other devices.
ttt conf sync directory
has to be run on each device.
See the Readme in the extension-folder!
The tool supports Linux (like Ubuntu, Linux Mint), macOS and Windows. We have tested it under Linux Mint 18, macOS Catalina and Windows 10.
We have an install and update script for macOS and Linux β install.sh
.
The script will follow these steps (for detailed information per operating system see below).
- Check the installation of PHP (version 7.4 or newer)
- Ask the user where to install
- Use git to download the programs repository
- Add the
ttt
command to the shell - Create an background job if on Linux
- Install PHP 7.4 or newer (only the CLI component is needed)
- On Linux install
yad
for dialogs - On Windows PHP-GTK will be used (and downloaded on first run of
./cli.php r
) - On macOS the dialog is a native program bundle shipped in this repository
- If you are on macOS or Windows and would like to use the Task-Autocomplete in the dialogs. Then the extension
sockets
has to be available in PHP.
- On Linux install
- Download this repository, either via git or as archive from Releases and save to a folder
- Make executable
chmod +x ./record.php ./cli.php
- Setup an autostart for
./record.php
- The system needs a background process to check for limits and timeouts and to open dialogs
- Add a terminal shortcut to the
cli.php
- e.g.
echo "alias ttt='/home/user/my-full-path/to/cli.php'" >> ~/.bashrc
- e.g.
- Add categories (e.g. Hobby, Work, Musts)
ttt conf cats add
./cli.php conf cats add
- Start the background job (e.g. logout and login again)
- Add Times and Tasks while working
- Show stats
ttt s today
Per default all data is saved in ~/.tasktimeterminate/
. This can be changed by editing the
config.json
in the programs root folder (will be created on first run of program).
On Windows we will use %AppData%/Roaming
for ~
.
Per default all times use the timezone Europe/Berlin
. This can be changed by editing the config.json
in the programs
root folder.
The program folder (not the data folder) can be deleted and replaced by a newer version.
The install script registers the ttt-update
command (which reruns install.sh
under the hood).
- PHP 7.4
sudo apt-get install php7.4-cli
- If there is no package, I recommend the builds of OndΕej SurΓ½
- Ubuntu/ Linux Mint
add-apt-repository ppa:ondrej/php && sudo apt-get update
- Debian see https://packages.sury.org/php/README.txt
sudo apt-get install php7.4-cli
should work now
- Ubuntu/ Linux Mint
- YAD
sudo apt-get install yad
- PHP 7.4
- Only PHP 7.3. is part of macOS, so
/usr/bin/php
will not work! - Install Homebrew https://brew.sh/index
- Install
brew install php
orbrew install php@7.4
- PHP will be installed to
/usr/local/Cellar/php@7.4/*/bin/php
or/usr/local/Cellar/php/*/bin/php
(so use something like thisalias ttt="/usr/local/Cellar/php/*/bin/php /Users/<me>/Applications/TaskTimeTerminate/cli.php
) - The extension
sockets
(for autocompletion of tasks in the dialog) is part of the default PHP installation done by Homebrew.
- Only PHP 7.3. is part of macOS, so
- Background Job
- We will register as Login Object
- Got to System Preferences β Users and Groups β Username β Login Objects
- The repository contains an
TTTd.app
it will startrecord.php
as background processTTTd.app
will only work, if you use Homebrew for the PHP installation- Also
TTTd.app
looks for TTT at~/Applications/TaskTimeTerminate/
- Create own Automator Application as alternative to provided
TTTd.app
- Start Automator.app and open a new Program
- Select Execute Shell Command and
/bin/sh
as Shell - Add a command like this in the textbox on the right
/usr/local/Cellar/php/*/bin/php /Users/<me>/Applications/TaskTimeTerminate/record.php &> /dev/null &
- Save the Application as
.app
and add to Login Objects
- We will register as Login Object
- PHP 7.4
- Download prebuilt version from https://windows.php.net/download/#php-7.4
- Unzip and place somewhere on computer
- Add to
$PATH
or always run likeC:/my/php/path/php.exe C:/Users/<me>/TaskTimeTerminate/cli.php
- Enable the extension
sockets
(for autocompletion of tasks in the dialog)- Edit
C:/my/php/path/php.ini
(create there if not existent) to load the extension (it is part of the prebuilt PHP version) - Make sure to have this two lines in it (i.e. remove
;
in front of each)
extension_dir = "ext" extension = "php_sockets.dll"
- Edit
- Create runner for background job
- To hide the running process a program has to be self-compiled. The source can be found at TTTd.c.
- Change the command in the
TTTd.c
and provide the correct paths (seeCHANGE BELOW
in code). - Install a compiler like http://www.mingw.org/ and run
gcc TTTd.c -o TTTd.exe
to compile. - Running
TTTd.exe
will start a hidden process running the background job. - Place
TTTd.exe
in the autostart directory- Press
Windows + R
fillshell:startup
into the window and copyTTTd.exe
in the folder. - Or directly copy into
%AppData%\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- Press
- Add
ttt
alias to~/macros.doskey
which runsC:/my/php/path/php.exe C:/Users/<me>/TaskTimeTerminate/cli.php