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.

43 lines
1.4 KiB

  1. /* Copyright 2020 Sergi Meseguer <zigotica@gmail.com>
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #include "zigotica.h"
  14. static void render_status(void) {
  15. oled_write_P(PSTR("z12 v1.0\n"), false);
  16. oled_write_P(PSTR("Layer: "), false);
  17. switch (get_highest_layer(layer_state)) {
  18. case _VIM:
  19. oled_write_P(PSTR("VIM\n\nBUFFER SCROLL"), false);
  20. break;
  21. case _FIGMA:
  22. oled_write_P(PSTR("FIGMA\n\nVOLUME ZOOM"), false);
  23. break;
  24. case _BROWSER:
  25. oled_write_P(PSTR("BROWSER\n\nTABS SCROLL"), false);
  26. break;
  27. case _TERMINAL:
  28. oled_write_P(PSTR("TERMINAL\n\nVOLUME SCROLL"), false);
  29. break;
  30. default:
  31. oled_write_P(PSTR("Undef\n"), false);
  32. }
  33. }
  34. void oled_task_user(void) {
  35. render_status();
  36. }