Index: ADME.md
===================================================================
--- README.md	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,206 +1,0 @@
-# Flowtimer
-
-Flowtimer is a customizable Pomodoro timer designed to enhance productivity by breaking work into intervals, typically 25 minutes long, separated by short breaks. It allows you to configure your work and break sessions through a JSON file and includes predefined phases of activity to help you stay focused.
-
-## Features
-
-- **Configurable Sessions:** Define your own work, short break, and long break durations through a JSON file.
-- **Predefined Phases:** Start with standard Pomodoro phases or create your own.
-- **Progress Tracking:** Visual feedback on time remaining for each phase.
-- **Customizable Cycle:** Choose how many work sessions you want before taking a longer break.
-
-## Getting Started
-
-### Prerequisites
-
-Ensure you have the following installed on your machine:
-
-- Python 3.x
-
-### Test without install
-   ```bash
-   git clone --branch guix https://gitlab.kid.local:/legacy/flowtimer.git
-   cd flowtimer
-
-   guix shell python python:tk python-pillow --
-   export PYTHONPATH=$PYTHONPATH:./
-   python3 flowtimer/main.py
-   ```
-
-### Installation
-
-1. Clone the repository:
-   ```bash
-    git clone --branch guix https://gitlab.kid.local:/legacy/flowtimer.git
-	cd flowtimer
-   ```
-2. Install the app and required dependencies
-   ```bash
-	pip3 install .
-
-   ```
-### Usage
-
-1. **Create or Modify Configuration:**
-
-   Flowtimer reads its configuration from a JSON file.
-   
-   Example `default.json`:
-
-```json
-{
-  "title": "Default",
-  "blocks": [
-    {
-      "type": "Phase",
-      "title": "MorningHuddle",
-      "initial_ticks": 900
-    },
-    {
-      "type": "Sequence",
-      "title": "AM",
-      "sequence": [
-        {
-          "title": "Tasking",
-          "initial_ticks": 120
-        },
-        {
-          "title": "Working",
-          "initial_ticks": 5400
-        },
-        {
-          "title": "Syncing",
-          "initial_ticks": 300
-        },
-        {
-          "title": "Break",
-          "initial_ticks": 600
-        }
-      ],
-      "initial_repetitions": 2
-    },
-    {
-      "type": "Phase",
-      "title": "Lunch",
-      "initial_ticks": 2700
-    },
-    {
-      "type": "Sequence",
-      "title": "PM",
-      "sequence": [
-        {
-          "title": "Tasking",
-          "initial_ticks": 120
-        },
-        {
-          "title": "Working",
-          "initial_ticks": 5400
-        },
-        {
-          "title": "Syncing",
-          "initial_ticks": 600
-        },
-        {
-          "title": "Break",
-          "initial_ticks": 600
-        }
-      ],
-      "initial_repetitions": 2
-    }
-  ]
-}
-```
-
-This configuration represents a standard schedule named 'default':
-
-It starts with a 15 min (900s) morning huddle, followed by a sequence 'AM' consisting of 'Tasking', 'Working', 'Syncing', that is repeated twice.
-    
-After a 45 min lunch break, another sequence 'PM' follows, that is repeated twice as well.
-
-Color schemes can be configured as follows. Use the phase title as title for each color scheme to match them.
-
-
-```json
-{
-    "color_schemes": [
-	{
-	    "title": "Completed",
-	    "widget": "red",
-	    "sequence_label": "red",
-	    "center_frame": "red"
-	},
-	{
-	    "title": "Huddle",
-	    "widget": "blue",
-	    "sequence_label": "red",
-	    "center_frame": "yellow"
-	},
-	{
-	    "title": "Tasking",
-	    "widget": "red",
-	    "sequence_label": "yellow",
-	    "center_frame": "blue"
-	},
-	{
-	    "title": "Work",
-	    "widget": "yellow",
-	    "sequence_label": "blue",
-	    "center_frame": "red"
-	},
-	{
-	    "title": "Break",
-	    "widget": "green",
-	    "sequence_label": "brown",
-	    "center_frame": "white"
-	},
-	{
-	    "title": "Start",
-	    "widget": "white",
-	    "sequence_label": "green",
-	    "center_frame": "brown"
-	},
-	{
-	    "title": "Default",
-	    "widget": "pink",
-	    "sequence_label": "orange",
-	    "center_frame": "violet"
-	}
-    ]
-}
-```
-
-2. **Run Flowtimer:**
-   ```bash
-   python3 flowtimer.py --start --config /path/to/config_file.json
-   ```
-
-   This will start the timer based on the phases and durations specified in the JSON file.
-
-3. **Adjusting Configuration:**
-   To change the timings or the order of phases, simply edit the JSON file and rerun the script.
-
-
-### Command-line Options
-
-- `--config <file>`: Specify a custom JSON configuration file.
-- `--colors`: Specify a JSON color scheme configuration file.
-- `--start`: Autostart the timer with the current configuration.
-### Example
-
-```bash
-python3 flowtimer.py --config myschedule.json --colors mycolorscheme.json
-```
-
-This command will start Flowtimer with a custom configuration provided in `myschedule.json` using color scheme from mycolorscheme.json.
-
-## Contributing
-
-Contributions are welcome! Please submit a pull request or open an issue to discuss any changes or improvements.
-
-## License
-
-Flowtimer is open-source software licensed under the [MIT License](LICENSE).
-
-## Acknowledgments
-
-Special thanks to the Pomodoro Technique® for inspiring this tool.
Index: owtimer/Phase.py
===================================================================
--- flowtimer/Phase.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,96 +1,0 @@
-import json
-
-
-class Phase:
-
-    """
-    This class is a representation of a single phase inside a timer
-    """
-
-    @classmethod
-    def default(cls):
-        return cls('Default', 30)
-
-    def __init__(self, title, ticks):
-        """
-        creates the variables associated with that class
-
-        :type title: string
-        :param title: Name of phase
-
-        :type ticks: int
-        :param ticks: ticks in seconds
-        """
-
-        self.title = title
-        self.initial_ticks = ticks
-        self._state = "initial"
-        self._ticks_left = ticks
-
-    @property
-    def initial_repetitions(self):
-        return 1
-
-    @property
-    def state(self):
-        return self._state
-
-    @property
-    def ticks_left(self):
-        return self._ticks_left
-
-    def to_json(self):
-        return json.dumps({"title": self.title, "initial_ticks": self.initial_ticks})
-
-    def __str__(self):
-        """
-        Human readable representation of all attributes
-
-        :return: human readable representation of all attributes
-        :rtype: String
-        """
-
-        return ("Title:" + self.title + "\nTicks left=" +
-                str(self._ticks_left) + "\n" + str(self._state) + "\n")
-
-    def is_sequence(self):
-        return False
-
-    def abort(self):
-        self._state = "aborted"
-
-    def is_aborted(self):
-        return self.state == "aborted"
-
-    def start(self):
-        self._state = "running"
-
-    def reset(self):
-        self._ticks_left = self.initial_ticks
-        self._state = "initial"
-
-    def pause(self):
-        self._state = "paused"
-
-    def is_running(self):
-        return self._state == "running"
-
-    def is_terminated(self):
-        return (self.is_completed() or self.is_aborted())
-
-    def is_completed(self):
-        return self.ticks_left < 1
-
-    def is_paused(self):
-        return self._state == "paused"
-
-    def tick(self, ticks):
-        self.start()
-        result = self._ticks_left - ticks
-
-        if result < 1:
-            self._ticks_left = 0
-            self._state = "completed"
-        else:
-            self._ticks_left = result
-        return result
Index: owtimer/RecurringPhaseSequence.py
===================================================================
--- flowtimer/RecurringPhaseSequence.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,145 +1,0 @@
-import json
-from copy import deepcopy
-from flowtimer.Phase import Phase
-
-
-class RecurringPhaseSequence:
-
-    @classmethod
-    def from_json(cls, a_json_string):
-        def custom_object_hook(d):
-            if 'title' in d and 'initial_ticks' in d:
-                return Phase(d['title'], d['initial_ticks'])
-            if 'phases' in d and 'initial_repetitions' in d:
-                return RecurringPhaseSequence(d["title"], d['phases'], d['initial_repetitions'])
-            print("Wrong format")
-            return d
-        return json.loads(a_json_string, object_hook=custom_object_hook)
-
-    @classmethod
-    def default_json_string(cls):
-        return json.dumps({"title": "default",
-                           "phases": [{"title": "Tasking", "initial_ticks": 5},
-                                      {"title": "Work", "initial_ticks": 45},
-                                      {"title": "Break", "initial_ticks": 15}],
-                           "initial_repetitions": 3})
-
-    @classmethod
-    def default(cls):
-        return cls.from_json(cls.default_json_string())
-
-    def __init__(self, title, phases, repetitions):
-        assert repetitions > 0
-        assert phases is not []
-        self._title = title
-        self._state = "initial"
-        self.phases = phases
-        self.current_phase = phases[0]
-        self.initial_repetitions = repetitions
-        self.passes_left = repetitions - 1
-
-    def to_json(self):
-        return json.dumps(self.__dict__, default=lambda each: each.to_json())
-
-    @property
-    def title(self):
-        return self._title
-
-    def __str__(self):
-        return ("Sequence title:" + self.title + "\n" + str(self.current_phase))
-
-    def is_sequence(self):
-        return True
-
-    def current_phase_number(self):
-        return self.phases.index(self.current_phase)
-
-    def phases_left_in_pass(self):
-        return len(self.upcoming_phases_in_pass())
-
-    def upcoming_phases_in_pass(self):
-        if self.current_phase_number() < len(self.phases) - 1:
-            return self.phases[self.current_phase_number()+1:]
-        return []
-
-    @property
-    def initial_ticks(self):
-        return sum([each.initial_ticks for each in self.phases])
-
-    @property
-    def ticks_left(self):
-        return (
-            (self.passes_left) * sum([each.initial_ticks for each in self.phases]) +
-            self.current_phase.ticks_left +
-            sum([each.ticks_left for each in self.upcoming_phases_in_pass()]))
-
-    def state(self):
-        if self.is_completed():
-            return "completed"
-        return self._state
-
-    def is_final_round(self):
-        return self.passes_left == 0
-
-    def is_completed(self):
-        return ((self.passes_left < 1) and
-                (not self.upcoming_phases_in_pass() and
-                 self.current_phase.is_completed()))
-
-    def is_terminated(self):
-        return (self.is_aborted() or self.is_completed())
-
-    def is_aborted(self):
-        return self._state == 'aborted'
-
-    def abort(self):
-        self.current_phase.abort()
-        self._state = "aborted"
-
-    def start(self):
-        self._state = "running"
-
-    def skip(self):
-        if self.upcoming_phases_in_pass():
-            self.current_phase.reset()
-            self.current_phase = self.upcoming_phases_in_pass()[0]
-            return
-        else:
-            if self.is_final_round():
-                self.abort()
-                return
-            else:
-                self.passes_left -= 1
-                self.current_phase.reset()
-                self.current_phase = self.phases[0]
-
-    def advance_to_next_phase(self):
-        current_index = self.current_phase_number()
-        if current_index < len(self.phases) - 1:
-            # Move to the next phase in the sequence
-            self.current_phase.reset()
-            self.current_phase = self.phases[current_index + 1]
-            # self.current_phase.start()
-        else:
-            # Completed a full sequence; check if more repetitions are needed
-            self.passes_left -= 1
-            if self.passes_left < 1:
-                self._state = "completed"
-            else:
-                self.current_phase.reset()
-                self.current_phase = self.phases[0]  # Reset to the first phase
-                # self.current_phase.start()
-
-    def tick(self, ticks):
-        if not self.is_completed():
-            result = self.current_phase.tick(ticks)
-            if self.current_phase.is_completed():
-                self.advance_to_next_phase()
-                result = self.tick(abs(result))
-                return result
-            return result
-        else:
-            return 0
-
-    def unrolled(self):
-        return [deepcopy(seq) for seq in [each for each in self.initial_repetitions * self.phases]]
Index: owtimer/Schedule.py
===================================================================
--- flowtimer/Schedule.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,180 +1,0 @@
-import json
-from flowtimer.Phase import Phase
-from flowtimer.RecurringPhaseSequence import RecurringPhaseSequence
-
-"""
-I represent a Schedule consisting of blocks. Blocks can be a single phase or
-a sequence of phases.
-There are 6 states a Schedule can be in: initial, running, completed, aborted, paused, terminated.
-"""
-
-
-class Schedule:
-
-    def __init__(self, title, blocks):
-        assert blocks is not []
-        self.title = title
-        self.blocks = blocks
-        self.current_block = blocks[0]
-        self._state = "initial"
-
-    @classmethod
-    def default_json_string(cls):
-        return json.dumps(
-            {"title": "Default",
-                "blocks": [
-                    {"type": "Phase",
-                     "title": "MorningHuddle",
-                     "initial_ticks": 900
-                     },
-                    {"type": "Sequence",
-                     "title": "AM",
-                     "sequence": [
-                         {
-                             "title": "Tasking",
-                             "initial_ticks": 120
-                         },
-                         {
-                             "title": "Working",
-                             "initial_ticks": 5400
-                         },
-                         {
-                             "title": "Syncing",
-                             "initial_ticks": 300
-                         },
-                         {
-                             "title": "Break",
-                             "initial_ticks": 600
-                         }
-                     ],
-                     "initial_repetitions": 2
-                     }
-                ]
-             }
-        )
-
-    @classmethod
-    def from_json(cls, a_json_string):
-        def custom_object_hook(d):
-            if 'title' in d and 'blocks' in d:
-                return Schedule(d['title'], d['blocks'])
-            if 'title' in d and 'initial_ticks' in d:
-                return Phase(d['title'], d['initial_ticks'])
-            if 'sequence' in d and 'initial_repetitions' in d:
-                return RecurringPhaseSequence(d["title"], d['sequence'], d['initial_repetitions'])
-            print("Wrong format")
-            return d
-        return json.loads(a_json_string, object_hook=custom_object_hook)
-
-    @classmethod
-    def default(cls):
-        return cls.from_json(cls.default_json_string())
-
-    def to_json(self):
-        def serialize_block(block):
-            if not block.is_sequence():
-                return {"type": "Phase", "title": block.title, "initial_ticks": block.initial_ticks}
-            if block.is_sequence():
-                return {
-                    "type": "Sequence",
-                    "title": block.title,
-                    "sequence": [serialize_block(phase) for phase in block.phases],
-                    "initial_repetitions": block.initial_repetitions
-                }
-            raise TypeError(f"Unknown block type: {type(block)}")
-
-        return json.dumps({
-            "title": self.title,
-            "blocks": [serialize_block(block) for block in self.blocks]
-        })
-
-    def state(self):
-        if self.is_completed():
-            return "completed"
-        return self._state
-
-    def start(self):
-        self._state = "running"
-        self.current_block.start()
-
-    def pause(self):
-        self._state = "paused"
-
-    def is_initial(self):
-        return self._state == 'initial'
-
-    def is_running(self):
-        return self._state == "running"
-
-    def is_paused(self):
-        return self._state == "paused"
-
-    def abort(self):
-        self.current_block.abort()
-        self._state = "aborted"
-
-    def current_phase(self):
-        if self.current_block.is_sequence():
-            return self.current_block.current_phase
-        else:
-            return self.current_block
-
-    def current_block_is_final(self):
-        index = self.blocks.index(self.current_block)
-        return index == (len(self.blocks) - 1)
-
-    def is_completed(self):
-        if (self.current_block.is_completed()) and (self.current_block_is_final()):
-            return True
-        else:
-            return False
-
-    def is_aborted(self):
-        return self._state == "aborted"
-
-    def is_terminated(self):
-        return (self.is_aborted() or self.is_completed())
-
-    def advance_to_next_block(self):
-        """Helper method to move to the next block in the schedule."""
-        current_block_index = self.blocks.index(self.current_block)
-        if current_block_index < len(self.blocks) - 1:
-            self.current_block = self.blocks[current_block_index+1]
-
-    def skip(self):
-        if self.current_block.is_sequence():
-            self.current_block.skip()
-            if self.current_block.is_terminated():
-                if self.upcoming_blocks():
-                    self.current_block = self.upcoming_blocks()[0]
-                else:
-                    self.abort()
-            return
-        if self.current_block_is_final():
-            self.abort()
-            return
-        self.advance_to_next_block()
-        return
-
-    def total_ticks_left(self):
-        return (self.current_block.ticks_left +
-                sum([block.ticks_left for block in self.upcoming_blocks()]))
-
-    def upcoming_blocks_titles(self):
-        return [each.title for each in self.upcoming_blocks()]
-
-    def upcoming_blocks(self):
-        index = self.blocks.index(self.current_block)
-        if index < len(self.blocks):
-            return self.blocks[index+1:]
-        return []
-
-    def tick(self, ticks):
-        if not self.is_completed():
-            self.current_block.tick(ticks)
-            if self.current_block.is_completed():
-                if self.current_block_is_final():
-                    self._state = "completed"
-                else:
-                    self.skip()
-                    return True
Index: owtimer/__init__.py
===================================================================
--- flowtimer/__init__.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,25 +1,0 @@
-import logging
-import logging.config
-import os
-from pathlib import Path
-
-# FIXME: change the default log path to /var/log/flowtimer/flowtimer.log when system configuration created this dir
-# with the appropriate rights
-
-log_dir = Path(os.environ.get('FLOWTIMER_LOG_DIR', '/tmp/'))
-
-log_path = log_dir / 'flowtimer.log'
-
-if not log_path.exists():
-    try:
-        log_path.touch()
-    except PermissionError:
-        conf_file = Path(__file__).parent / 'flowtimer_logging.conf'
-        print("Conf file", conf_file)
-        logging.config.fileConfig(conf_file)
-else:
-    logging.basicConfig(filename=str(log_path), encoding='utf-8', level=logging.DEBUG)
-
-logger = logging.getLogger(__name__)
-
-logger.setLevel(os.environ.get('FLOWTIMER_LOG_LEVEL', logger.getEffectiveLevel()))
Index: owtimer/configs/colors.json
===================================================================
--- flowtimer/configs/colors.json	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,46 +1,0 @@
-{
-    "color_schemes": [
-	{
-	    "title": "Terminated",
-	    "widget": "red",
-	    "sequence_label": "red",
-	    "center_frame": "red"
-	},
-	{
-	    "title": "Huddle",
-	    "widget": "blue",
-	    "sequence_label": "red",
-	    "center_frame": "yellow"
-	},
-	{
-	    "title": "Tasking",
-	    "widget": "red",
-	    "sequence_label": "yellow",
-	    "center_frame": "blue"
-	},
-	{
-	    "title": "Work",
-	    "widget": "yellow",
-	    "sequence_label": "blue",
-	    "center_frame": "red"
-	},
-	{
-	    "title": "Break",
-	    "widget": "green",
-	    "sequence_label": "brown",
-	    "center_frame": "white"
-	},
-	{
-	    "title": "Initial",
-	    "widget": "white",
-	    "sequence_label": "green",
-	    "center_frame": "brown"
-	},
-	{
-	    "title": "Default",
-	    "widget": "pink",
-	    "sequence_label": "orange",
-	    "center_frame": "violet"
-	}
-    ]
-}
Index: owtimer/configs/default.json
===================================================================
--- flowtimer/configs/default.json	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,56 +1,0 @@
-{ "title": "Default",
-  "blocks": [
-      {"type": "Phase",
-       "title": "MorningHuddle",
-       "initial_ticks": 900
-      },
-      {"type": "Sequence",
-       "title": "AM",
-       "sequence": [
-	   {
-	       "title": "Tasking",
-	       "initial_ticks": 120
-	   },
-	   {
-	       "title": "Working",
-	       "initial_ticks": 5400
-	   },
-	   {
-	       "title": "Syncing",
-	       "initial_ticks": 300
-	   },
-	   {
-	       "title": "Break",
-	       "initial_ticks": 600
-	   }
-       ],
-       "initial_repetitions": 2
-      },
-      {"type": "Phase",
-       "title": "Lunch",
-       "initial_ticks": 2700
-      },
-      {"type": "Sequence",
-       "title": "PM",
-       "sequence": [
-	   {
-	       "title": "Tasking",
-	       "initial_ticks": 120
-	   },
-	   {
-	       "title": "Working",
-	       "initial_ticks": 5400
-	   },
-	   {
-	       "title": "Syncing",
-	       "initial_ticks": 600
-	   },
-	   {
-	       "title": "Break",
-	       "initial_ticks": 600
-	   }
-       ],
-       "initial_repetitions": 2
-      }
-  ]
-}
Index: owtimer/configs/small.json
===================================================================
--- flowtimer/configs/small.json	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,29 +1,0 @@
-{ "title": "Small",
-  "blocks": [
-      {"type": "Phase",
-       "title": "MorningHuddle",
-       "initial_ticks": 60
-      },
-      {"type": "Sequence",
-       "title": "AM",
-       "sequence": [
-	   {
-	       "title": "Tasking",
-	       "initial_ticks": 60
-	   },
-	   {
-	       "title": "Working",
-	       "initial_ticks": 60
-	   },
-	   {
-	       "title": "Syncing",
-	       "initial_ticks": 60
-	   },
-	   {
-	       "title": "Break",
-	       "initial_ticks": 60
-	   }
-       ],
-       "initial_repetitions": 1
-      }  ]
-}
Index: owtimer/flowtimer_logging.conf
===================================================================
--- flowtimer/flowtimer_logging.conf	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,21 +1,0 @@
-[loggers]
-keys=root
-
-[handlers]
-keys=stream_handler
-
-[formatters]
-keys=formatter
-
-[logger_root]
-level=DEBUG
-handlers=stream_handler
-
-[handler_stream_handler]
-class=StreamHandler
-level=DEBUG
-formatter=formatter
-args=(sys.stderr,)
-
-[formatter_formatter]
-format=%(asctime)s %(name)-12s %(levelname)-8s %(message)s
Index: owtimer/main.py
===================================================================
--- flowtimer/main.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,240 +1,0 @@
-import tkinter as tk
-import tkinter.ttk as ttk
-from tkinter import filedialog, messagebox
-from PIL import Image, ImageTk
-from pathlib import Path
-import argparse
-import json
-from Schedule import Schedule
-
-
-class TimerApp(tk.Frame):
-
-    def __init__(self, parent, tick_speed, config_file, color_file, autostart):
-
-        super().__init__(parent)
-        self.parent = parent
-        self.tick_speed = tick_speed
-        self.photo = ImageTk.PhotoImage(file=Path(__file__).parent /
-                                        'resources' / 'flowtimer_startbg_new.png')
-        print("Config:", config_file)
-        self.schedule = self.load_config(config_file)
-        self.color_scheme = self.load_color_file(color_file)
-        self.build_gui()
-        if autostart:
-            self.toggle_play_pause()
-
-    def build_gui(self):
-
-        s = ttk.Style()
-        s.theme_use('clam')
-        s.configure("orange.Horizontal.TProgressbar", troughcolor='ivory3',
-                    bordercolor='black', background='CadetBlue1',
-                    lightcolor='white', darkcolor='black')
-
-        self.headline_frame = tk.Frame(self.parent, bg='white')
-        self.headline_frame.pack(side='top', fill='both', expand=False)
-        self.center_frame = tk.Frame(self.parent, bg='black')
-        self.center_frame.pack(side='top', fill='both', expand=True)
-        self.button_frame = tk.Frame(root)
-        self.button_frame.pack(side='bottom', fill='both', expand=False)
-
-        # self.label_headline = tk.Label(self.headline_frame,
-        #                                text=(self.schedule.current_block.title),
-        #                                bg='white', fg='grey', font="serif 20")
-        # self.label_headline.pack(side='left', fill='both', expand=True)
-
-        self.label_config = tk.LabelFrame(self.headline_frame,
-                                          text=f"config: {self.schedule.title}",
-                                          bg='white', font="serif 12")
-        self.label_config.pack(side='right', fill='both', expand=False,
-                               ipadx=20, padx=20, pady=10)
-
-        self.config_button = tk.Button(self.headline_frame, text="change config",
-                                       font="courier 14", width=20, command=self.select_config)
-        self.config_button.pack(side='right', padx=10, pady=10, expand=False)
-
-        self.label_config_text = tk.Label(self.label_config, text=self.current_config(),
-                                          bg='white', font="serif 10", justify='right')
-        self.label_config_text.pack()
-
-        self.label_start = tk.Label(self.center_frame, image=self.photo, bg='black')
-        self.label_start.pack(side='left', fill='both', expand=True)
-
-        self.label_sequence = tk.Label(self.center_frame, bg='red')
-        self.label_sequence.pack(side='top', fill='both', expand=True)
-
-        self.progressbar = ttk.Progressbar(self.center_frame,
-                                           style="orange.Horizontal.TProgressbar",
-                                           orient="horizontal", length=600, mode="determinate")
-        self.progressbar["maximum"] = 59
-        self.progressbar.pack(side='top', ipady=30)
-        self.label_duration = tk.Label(self.center_frame, bg='green')
-        self.label_duration.pack(side='top', fill='both', expand=True)
-
-        self.freeze_button = tk.Button(self.button_frame, text="PLAY/PAUSE",
-                                       font="courier 14", width=20, command=self.toggle_play_pause)
-        self.freeze_button.pack(side='left', fill='both', ipady=20, expand=True)
-
-        self.skip_button = tk.Button(self.button_frame, text=("SKIP"),
-                                     font="courier 14", width=20, command=self.skip)
-        self.skip_button.pack(side='left', fill='both', ipady=20, expand=True)
-
-        self.quit_button = tk.Button(self.button_frame, text="QUIT",
-                                     font="courier 14", width=20, command=self.quit_app)
-        self.quit_button.pack(side='left', fill='both', ipady=20, expand=True)
-
-        self.parent.resizable(False, False)
-
-    def ticks_left_in_phase(self):
-        if self.schedule.current_block.is_sequence():
-            return self.schedule.current_block.current_phase.ticks_left
-        else:
-            return self.schedule.current_block.ticks_left
-
-    def default_colors(self):
-        return next((d for d in self.color_scheme if d.get('title') == 'Default'))
-
-    def colors_for_phase(self, a_title):
-        return next((d for d in self.color_scheme if d.get('title') == a_title), self.default_colors())
-
-    def current_title(self):
-        if self.schedule.current_block.is_sequence():
-            return self.schedule.current_block.current_phase.title
-        else:
-            return self.schedule.current_block.title
-
-    def current_config(self):
-        if self.schedule.current_block.is_sequence():
-            return (f"{self.schedule.current_block.title} / "
-                    f"{self.schedule.current_block.current_phase.title} / "
-                    f"{self.schedule.current_block.current_phase_number()+1} of "
-                    f"{len(self.schedule.current_block.phases)} "
-                    f"({self.schedule.current_block.passes_left})")
-        return (f"{self.schedule.current_block.title}")
-
-    def current_time_status(self):
-        if self.ticks_left_in_phase() < 60:
-            return f"{self.ticks_left_in_phase()} seconds left in phase {self.current_title()}"
-        else:
-            return f"{(self.ticks_left_in_phase() // 60)} min left in phase {self.current_title()}"
-
-    # FIXME: This logic looks like shit. Refactor it!!!
-    def tick(self):
-        current_process = self.after(1000, self.tick)
-        if self.schedule.is_terminated():
-            self.label_sequence.config(text="Time over !", font='times 22',
-                                       bg=self.colors_for_phase("Terminated").get('sequence_label'),
-                                       fg="white")
-            self.label_duration.config(text="",
-                                       bg=self.colors_for_phase("Terminated").get('duration_label'),
-                                       fg="white")
-            self.progressbar.pack_forget()
-            self.center_frame.configure(bg=self.colors_for_phase("Terminated").get('center_frame'))
-            self.after_cancel(current_process)
-            self.skip_button['state'] = 'disabled'
-            self.skip_button.config(fg="ivory3")
-            self.freeze_button['state'] = 'disabled'
-            self.freeze_button.config(fg="ivory3")
-            return
-        if self.schedule.is_running():
-            self.schedule.tick(1*self.tick_speed)
-            self.progressbar["value"] = (self.schedule.current_block.initial_ticks -
-                                         self.schedule.current_block.ticks_left) % 60
-            self.progressbar.update()
-            colors = self.colors_for_phase(self.schedule.current_phase().title)
-            self.label_sequence.config(text=str(self.schedule.upcoming_blocks_titles()),
-                                       font='times 22', bg=colors.get('sequence_label'),
-                                       fg="white")
-            self.label_duration.config(text=self.current_time_status(), font='times 22',
-                                       bg=colors.get('widget'),
-                                       fg="white")
-            self.center_frame.configure(bg=colors.get('center_frame'))
-
-            self.label_config_text.config(text=self.current_config())
-
-    def skip(self):
-        self.schedule.skip()
-
-    def toggle_play_pause(self):
-        if self.schedule.is_initial():
-            self.label_start.pack_forget()
-            self.schedule.start()
-            self.tick()
-            return
-        if not self.schedule.is_running():
-            self.freeze_button.config(relief="raised", fg='black')
-            self.label_sequence.config(fg="white")
-            self.label_duration.config(fg="white")
-            self.schedule.start()
-            self.tick()
-        else:
-            self.schedule.pause()
-            self.freeze_button.config(relief="sunken", fg="red")
-            self.label_sequence.config(text=("timer paused !"), fg="red", bg="black",
-                                       font='times 72')
-            self.label_duration.config(text="", bg="black")
-            self.center_frame.config(bg="black")
-
-    def quit_app(self):
-        self.parent.destroy()
-
-    def load_color_file(self, file_name=Path(__file__).parent / 'configs' / 'colors.json'):
-        try:
-            with open(file_name) as color_file:
-                colors = json.loads(color_file.read())
-        except Exception as e:
-            with open(Path(__file__).parent / 'configs' / 'colors.json') as color_file:
-                colors = json.loads(color_file.read())
-            print(e)
-        return colors.get('color_schemes', [])
-
-    def change_config(self, json_string):
-        self.schedule = Schedule.from_json(json_string)
-        return self.schedule
-
-    def load_config(self, file_name=Path(__file__).parent / 'configs' / 'default.json'):
-        try:
-            with open(file_name) as config_file:
-                schedule = self.change_config(config_file.read())
-        except Exception as e:
-            messagebox.showerror('Config error',
-                                 f'Can not load {file_name}\n\nDefault loaded instead')
-            print(e)
-            return Schedule.default()
-        return schedule
-
-    def select_config(self):
-        self.config_files = [("all files", "*.json")]
-        self.answer = filedialog.askopenfilename(parent=root,
-                                                 initialdir=Path(__file__).parent / 'configs',
-                                                 title="Please choose a config file:",
-                                                 filetypes=self.config_files)
-        self.load_config(Path(self.answer))
-
-
-parser = argparse.ArgumentParser(description="Load specified config file and autostart if needed")
-parser.add_argument('--start', dest='autostart', action='store_true', default=False,
-                    required=False, help='use --start to autostart the timer with the given config')
-parser.add_argument('--config', dest='config_file', required=False,
-                    default=Path(__file__).parent / 'configs' / 'default.json',
-                    help='use --config /path/to/config_file.json to specify the configuration of the timer')
-parser.add_argument('--colors', dest='color_file', required=False,
-                    default=Path(__file__).parent / 'configs' / 'colors.json')
-args = parser.parse_args()
-
-root = tk.Tk()
-root.title(args.config_file)
-root.geometry("1280x860")
-root.config(bg='black')
-root.iconphoto(False, ImageTk.PhotoImage(Image.open(Path(__file__).parent /
-                                                    'resources' /
-                                                    'icon_bombtimer.png')))
-
-app = TimerApp(root,
-               tick_speed=1,
-               config_file=args.config_file,
-               color_file=args.color_file,
-               autostart=args.autostart)
-
-app.mainloop()
Index: owtimer/resources/default_config.csv
===================================================================
--- flowtimer/resources/default_config.csv	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,9 +1,0 @@
-Titel,Values
-
-B-Phase,1
-
-I-Phase,2
-
-S-Phase,1
-
-Repeats,4
Index: ix.scm
===================================================================
--- guix.scm	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,20 +1,0 @@
-(use-modules
-  (guix)
-  (guix build-system pyproject)
-  ((guix licenses) #:prefix license:)
-  (gnu packages python-xyz)
-)
-
-(setenv "PYTHONPATH" (string-append (getenv "GUIX_PYTHONPATH") ":" (getcwd)))
-
-(package
-  (name "flowtimer")
-  (version "1.0.1")
-  (source (local-file "." #:recursive? #t))
-  (build-system pyproject-build-system)
-  (propagated-inputs
-    (list python-pillow))
-  (synopsis "tbd")
-  (description "tbd")
-  (home-page "https://kokyou.org:8080")
-  (license license:expat))
Index: project.toml
===================================================================
--- pyproject.toml	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,26 +1,0 @@
-[build-system]
-requires = ["poetry-core>=1.0.7"]
-build-backend = "poetry.core.masonry.api"
-
-[tool.poetry]
-name = "flowtimer"
-version = "0.0.1"
-description = "A package to time work slices"
-authors = ["See Contributors"]
-homepage = "https://kokyou.org:8080/playground/browser/flowtimer"
-repository = "https://kokyou.org:/srv/git/flowtimer.git"
-license = "MIT"
-readme = "README.md"
-packages = [
-    { include = "flowtimer" }
-]
-
-include = [
-    {path = 'tests/*.py'},
-    {path = 'flowtimer_logger.conf'}
-]
-[tool.poetry.scripts]
-flowtimer = 'flowtimer.main:main'
-
-[tool.poetry.dependencies] 
-pillow  = "~9.2.0" 
Index: scripts/Phase.py
===================================================================
--- scripts/Phase.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/Phase.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,67 @@
+class Phase:
+
+    """
+
+    This class is a representation of a single phase inside a timer
+
+    """
+
+    def __init__(self, title, duration):
+
+        """
+
+        creates the variables associated with that class
+
+        :type title: string
+        :param title: Name of phase
+
+        :type duration: int
+        :param duration: Duration in seconds
+
+        """
+
+        self.title = title
+        self.duration = duration
+        self.state = "initial"
+        self.time_left = self.duration
+
+
+    def __str__(self):
+
+        """
+
+        Human readable representation of all attributes
+
+        :return: human readable representation of all attributes
+        :rtype: String
+
+        """
+
+        return ("-->" + self.title + "\nDuration=" +
+                str(self.duration) + "\n")
+
+    def abort(self):
+        self.state = "finished"
+
+    def start(self):
+        self.state = "running"
+
+    def pause(self):
+        self.state = "paused"
+
+    def running(self):
+        return self.state == "running"
+        # return self.time_left > 0
+
+    def finished(self):
+        return self.state == "finished"
+
+    def paused(self):
+        return self.state == "paused"
+
+    def tick(self, duration):
+        self.time_left -= duration
+
+        if self.time_left <= 0:
+            self.time_left = 0
+            self.state = "finished"
Index: scripts/Schedule.py
===================================================================
--- scripts/Schedule.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/Schedule.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,53 @@
+class Schedule:
+
+    def __init__(self, phase_list):
+        self.progressbar = None
+        self.currentValue = 0
+        self.phase_list = phase_list
+        self.current_phase = phase_list[0]
+        self.state = "initial"
+
+    def start(self):
+        self.state = "running"
+        self.current_phase.start()
+
+    def pause(self):
+        self.state = "paused"
+
+    def running(self):
+        return self.state == "running"
+
+    def is_paused(self):
+        return self.state == "paused"
+
+    def abort(self):
+        self.current_phase.abort()
+        self.state = "finished"
+
+    def finished(self):
+        if (self.current_phase.finished()) and (self.phase_list[-1] == self.current_phase):
+            self.state = "finished"
+            return True
+        else:
+            return False
+
+    def skip(self):
+        if self.current_phase_is_final():
+            self.abort()
+        else:
+            index = self.phase_list.index(self.current_phase)
+            self.current_phase = self.phase_list[index+1]
+
+    def current_phase_is_final(self):
+        index = self.phase_list.index(self.current_phase)
+        return index == (len(self.phase_list) - 1)
+
+    def tick(self, duration):
+        if not self.finished():
+            self.current_phase.tick(duration)
+            if self.current_phase.finished():
+                if self.current_phase_is_final():
+                    self.abort()
+                else:
+                    self.skip()
+                    return True
Index: scripts/configs/HIA_friday.csv
===================================================================
--- scripts/configs/HIA_friday.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/configs/HIA_friday.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,5 @@
+Titel,Values
+B-Phase,5
+I-Phase,8
+S-Phase,10
+Repeats,3
Index: scripts/configs/HIA_monday-thursday.csv
===================================================================
--- scripts/configs/HIA_monday-thursday.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/configs/HIA_monday-thursday.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,5 @@
+Titel,Values
+B-Phase,1
+I-Phase,2
+S-Phase,1
+Repeats,4
Index: scripts/configs/new_config.csv
===================================================================
--- scripts/configs/new_config.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/configs/new_config.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,5 @@
+Titel,Values
+B-Phase,2
+I-Phase,1
+S-Phase,2
+Repeats,2
Index: scripts/default_config.csv
===================================================================
--- scripts/default_config.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/default_config.csv	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,9 @@
+Titel,Values
+
+B-Phase,1
+
+I-Phase,2
+
+S-Phase,1
+
+Repeats,4
Index: scripts/timer.py
===================================================================
--- scripts/timer.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/timer.py	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,279 @@
+import tkinter as tk
+import tkinter.ttk as ttk
+from tkinter import filedialog
+from Schedule import Schedule
+from Phase import Phase
+from PIL import Image, ImageTk
+from copy import copy
+import pandas as pd
+import os
+import math
+import datetime
+
+now = datetime.datetime.now()
+date = now.strftime("%m/%d/%Y")
+time = now.strftime("%H:%M:%S")
+
+
+class TimerApp(tk.Frame):
+    
+    def __init__(self, parent):
+        
+        super().__init__(parent)
+        self.parent = parent
+        self.count = 0
+        self.currentValue = 0
+        self.default_config = pd.read_csv("default_config.csv", sep=',', header=0,
+                         names=('Titel', 'Values'), index_col=False, keep_default_na=False)
+        self.photo = ImageTk.PhotoImage(file='flowtimer_startbg_new.png')
+        self.show_config = pd.read_csv("default_config.csv", usecols=[0, 1])
+        self.config_state = 'default'
+
+        self.build_gui()
+
+    def build_gui(self):
+
+        s = ttk.Style()
+        s.theme_use('clam')
+        s.configure("orange.Horizontal.TProgressbar", troughcolor='ivory3', bordercolor='black', background='CadetBlue1', lightcolor='white', darkcolor='black')
+
+        self.headline_frame = tk.Frame(self.parent, bg='white')
+        self.headline_frame.pack(side='top', fill='both', expand=False)
+        self.center_frame = tk.Frame(self.parent, bg='black')
+        self.center_frame.pack(side='top', fill='both', expand=True)
+        self.button_frame = tk.Frame(root)
+        self.button_frame.pack(side='bottom', fill='both', expand=False)
+
+        self.label_headline = tk.Label(self.headline_frame, text=("Hochintensive Intervallarbeit"), bg='white', fg='grey', font="serif 20")
+        self.label_headline.pack(side='left', fill='both', expand=True)
+
+        self.label_config = tk.LabelFrame(self.headline_frame, text="config: ", bg='white', font="serif 12")
+        self.label_config.pack(side='right', fill='both', expand=False, ipadx=20, padx=20, pady=10)
+        
+        self.config_button = tk.Button(self.headline_frame, text="change config", font="courier 14", width=20, command=self.change_config)
+        self.config_button.pack(side='right', padx=10, pady=10, expand=False)
+
+        self.label_config_text = tk.Label(self.label_config, text=self.show_config, bg='white', font="serif 10", justify='right')
+        self.label_config_text.pack()
+
+        self.label_start = tk.Label(self.center_frame, image=self.photo, bg='black')
+        self.label_start.pack(side='left', fill='both', expand=True)
+
+        self.label_sequence = tk.Label(self.center_frame)
+        self.label_sequence.pack(side='top', fill='both', expand=True)
+        
+        self.progressbar = ttk.Progressbar(self.center_frame, style="orange.Horizontal.TProgressbar", orient="horizontal",length=600, mode="determinate")
+        self.progressbar.pack(side='top')
+
+        self.label_duration = tk.Label(self.center_frame)
+        self.label_duration.pack(side='top', fill='both', expand=True)
+        
+        self.start_timer_button = tk.Button(self.button_frame, text="START", font="courier 14", width=20, command=self.start)
+        self.start_timer_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.freeze_button = tk.Button(self.button_frame, text="PLAY/PAUSE", font="courier 14", width=20, command=self.toggle_tick)
+        self.freeze_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.skip_button = tk.Button(self.button_frame, text=("SKIP"), font="courier 14", width=20, command=self.skip)
+        self.skip_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.quit_button = tk.Button(self.button_frame, text="QUIT", font="courier 14", width=20, command=self.quit_app)
+        self.quit_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        df = self.default_config
+        repeat_of_phases = df['Values'][3]
+
+        phase_1 = Phase(title=df['Titel'][0], duration=df['Values'][0])
+        phase_2 = Phase(title=df['Titel'][1], duration=df['Values'][1])
+        phase_3 = Phase(title=df['Titel'][2], duration=df['Values'][2])
+
+        if repeat_of_phases == 1:
+            phase_list = [phase_1, phase_2, phase_3]
+
+        if repeat_of_phases == 2:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 3:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 4:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                          copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 5:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                          copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        self.repeats = repeat_of_phases
+
+        self.schedule = Schedule(phase_list)
+
+    def tick(self):
+        
+        if self.schedule.is_paused():
+            return
+        self.label_start.pack_forget()
+        current_process = self.after(1000, self.tick)
+        self.currentValue = self.currentValue + 1
+
+        if self.schedule.state == 'initial':
+            self.label_sequence.config(self.start_color(root))
+            self.label_sequence.config(text=("\n" + str(self.schedule.current_phase.title) + "..."))
+            self.label_duration.config(self.start_color(root))
+            self.label_duration.config(text=("noch " + str(math.ceil(self.schedule.current_phase.time_left)) + " Min\n"))
+            self.schedule.start()
+            self.schedule.tick(1)
+        else:
+            if self.schedule.running():
+                self.progress(self.currentValue)
+                self.progressbar.update()
+                self.label_sequence.configure(self.start_color(root))
+                self.center_frame.config(bg=self.start_color(root))
+                self.label_sequence.config(bg=self.random_color(self.label_sequence))
+                self.label_duration.config(self.random_color(root))
+                self.label_duration.config(text=("noch " + str(math.ceil(self.schedule.current_phase.time_left)) + " Min\n"), bg=self.random_color(self.label_duration))
+                if self.schedule.tick(1/60):
+                    self.round_counter()
+                    
+            else:
+                self.label_sequence.configure(self.time_out_color(root))
+                self.label_sequence.config(text=("\n" + "\nTime over !"), bg="red", fg="white")
+                self.label_duration.config(text="", bg="red", fg="white")
+                self.progressbar.pack_forget()
+                self.center_frame.configure(bg="red")
+                self.after_cancel(current_process)
+                self.skip_button['state'] = 'disabled'
+                self.skip_button.config(fg="ivory3")
+                self.freeze_button['state'] = 'disabled'
+                self.freeze_button.config(fg="ivory3")
+    
+    def start(self):
+        self.schedule.start()
+        self.tick()
+        self.start_timer_button['state'] = 'disabled'
+        self.start_timer_button.config(fg="ivory3")
+        self.config_button.pack_forget()
+        
+    def skip(self):
+        self.schedule.skip()
+        self.currentValue = 0
+        if self.schedule.state == "running":
+            self.round_counter()
+    
+    def toggle_tick(self):
+        if self.schedule.is_paused():
+            self.freeze_button.config(relief="raised", fg='black')
+            self.label_sequence.config(fg="white")
+            self.label_duration.config(fg="white")
+            self.schedule.start()
+            self.tick()
+        else:
+            self.schedule.pause()
+            self.freeze_button.config(relief="sunken", fg="red")
+            self.label_sequence.config(text=("\n" + "\n! timer paused !"), fg="red", bg="black")
+            self.label_duration.config(text="", bg="black")
+            self.center_frame.config(bg="black")
+
+    def quit_app(self):
+        self.parent.destroy()
+    
+    def random_color(self, widget):
+        if self.schedule.current_phase.title == "B-Phase":
+            widget.configure(bg="blue")
+            self.label_sequence.config(text=("\n" + "Besprechung"))
+            self.center_frame.configure(bg="blue")
+        if self.schedule.current_phase.title == "I-Phase":
+            widget.configure(bg="green")
+            self.label_sequence.config(text=("\n" + "Intensivphase"))
+            self.center_frame.configure(bg="green")
+        if self.schedule.current_phase.title == "S-Phase":
+            widget.configure(bg="gold")
+            self.label_sequence.config(text=("\n" + "Synchronisation"))
+            self.center_frame.configure(bg="gold")
+            self.label_sequence.configure(fg="blue")
+            self.label_duration.configure(fg="blue")
+
+
+    def start_color(self, widget):
+        self.label_sequence.configure(fg="white", font="times 72")
+        self.label_duration.configure(fg="white", font="times 72")
+        self.center_frame.configure(bg="blue")
+        widget.configure(bg="blue")
+    
+    def time_out_color(self, widget):
+        widget.configure(bg="red")
+        
+    def progress(self, currentValue):
+        self.progressbar["value"] = self.currentValue
+        self.progressbar["maximum"] = 60
+        if self.currentValue == 60:
+            self.currentValue = 0
+
+    def round_counter(self):
+        self.count += 1
+        if self.count < 3:
+            self.currentValue = 0
+            self.progress(self.currentValue +1)
+            self.progressbar.update()
+            self.label_config.config(text="Runde: ")
+            self.label_config_text.config(text=("1", "/", self.repeats), fg='blue',font="Times 48")
+        if self.count >= 3 and self.count < 5:
+            self.label_config_text.config(text=("2", "/", self.repeats), fg='blue',font="Times 48")
+        if self.count >= 5 and self.count < 7:
+            self.label_config_text.config(text=("3", "/", self.repeats), fg='blue',font="Times 48")
+        if self.count >= 7 and self.count < 9:
+            self.label_config_text.config(text=("4", "/", self.repeats), fg='blue',font="Times 48")
+        if self.count >= 9 and self.count < 11:
+            self.label_config_text.config(text=("5", "/", self.repeats), fg='blue',font="Times 48")
+
+    def change_config(self):
+        self.config_state = 'user'
+        self.config_files = [("all files", "*.csv")]
+        self.answer = filedialog.askopenfilename(parent=root,
+                                                 initialdir=os.chdir("./configs"),
+                                                 title="Please choose a config file:",
+                                                 filetypes=self.config_files)
+        self.user_config = pd.read_csv(self.answer, sep=',', header=0,
+                                       names=('Titel', 'Values'), index_col=False, keep_default_na=False)
+        self.choosed_config = pd.read_csv(self.answer, usecols=[0, 1])
+        self.df = self.user_config
+        self.label_config_text.config(text=self.choosed_config)
+        df = self.user_config
+        repeat_of_phases = df['Values'][3]
+
+        phase_1 = Phase(title=df['Titel'][0], duration=df['Values'][0])
+        phase_2 = Phase(title=df['Titel'][1], duration=df['Values'][1])
+        phase_3 = Phase(title=df['Titel'][2], duration=df['Values'][2])
+
+        if repeat_of_phases == 1:
+            phase_list = [phase_1, phase_2, phase_3]
+
+        if repeat_of_phases == 2:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 3:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 4:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                          copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 5:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                          copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        self.repeats = repeat_of_phases
+
+        self.schedule = Schedule(phase_list)
+
+root = tk.Tk()
+
+
+root.title("--=> flowtimer <=-- " + "  date: " + date + "  time: " + time)
+root.geometry("1280x860")
+root.config(bg='black')
+root.iconphoto(False, ImageTk.PhotoImage(Image.open('icon_bombtimer.png')))
+
+app = TimerApp(root)
+
+app.mainloop()
Index: scripts/timer.py.bkp
===================================================================
--- scripts/timer.py.bkp	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
+++ scripts/timer.py.bkp	(revision 99dee0fad17ef5dda7a49ff16d071b3d69883e03)
@@ -0,0 +1,224 @@
+import tkinter as tk
+import tkinter.ttk as ttk
+from tkinter import filedialog
+from Schedule import Schedule
+from Phase import Phase
+from PIL import Image, ImageTk
+from copy import copy
+import pandas as pd
+import os
+import math
+import datetime
+
+now = datetime.datetime.now()
+date = now.strftime("%m/%d/%Y")
+time = now.strftime("%H:%M:%S")
+
+
+class TimerApp(tk.Frame):
+    
+    def __init__(self, parent):
+        
+        super().__init__(parent)
+        self.parent = parent
+        self.count = 0
+        self.currentValue = 0
+        self.show_config = pd.read_csv("default_config.csv", usecols=[0, 1])
+        
+        self.photo = ImageTk.PhotoImage(file='flowtimer_startbg_new.png')
+              
+        self.build_gui()
+
+
+    def build_gui(self):
+
+        s = ttk.Style()
+        s.theme_use('clam')
+        s.configure("orange.Horizontal.TProgressbar", troughcolor='grey69', bordercolor='black', background='DarkOrange1', lightcolor='white', darkcolor='black')
+
+        self.headline_frame = tk.Frame(self.parent, bg='white')
+        self.headline_frame.pack(side='top', fill='both', expand=False)
+        self.center_frame = tk.Frame(self.parent, bg='black')
+        self.center_frame.pack(side='top', fill='both', expand=True)
+        self.button_frame = tk.Frame(root)
+        self.button_frame.pack(side='bottom', fill='both', expand=False)
+
+        self.label_headline = tk.Label(self.headline_frame, text=("Hochintensive Intervallarbeit"), bg='white', fg='grey', font="serif 20")
+        self.label_headline.pack(side='left', fill='both', expand=True)
+
+        self.label_config = tk.LabelFrame(self.headline_frame, text="config: ", bg='white', font="serif 12")
+        self.label_config.pack(side='right', fill='both', expand=False, ipadx=20, padx=20, pady=10)
+
+        self.label_config_text = tk.Label(self.label_config, text=self.show_config, bg='white', font="serif 10", justify='right')
+        self.label_config_text.pack()
+
+        self.label_start = tk.Label(self.center_frame, image=self.photo, bg='black')
+        self.label_start.pack(side='left', fill='both', expand=True)
+
+        self.label_sequence = tk.Label(self.center_frame)
+        self.label_sequence.pack(side='top', fill='both', expand=True)
+
+        self.label_duration = tk.Label(self.center_frame)
+        self.label_duration.pack(side='top', fill='both', expand=True)
+        
+        self.progressbar = ttk.Progressbar(self.headline_frame, style="orange.Horizontal.TProgressbar", orient="horizontal",length=600, mode="determinate")
+        self.progressbar.pack(side='left')
+
+        self.start_timer_button = tk.Button(self.button_frame, text="START", font="courier 14", width=20, command=self.start)
+        self.start_timer_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.freeze_button = tk.Button(self.button_frame, text="PLAY/PAUSE", font="courier 14", width=20, command=self.toggle_tick)
+        self.freeze_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.skip_button = tk.Button(self.button_frame, text="SKIP", font="courier 14", width=20, command=self.skip)
+        self.skip_button.pack(side='left', fill='both', ipady=20, expand=True)
+
+        self.quit_button = tk.Button(self.button_frame, text="QUIT", font="courier 14", width=20, command=self.quit_app)
+        self.quit_button.pack(side='left', fill='both', ipady=20, expand=True)
+        
+        self.config_files = [("all files", "*.csv")]
+        self.answer = filedialog.askopenfilename(parent=root,
+                                            initialdir=os.chdir("./configs"),
+                                            title="Please choose a config file:",
+                                            filetypes=self.config_files)
+
+        df = pd.read_csv(self.answer, sep=',', header=0,
+                         names=('Titel', 'Values'), index_col=False, keep_default_na=False)
+
+        self.show_config = pd.read_csv(self.answer, usecols=[0, 1])
+        
+        self.label_config_text.pack_forget()
+        self.label_config_text = tk.Label(self.label_config, text=self.show_config, bg='white', font="serif 10", justify='right')
+        self.label_config_text.pack()
+        
+        repeat_of_phases = df['Values'][3]
+
+        phase_1 = Phase(title=df['Titel'][0], duration=df['Values'][0])
+        phase_2 = Phase(title=df['Titel'][1], duration=df['Values'][1])
+        phase_3 = Phase(title=df['Titel'][2], duration=df['Values'][2])
+
+        if repeat_of_phases == 1:
+            phase_list = [phase_1, phase_2, phase_3]
+
+        if repeat_of_phases == 2:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 3:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 4:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                  copy(phase_2), copy(phase_3)]
+
+        if repeat_of_phases == 5:
+            phase_list = [phase_1, phase_2, phase_3, copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3),
+                    copy(phase_2), copy(phase_3), copy(phase_2), copy(phase_3)]
+
+        self.repeats = repeat_of_phases
+
+        self.schedule = Schedule(phase_list)
+
+    def tick(self):
+        
+        if self.schedule.is_paused():
+            return
+        self.label_start.pack_forget()
+        current_process = self.after(1000, self.tick)
+        self.currentValue = self.currentValue + 1
+
+        if self.schedule.state == 'initial':
+            self.label_sequence.config(self.start_color(root))
+            self.label_sequence.config(text=("\n" + str(self.schedule.current_phase.title) + "..."))
+            self.label_duration.config(self.start_color(root))
+            self.label_duration.config(text=("noch " + str(math.ceil(self.schedule.current_phase.time_left)) + " Min\n"))
+            self.schedule.start()
+            self.schedule.tick(1)
+        else:
+            if self.schedule.running():
+                self.progress(self.currentValue)
+                self.progressbar.update()
+#               print(current_process)
+                self.label_sequence.configure(self.start_color(root))
+                self.label_sequence.config(text=("\n" + str(self.schedule.current_phase.title) + "..."), bg=self.random_color(self.label_sequence))
+                self.label_duration.config(self.random_color(root))
+                self.label_duration.config(text=("noch " + str(math.ceil(self.schedule.current_phase.time_left)) + " Min\n"), bg=self.random_color(self.label_duration))
+                if self.schedule.tick(1/60):
+                    self.count += 1
+                    if self.count < 3:
+                        self.currentValue = 0
+                        self.progress(self.currentValue +1)
+                        self.progressbar.update()
+                        self.label_config.config(text="Runde: ")
+                        self.label_config_text.config(text=("1", "/", self.repeats), fg='blue',font="Times 26")
+                    if self.count >= 3 and self.count < 5:
+                        self.label_config_text.config(text=("2", "/", str(self.repeats)), fg='blue',font="Times 26")
+                    if self.count >= 5 and self.count < 7:
+                        self.label_config_text.config(text=("3", "/", self.repeats), fg='blue',font="Times 26")
+                    if self.count >= 7 and self.count < 9:
+                        self.label_config_text.config(text=("4", "/", self.repeats), fg='blue',font="Times 26")
+                    
+            else:
+                self.label_sequence.configure(self.time_out_color(root))
+                self.label_sequence.config(text=("\n" + "\nTime over !"), bg="red")
+                self.label_duration.config(text="", bg="red")
+                self.progressbar.pack_forget()
+                self.after_cancel(current_process)
+    
+    def start(self):
+        self.schedule.start()
+        self.tick()
+        
+    def skip(self):
+        self.schedule.skip()
+        self.currentValue = 0
+    
+    def toggle_tick(self):
+        if self.schedule.is_paused():
+            self.freeze_button.config(relief="raised")
+            self.label_sequence.config(fg="white")
+            self.label_duration.config(fg="white")
+            self.schedule.start()
+            self.tick()
+        else:
+            self.schedule.pause()
+            self.freeze_button.config(relief="sunken")
+            self.label_sequence.config(text=("\n" + "\n! timer paused !"), fg="red", bg="black")
+            self.label_duration.config(text="", bg="black")
+
+    def quit_app(self):
+        self.parent.destroy()
+    
+    def random_color(self, widget):
+        if self.schedule.current_phase.title == "B-Phase":
+            widget.configure(bg="blue")
+        if self.schedule.current_phase.title == "I-Phase":
+            widget.configure(bg="green")
+        if self.schedule.current_phase.title == "S-Phase":
+            widget.configure(bg="gold")
+
+
+    def start_color(self, widget):
+        self.label_sequence.configure(bg="blue", fg="white", font="times 72")
+        self.label_duration.configure(bg="blue", fg="white", font="times 72")
+        widget.configure(bg="blue")
+    
+    def time_out_color(self, widget):
+        widget.configure(bg="red")
+        
+    def progress(self, currentValue):
+        self.progressbar["value"] = self.currentValue
+        self.progressbar["maximum"] = 60
+        if self.currentValue == 60:
+            self.currentValue = 0
+
+root = tk.Tk()
+
+
+root.title("--=> flowtimer <=-- " + "  date: " + date + "  time: " + time)
+root.geometry("1280x870")
+root.config(bg='black')
+root.iconphoto(False, ImageTk.PhotoImage(Image.open('icon_bombtimer.png')))
+
+app = TimerApp(root)
+
+app.mainloop()
Index: sts/test_phase.py
===================================================================
--- tests/test_phase.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,57 +1,0 @@
-import pytest
-from flowtimer.Phase import Phase
-
-
-class TestPhase:
-
-    @pytest.fixture
-    def phase(self):
-        return Phase.default()
-
-    def test_phase_initialization(self, phase):
-        assert phase.title == "Default"
-        assert phase.initial_ticks == 30
-        assert phase.state == "initial"
-        assert phase.ticks_left == 30
-
-#    def test_phase_str_representation(self):
-#        phase = Phase("Warm-up", 300)
-#        expected_str = "-->Warm-up\nInitial=300\n"
-#        assert str(phase) == expected_str
-
-    def test_phase_start(self, phase):
-        phase.start()
-        assert phase.state == "running"
-        assert phase.is_running() is True
-
-    def test_phase_pause(self, phase):
-        phase.start()
-        phase.pause()
-        assert phase.state == "paused"
-        assert phase.is_paused() is True
-
-    def test_phase_abort(self, phase):
-        phase.abort()
-        assert phase.state == "aborted"
-        assert phase.is_aborted() is True
-
-    def test_phase_tick(self, phase):
-        phase.start()
-        phase.tick(10)
-        assert phase.ticks_left == 20
-        assert phase.state == "running"
-        assert phase.is_running()
-
-    def test_phase_tick_to_completion(self, phase):
-        phase.start()
-        phase.tick(30)
-        assert phase.ticks_left == 0
-        assert phase.is_completed() is True
-        assert phase.state == 'completed'
-
-    def test_phase_tick_beyond_completion(self, phase):
-        phase.start()
-        phase.tick(350)
-        assert phase.ticks_left == 0
-        assert phase.is_completed() is True
-        assert phase.state == 'completed'
Index: sts/test_recurring_phase_sequence.py
===================================================================
--- tests/test_recurring_phase_sequence.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,85 +1,0 @@
-import pytest
-import json
-
-from flowtimer.RecurringPhaseSequence import RecurringPhaseSequence
-
-
-class TestRecurringPhaseSequence():
-
-    @pytest.fixture
-    def recurring_phase_sequence(self):
-        return RecurringPhaseSequence.default()
-
-    def test_from_json(self):
-        json_string = RecurringPhaseSequence.default_json_string()
-        sequence = RecurringPhaseSequence.from_json(json_string)
-        assert isinstance(sequence, RecurringPhaseSequence)
-        assert sequence.initial_repetitions == 3
-        assert len(sequence.phases) == 3
-        assert sequence.phases[0].title == "Tasking"
-
-    def test_to_json(self, recurring_phase_sequence):
-        json_string = recurring_phase_sequence.to_json()
-        data = json.loads(json_string)
-        assert data['_state'] == "initial"
-        assert data['initial_repetitions'] == 3
-        assert data['passes_left'] == 2
-        assert len(data['phases']) == 3
-
-    def test_initial_state(self, recurring_phase_sequence):
-        assert recurring_phase_sequence.state() == "initial"
-        assert recurring_phase_sequence.current_phase.title == "Tasking"
-        assert recurring_phase_sequence.passes_left == 2
-
-    def test_current_phase_number(self, recurring_phase_sequence):
-        assert recurring_phase_sequence.current_phase_number() == 0
-        recurring_phase_sequence.tick(10)
-        assert recurring_phase_sequence.current_phase_number() == 1
-
-    def test_phases_left_in_pass(self, recurring_phase_sequence):
-        assert recurring_phase_sequence.phases_left_in_pass() == 2
-        recurring_phase_sequence.tick(10)
-        assert recurring_phase_sequence.phases_left_in_pass() == 1
-
-    def test_upcoming_phases_in_pass(self, recurring_phase_sequence):
-        upcoming = recurring_phase_sequence.upcoming_phases_in_pass()
-        assert len(upcoming) == 2
-        assert upcoming[0].title == "Work"
-
-    def test_ticks_left(self, recurring_phase_sequence):
-        total_ticks = (sum([phase.initial_ticks for phase in recurring_phase_sequence.phases]) *
-                       recurring_phase_sequence.initial_repetitions)
-        assert recurring_phase_sequence.ticks_left == total_ticks
-        recurring_phase_sequence.tick(10)
-        assert recurring_phase_sequence.ticks_left == (total_ticks - 10)
-
-    def test_completed(self, recurring_phase_sequence):
-        assert not recurring_phase_sequence.is_completed()
-        for _ in range(3):
-            for phase in recurring_phase_sequence.phases:
-                recurring_phase_sequence.tick(phase.initial_ticks)
-        assert recurring_phase_sequence.is_completed()
-
-    def test_abort(self, recurring_phase_sequence):
-        recurring_phase_sequence.abort()
-        assert recurring_phase_sequence.state() == "aborted"
-        assert recurring_phase_sequence.current_phase.is_aborted()
-
-    def test_tick_progression(self, recurring_phase_sequence):
-        recurring_phase_sequence.tick(6)
-        assert recurring_phase_sequence.current_phase.title == "Work"
-        assert recurring_phase_sequence.passes_left == 2
-
-        recurring_phase_sequence.tick(45)
-        assert recurring_phase_sequence.current_phase.title == "Break"
-        assert recurring_phase_sequence.passes_left == 2
-
-        recurring_phase_sequence.tick(15)
-        assert recurring_phase_sequence.current_phase.title == "Tasking"
-        assert recurring_phase_sequence.passes_left == 1
-
-    def test_unrolled(self, recurring_phase_sequence):
-        unrolled_phases = recurring_phase_sequence.unrolled()
-        assert len(unrolled_phases) == 9
-        assert unrolled_phases[0].title == "Tasking"
-        assert unrolled_phases[-1].title == "Break"
Index: sts/test_schedule.py
===================================================================
--- tests/test_schedule.py	(revision f2a2a8284e46a994d7f49445495ceb6f02059270)
+++ 	(revision )
@@ -1,111 +1,0 @@
-import pytest
-import json
-from flowtimer.Schedule import Schedule
-from flowtimer.Phase import Phase
-from flowtimer.RecurringPhaseSequence import RecurringPhaseSequence
-
-
-class TestSchedule:
-
-    @pytest.fixture
-    def setup_schedule(self):
-        #  Set up some real Phase and RecurringPhaseSequence objects for testing
-        phase1 = Phase("Phase 1", 300)
-        phase2 = Phase("Phase 2", 600)
-        sequence = RecurringPhaseSequence("Sequence 1", [phase1, phase2], 2)
-        blocks = [phase1, sequence]
-        schedule = Schedule("Test Schedule", blocks)
-        return schedule, phase1, phase2, sequence
-
-    def test_initialization(self, setup_schedule):
-        schedule, phase1, _, _ = setup_schedule
-        assert schedule.title == "Test Schedule"
-        assert schedule.blocks == [phase1, schedule.blocks[1]]
-        assert schedule.current_block == phase1
-        assert schedule.state() == "initial"
-
-    def test_default_json_string(self):
-        default_json = Schedule.default_json_string()
-        assert isinstance(default_json, str)
-
-    def test_from_json(self):
-        json_string = Schedule.default_json_string()
-        schedule = Schedule.from_json(json_string)
-        assert schedule.title == "Default"
-        assert len(schedule.blocks) == 2
-        assert isinstance(schedule.blocks[0], Phase)
-        assert isinstance(schedule.blocks[1], RecurringPhaseSequence)
-
-    def test_to_json(self, setup_schedule):
-        schedule, _, _, _ = setup_schedule
-        json_string = schedule.to_json()
-        assert isinstance(json_string, str)
-        data = json.loads(json_string)
-        assert data['title'] == "Test Schedule"
-        assert len(data['blocks']) == 2
-
-    def test_start(self, setup_schedule):
-        schedule, phase1, _, _ = setup_schedule
-        schedule.start()
-        assert schedule.state() == "running"
-        # assert phase1.ticks_left < phase1.initial_ticks  # Assuming the phase reduces ticks when started
-
-    def test_running(self, setup_schedule):
-        schedule, _, _, _ = setup_schedule
-        schedule.start()
-        assert schedule.is_running() is True
-        schedule.pause()
-        assert schedule.is_running() is False
-
-    def test_paused(self, setup_schedule):
-        schedule, _, _, _ = setup_schedule
-        schedule.pause()
-        assert schedule.is_paused() is True
-
-    def test_abort(self, setup_schedule):
-        schedule, _, _, _ = setup_schedule
-        schedule.abort()
-        assert schedule.state() == "aborted"
-
-    def test_completed(self, setup_schedule):
-        schedule, phase1, _, sequence = setup_schedule
-        schedule.tick(phase1.initial_ticks)  # Complete phase1
-        schedule.tick(sequence.initial_ticks)  # Complete sequence
-        schedule.tick(phase1.initial_ticks)  # Complete phase1
-        schedule.tick(sequence.initial_ticks)  # Complete sequence
-        assert schedule.is_completed() is True
-        assert schedule.state() == "completed"
-
-    def test_advance_to_next_block(self, setup_schedule):
-        schedule, _, _, sequence = setup_schedule
-        schedule.advance_to_next_block()
-        assert schedule.current_block == schedule.blocks[1]
-
-    def test_skip(self, setup_schedule):
-        schedule, _, _, sequence = setup_schedule
-        schedule.skip()
-        assert schedule.current_block == schedule.blocks[1]  # Should skip to Phase 2 within the sequence
-
-    def test_total_ticks_left(self, setup_schedule):
-        schedule, phase1, phase2, sequence = setup_schedule
-        expected_total_ticks = phase1.ticks_left + sequence.ticks_left
-        assert schedule.total_ticks_left() == expected_total_ticks
-
-    def test_upcoming_blocks(self, setup_schedule):
-        schedule, _, _, sequence = setup_schedule
-        assert schedule.upcoming_blocks() == [sequence]
-
-    def test_current_block_is_final(self, setup_schedule):
-        schedule, _, _, sequence = setup_schedule
-        assert schedule.current_block_is_final() is False
-        schedule.advance_to_next_block()
-        assert schedule.current_block_is_final() is True
-
-    def test_tick(self, setup_schedule):
-        schedule, phase1, _, _ = setup_schedule
-        initial_ticks = phase1.ticks_left
-        schedule.tick(100)
-        assert phase1.ticks_left == initial_ticks - 100
-
-        schedule.tick(phase1.ticks_left)  # Finish phase1
-        assert schedule.current_block == schedule.blocks[1]  # Should advance to the next block
