From 15f8c9534ffdaf1e50dca17e486902c75d796d9e Mon Sep 17 00:00:00 2001 From: osamu-kj <64986162+0xdeadbeer@users.noreply.github.com> Date: Sat, 20 May 2023 02:08:12 +0200 Subject: [PATCH] Vis: Remove unnecessary code + Update README.md --- README.md | 20 +++--- preview/preview.png | Bin 0 -> 35216 bytes src/calendar/calendar.cpp | 3 + src/engine/engine.cpp | 128 +++++++++++++------------------------- src/engine/engine.hpp | 25 +------- src/global/global.hpp | 3 + src/main.cpp | 30 ++++----- 7 files changed, 71 insertions(+), 138 deletions(-) create mode 100644 preview/preview.png diff --git a/README.md b/README.md index bd2ded5..f543adf 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,13 @@ Vi Scheduler (VIS) is a lightweight tool that brings a Vim-like calendar to your terminal. It allows you to quickly view and edit your schedule, appointments, and tasks without leaving your command-line interface. -Built using C++ and the Ncurses library, Vis offers a fast and efficient way to manage your time in the terminal. It suppors various navigation and editing commands inspired by Vim, such as navigating between days or months, adding and deleting events, and setting reminders. +Built using C++ and the Ncurses library, vis offers a fast and efficient way to manage your time in the terminal. It suppors various navigation and editing commands inspired by Vim, such as navigating between days or months, adding and deleting events. -# Features - - - Vim-like navigation and editing commands - - Multiple view modes: month, week +![Vi Scheduler - Preview](./preview/preview.png) # Dependencies -The following is a list of dependencies that your system needs in order to be able to run Vis. +The following is a list of dependencies that your system needs in order to be able to run vis. - [The Ncurses library](https://invisible-island.net/ncurses/announce.html) - [Moreutils](https://joeyh.name/code/moreutils/) @@ -25,7 +22,7 @@ For installation, you can run `sudo make install` (from the /build directory) # Usage -To start Vis simply run the `vis` binary in your terminal alongside the name of the calendar file. +To start vis simply run the `vis` binary in your terminal alongside the name of the calendar file. For example: `vis school.cal` @@ -44,17 +41,16 @@ This will open the default view mode (month) and display the current month's cal The following is a list of things that have been/still have to be completed. - ~~Basic prototype with vipe (in memory only)~~ - - Finish all the basic shortcuts - - Ability to write a calendar to a file - - Ability to read a calendar from a file + - ~~Finish all the basic shortcuts~~ + - ~~Ability to write a calendar to a file~~ + - ~~Ability to read a calendar from a file~~ - Alerting function for errors and issues - Logging / Debug flag - Read input from stdin - - Set reminders # Contributions -Contributions and feedback are welcome! If you have any ideas or suggestions for improving Vis, please submit a pull request or open an issue on Github. Let's make the FOSS community better, together! +Contributions and feedback are welcome! If you have any ideas or suggestions for improving vis, please submit a pull request or open an issue on Github. Let's make the FOSS community better, together! # License diff --git a/preview/preview.png b/preview/preview.png new file mode 100644 index 0000000000000000000000000000000000000000..e808e0d3d950eb5231d0fdd1a1d3e64c9d0b2461 GIT binary patch literal 35216 zcmXt91yCJLv&G#dxVtB~yItHZNC@s8Tml4#;BLX)-GggzcXxMx%lFr-x)j`HXLfd` zr~CBjGoeZfQpgDS2w-4f$RKHP6)-Re6EHCFAUFu%O8uCWa75KH&uPQ!m1rtuHzzFR| z6!9sE2Y7SL0;rjFLnP~%w_lxq(DEwD;ntG4Akk8Y>&iY=IB*kEJb@Xxs4oh&XaEQ}NGB+w?FFN9 zu>c2-c5&8ves?h0b8NTLLvr-3LU;9*viInaJ@ug?apKgK?AO3eaNhA;VJz->f2P;z^IB^* zUZGQO+2sfR`1r`2bUZ|pb+X)eemGtD{&ZZ~EjrEMR_`El_I!UX`Ll@Q z`(Bz|eTuj0=CGVGpUMlRCq4h} z$ZZH?*Zmq~Mg-n3R}C-ol~l<4;xBA45}t~R%J;@)1J6^AS`2opIqSoze1$@%=>mC0 z{>$Fi`*q*<*ZX(CijeWyCp@CU!{bnLa&q2)d2rhQmk=LMNlh&i#hg?Mila9BmtL%0 zTQF-0jYdMkLR95+G(%^TKIH%y7lUTS$+gVFg*ckK!1l+s$8A3^U-!Bm19}}C8d?O* z9Wa)iq%w_C*CS<;(%GeYt9ig;h`8;u^;&N&I*u?^S6AaO>!KOM zc)h>9?vH1=@@8n1-kvPh>Vwm(mrzEI0meVL?id;o5swIpQ0+EldpY9=Toc1XBO-S` zvcuby)O>{=VD8(%t|+veEpfaLLMGVT+dJy@1dQRg(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sRKaI2f;`HO6*<3V`$h9WX9#45VuTLsvjc3?DWHKKOqB zPp_>5E9t}C)&5-wK%X0(mTp06;~aS`-tA%I3UG=2yT7kE5)4R$+Um2DwVq^!qN=K@ zwR=5-Q~_W&Yym91LCggZ&Mg4>3Pwade^W5buECNF9@;k$b_J%gXd%^V@4*b*4CcU{ ziGsN=gf#WQVh50bprbi1HBa^Qn1e1cc?oRW$gFN5-Vg%lEOag3Wk$TC)#b<`rLkE( zC?%OItAj-Vc-p1M$5;Da*jbZ=aSJq-6c+v*8#@N1!qgb{7NwL7w+=4EziUXrij+O& zqq=%#@ONQ)D=#&U=76HVBlY$5&scRFR@#^5kk_ze_3FXuhVxuVK!puxlc3zx8q#M! z{~E<@pz(uFQ=ZdH2L+b^>knvZ(De+T<3UbBQ@*GijFe7}?=zG>g;V3x#&@@&$ZC%y zG<>#toO+Na_czZ>_$=K=Rw&;b1VMxa6?{$>bvP#%pok~D=%b4b$U2u4fnfLHuBQX@rSzvN$p02bav2ShaXw8l^;Z zVhNo~Cj)K=000|UiY20+Um_CeA68yG|0nmw0ssI20D(iuToguIs&_Z-#oY5l+QJwO z0-HOe#q*h*6Vdl9p|fKb?A!;=25^SQDL+`uF2bS^ykPSL8~X3$gp5A5FG5J`R%`NU zL7jMoRw)sPr2_!51VjbD`hkU7VNnQNG23Lx5h3TcL&+;jYV-3h6w-w0Dz;R*8?jmA^e=Z7H9aF-3722 znCt@pfB@jW@o|P;I #include "engine.hpp" -Engine::Engine(int padding, calendar_view_mode view_mode) { +Engine::Engine(int padding) { this->padding = padding; - this->view_mode = view_mode; - this->cells_table = std::vector(); calendar_information date_info = calendar_information(); this->calendar = new Calendar(&date_info); @@ -24,38 +22,24 @@ void Engine::ui_draw(WINDOW *win) { getmaxyx(win, screen_height, screen_width); if (screen_height < 25 || screen_width < 70) { - this->ui_warning_draw(win, "Window resolution too small, please resize it."); return; + this->ui_warning_draw(win, "Window resolution too small, please resize it."); return; } - this->input_block = false; - this->cells_table.clear(); - + low_res_flag = 0; box(win, 0, 0); - wrefresh(win); keypad(win, TRUE); keypad(stdscr, TRUE); - switch (this->view_mode) { - case MONTH_VIEW: - this->ui_month_draw(win); - break; - case WEEK_VIEW: - this->ui_week_draw(win); - break; - case MONTHS_VIEW: - this->ui_months_draw(win); - break; - } - + this->ui_month_draw(win); this->ui_top_draw(win); this->ui_bottom_draw(win); wrefresh(win); } void Engine::ui_warning_draw(WINDOW *win, const char *message) { - this->input_block = true; + low_res_flag = 1; mvwprintw(win, 0, 0, "%s", message); @@ -71,7 +55,7 @@ void Engine::ui_month_draw(WINDOW *win) { int y_location = this->padding + (q/(date_info.current_month_days/7) * (i/7)); // check if day has an event - // TOOD: Temporary solution + // TODO: Temporary solution calendar_information tmp_date = date_info; tmp_date.current_day = i+1; @@ -95,14 +79,6 @@ void Engine::ui_month_draw(WINDOW *win) { } } -void Engine::ui_week_draw(WINDOW *win) { - // TODO -} - -void Engine::ui_months_draw(WINDOW *win) { - // TODO -} - void Engine::ui_top_draw(WINDOW *win) { if (VIS_COLORING) wattron(win, COLOR_PAIR(1)); @@ -115,9 +91,8 @@ void Engine::ui_bottom_draw(WINDOW *win) { if (VIS_COLORING) wattron(win, COLOR_PAIR(1)); calendar_information date_info = this->calendar->get_info(); - std::string current_view_mode = calendar_view_mode_str[this->view_mode]; - mvwprintw(win, LINES-2, 1, "Year: %d, Month: %d, Day: %d, Mode: %s\n", date_info.current_year, date_info.current_month, date_info.current_day, current_view_mode.c_str()); + mvwprintw(win, LINES-2, 1, "Year: %d, Month: %d, Day: %d\n", date_info.current_year, date_info.current_month, date_info.current_day); if (VIS_COLORING) wattroff(win, COLOR_PAIR(1)); } @@ -125,57 +100,19 @@ void Engine::ui_bottom_draw(WINDOW *win) { void Engine::input_handle(WINDOW *win) { char key = getch(); - if (this->input_block) - return; + if (key == ERR) return; + if (low_res_flag) return; if (this->input_handle_universal(win, key)) return; - if (this->view_mode == MONTH_VIEW) - this->input_handle_month(win, key); - else if (this->view_mode == WEEK_VIEW) - this->input_handle_week(win, key); - else if (this->view_mode == MONTHS_VIEW) - this->input_handle_months(win, key); - - // fuc. + this->input_handle_month(win, key); } bool Engine::input_handle_universal(WINDOW *win, char key) { int day; switch (key) { - case 'h': - if (this->calendar->get_info().current_day <= 1) break; - - day = this->calendar->get_info().current_day; - this->calendar->set_day(--day); - - --this->active_cell; - break; - case 'l': - if (this->calendar->get_info().current_day >= this->calendar->get_info().current_month_days) break; - - day = this->calendar->get_info().current_day; - this->calendar->set_day(++day); - - ++this->active_cell; - break; - case 'j': - if (this->calendar->get_info().current_day+7 > this->calendar->get_info().current_month_days) break; - - day = this->calendar->get_info().current_day; - this->calendar->set_day(day+7); - - this->active_cell += 7; - break; - case 'k': - if (this->calendar->get_info().current_day-7 < 1) break; - day = this->calendar->get_info().current_day; - this->calendar->set_day(day-7); - - this->active_cell -= 7; - break; - case 'i': { // TODO: Break down this monstrocity of a case + case 'i': { // TODO: Break down this monstrocity of a case endwin(); int vipe_out[2], vipe_in[2]; char output_buffer[4096]; @@ -239,11 +176,41 @@ bool Engine::input_handle_universal(WINDOW *win, char key) { } void Engine::input_handle_month(WINDOW *win, char key) { - calendar_information date_info = this->calendar->get_info(); - int month; + int day, month; switch (key) { + case 'h': + if (this->calendar->get_info().current_day <= 1) break; + + day = this->calendar->get_info().current_day; + this->calendar->set_day(--day); + + --this->active_cell; + break; + case 'l': + if (this->calendar->get_info().current_day >= this->calendar->get_info().current_month_days) break; + + day = this->calendar->get_info().current_day; + this->calendar->set_day(++day); + + ++this->active_cell; + break; + case 'j': + if (this->calendar->get_info().current_day+7 > this->calendar->get_info().current_month_days) break; + + day = this->calendar->get_info().current_day; + this->calendar->set_day(day+7); + + this->active_cell += 7; + break; + case 'k': + if (this->calendar->get_info().current_day-7 < 1) break; + day = this->calendar->get_info().current_day; + this->calendar->set_day(day-7); + + this->active_cell -= 7; + break; case 'u': if (this->calendar->get_info().current_month <= 1) break; @@ -273,14 +240,6 @@ void Engine::input_handle_month(WINDOW *win, char key) { } } -void Engine::input_handle_week(WINDOW *win, char key) { - // TODO -} - -void Engine::input_handle_months(WINDOW *win, char key) { - // TODO -} - calendar_information Engine::parse_date(std::string date) { char *token = strtok((char *) date.c_str(), "."); std::vector tokens; @@ -334,7 +293,6 @@ void Engine::open_calendar(char *filename) { std::string line; while (std::getline(this->calendar_file, line)) this->parse_line(line); - } bool Engine::write_calendar() { diff --git a/src/engine/engine.hpp b/src/engine/engine.hpp index 5bb7639..a54b007 100644 --- a/src/engine/engine.hpp +++ b/src/engine/engine.hpp @@ -11,17 +11,6 @@ #include "../calendar/calendar.hpp" #include "../global/global.hpp" -struct engine_child { - int x; - int y; -}; - -enum calendar_view_mode { - MONTH_VIEW = 0, - WEEK_VIEW, - MONTHS_VIEW -}; - std::string weekday_prefixes[] = { "Sun", "Mon", @@ -32,24 +21,16 @@ std::string weekday_prefixes[] = { "Sat" }; -std::string calendar_view_mode_str[] = { - "MONTH_VIEW", - "WEEK_VIEW", - "MONTHS_VIEW" -}; - // title: drawing engine // description: use for drawing the TUI and interact with the cells class Engine { public: - Engine(int padding, calendar_view_mode view_mode); + Engine(int padding); ~Engine(); void ui_draw(WINDOW *win); void ui_warning_draw(WINDOW *win, const char *message); void ui_month_draw(WINDOW *win); - void ui_week_draw(WINDOW *win); - void ui_months_draw(WINDOW *win); void ui_bottom_draw(WINDOW *win); void ui_top_draw(WINDOW *win); @@ -57,8 +38,6 @@ class Engine { void input_handle(WINDOW* win); bool input_handle_universal(WINDOW *win, char key); void input_handle_month(WINDOW *win, char key); - void input_handle_week(WINDOW *win, char key); - void input_handle_months(WINDOW *win, char key); calendar_information parse_date(std::string date); void parse_line(std::string line); @@ -70,10 +49,8 @@ class Engine { std::map events_map; int active_cell; - calendar_view_mode view_mode; int padding; // padding private: - std::vector cells_table; std::fstream calendar_file; char * calendar_file_location; }; diff --git a/src/global/global.hpp b/src/global/global.hpp index 5dfc357..229b40a 100644 --- a/src/global/global.hpp +++ b/src/global/global.hpp @@ -1,8 +1,11 @@ #ifndef VIS_GLOBAL #define VIS_GLOBAL +#include #include #define VIS_COLORING has_colors() && can_change_color() +volatile sig_atomic_t winch_flag = 0; // DESCRIPTION: flags if the resolution of the terminal has changed +volatile sig_atomic_t low_res_flag = 0; // DESCRIPTION: flags if the resolution of the terminal is too small #endif diff --git a/src/main.cpp b/src/main.cpp index db85abd..c4c7fd9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,25 +6,11 @@ #include "engine/engine.hpp" #include "global/global.hpp" -Engine engine(10, MONTH_VIEW); +Engine engine(10); WINDOW *main_win; void sig_winch(int sig) { - if (isendwin()) return; - endwin(); - - wclear(main_win); - wrefresh(main_win); - - wresize(main_win, LINES, COLS); - mvwin(main_win, 0, 0); - - // if the resolution is too small, output a warning - // else redraw the TUI - engine.ui_draw(main_win); - - flushinp(); - return; + winch_flag = 1; } void signals() { @@ -64,6 +50,7 @@ int main(int argc, char **argv) { curs_set(0); // invisible cursor noecho(); + halfdelay(1); refresh(); main_win = newwin(LINES, COLS, 0, 0); @@ -84,8 +71,17 @@ int main(int argc, char **argv) { signals(); for (;;) { - engine.ui_draw(main_win); + if (winch_flag) { + winch_flag = 0; + endwin(); + wrefresh(main_win); + wclear(main_win); + wresize(main_win, LINES, COLS); + mvwin(main_win, 0, 0); + } + + engine.ui_draw(main_win); engine.input_handle(main_win); }