diff --git a/README.md b/README.md new file mode 100644 index 0000000..a53bd8c --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Deskmeter + +Deskmeter is a productivity tool to measure how much time you spend doing stuff in your computer. +More precisely how much time passes while a given workspace is active. + +## Requirements + +- MongoDB +- wmctrl +- Flask + +install those first, also wmctrl doesn't work on wayland, until an equivalent is found. you have to switch to XORG. + +## Define Workspace Labels + +edit the desktops variable in `dmmain.py` to your needs, first is workspace 1, second 2 and so on + +## How to run + +leave the dmmain.py running in the background, use the dmapp flask application to see the data. +the homepage shows current day result, +`/calendar` shows the current month with week totals +`/calendar/` shows the select month of current year with week totals +`/calendar/` shows the select month of current year with week totals + +adapt `deskmeter.sh` and `dmapp.sh` to your needs. I put those in my home directory. Add starting the mongo service \ No newline at end of file diff --git a/deskmeter.sh b/deskmeter.sh new file mode 100644 index 0000000..ba44a4b --- /dev/null +++ b/deskmeter.sh @@ -0,0 +1,4 @@ +sudo systemctl start mongod.service +. ~/mdir/venvs/deskmeter/bin/activate +cd ~/mdir/deskmeter +python3 dmmain.py \ No newline at end of file diff --git a/dmweb.sh b/dmweb.sh new file mode 100644 index 0000000..48bc1e2 --- /dev/null +++ b/dmweb.sh @@ -0,0 +1,4 @@ +sudo systemctl start mongod.service +. ~/mdir/venvs/deskmeter/bin/activate +cd ~/mdir/deskmeter/dmapp +python3 run.py \ No newline at end of file diff --git a/notes.md b/notes.md index 1238767..566a26b 100644 --- a/notes.md +++ b/notes.md @@ -1 +1,2 @@ -check weird thing of not showing the desktop where you start the dmmain script unless you move the window around \ No newline at end of file +check weird thing of not showing the workspace where you start the dmmain script unless you move the window around +solve the bug of falsely counting the workspace you are on, because it counts from the last switch (once you switch it shows correctly) \ No newline at end of file