You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 rivejä
1.0 KiB

#pragma once
#include <utility>
#include <set>
#include <fstream>
#include <rigid_paradise/config.h>
namespace pomodoro
{
using pomotask = std::pair<int, std::string>;
std::set<pomotask> get_pomodoro_tasks()
{
std::set<std::pair<int, std::string>> ret;
std::ifstream tasks(config::get_value("pomodoro.tasks"));
int counter = 1;
while(tasks.good())
{
std::string str;
getline (tasks, str);
if(str.size()>1 && str[0] != '#')
{
ret.insert(std::make_pair(counter++, str));
}
}
return ret;
}
}
#define pomodoro_actions_unwrap {\
std::make_pair<char, std::string>('P',"Productive work"),\
std::make_pair<char, std::string>('B',"Parallel work"),\
std::make_pair<char, std::string>('C',"Non productive work"),\
std::make_pair<char, std::string>('D',"Productive discution or chat"),\
std::make_pair<char, std::string>('E',"Non productive chat"),\
std::make_pair<char, std::string>('T',"Learning"),\
std::make_pair<char, std::string>('S',"Improductive activity"),\
std::make_pair<char, std::string>('Z',"Break")\
}