From 3db4393a08165ffe3980a8b7faffd9a19ba6fc03 Mon Sep 17 00:00:00 2001 From: Madeleine <32415621+SpyHoodle@users.noreply.github.com> Date: Sat, 19 Mar 2022 15:15:15 +0000 Subject: [PATCH] Delete statusbar.py --- core/statusbar.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 core/statusbar.py diff --git a/core/statusbar.py b/core/statusbar.py deleted file mode 100644 index 6c9ae46..0000000 --- a/core/statusbar.py +++ /dev/null @@ -1,45 +0,0 @@ -import curses - - -def themes(data): - if data["statusbar_theme"] == "bare": - # The theme colors - colors = (7, data["mode_color"] - 1, 13, 1) - - # Add spaces before each part - icon = f" {data['icon']}" - mode = f" {data['mode'].upper()}" - file = f" {data['buffer_name']}" - - else: - # The theme colors - colors = (8, data["mode_color"], 14, 2) - - # Add spaces on either end - icon = f" {data['icon']} " - mode = f" {data['mode'].upper()} " - file = f" {data['buffer_name']} " - - return colors, icon, mode, file - - -def refresh(screen, data): - # Calculate the theme - colors, icon, mode, file = themes(data) - - # Render icon - screen.addstr(data["height"] - 2, 0, icon, - curses.color_pair(colors[0]) | curses.A_BOLD) - - # Render mode - screen.addstr(data["height"] - 2, len(icon), mode, - curses.color_pair(colors[1]) | curses.A_BOLD) - - # Render file name - screen.addstr(data["height"] - 2, len(icon) + len(mode), file, - curses.color_pair(colors[2]) | curses.A_BOLD) - - # Rest of the bar - screen.addstr(data["height"] - 2, len(icon) + len(mode) + len(file), - " " * (data["width"] - (len(icon) + len(mode) + len(file))), - curses.color_pair(colors[3]))