Mercurial > libervia-backend
comparison libervia/tui/constants.py @ 4076:b620a8e882e1
refactoring: rename `libervia.frontends.primitivus` to `libervia.tui`
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 02 Jun 2023 16:25:25 +0200 |
parents | libervia/frontends/primitivus/constants.py@26b7ed2817da |
children |
comparison
equal
deleted
inserted
replaced
4075:47401850dec6 | 4076:b620a8e882e1 |
---|---|
1 #!/usr/bin/env python3 | |
2 | |
3 # Libervia TUI | |
4 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) | |
5 | |
6 # This program is free software: you can redistribute it and/or modify | |
7 # it under the terms of the GNU Affero General Public License as published by | |
8 # the Free Software Foundation, either version 3 of the License, or | |
9 # (at your option) any later version. | |
10 | |
11 # This program is distributed in the hope that it will be useful, | |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 # GNU Affero General Public License for more details. | |
15 | |
16 # You should have received a copy of the GNU Affero General Public License | |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | |
19 from libervia.frontends.quick_frontend import constants | |
20 | |
21 | |
22 class Const(constants.Const): | |
23 | |
24 APP_NAME = "Libervia TUI" | |
25 APP_COMPONENT = "TUI" | |
26 APP_NAME_ALT = "LiberviaTUI" | |
27 APP_NAME_FILE = "libervia_tui" | |
28 CONFIG_SECTION = APP_COMPONENT.lower() | |
29 PALETTE = [ | |
30 ("title", "black", "light gray", "standout,underline"), | |
31 ("title_focus", "white,bold", "light gray", "standout,underline"), | |
32 ("selected", "default", "dark red"), | |
33 ("selected_focus", "default,bold", "dark red"), | |
34 ("default", "default", "default"), | |
35 ("default_focus", "default,bold", "default"), | |
36 ("cl_notifs", "yellow", "default"), | |
37 ("cl_notifs_focus", "yellow,bold", "default"), | |
38 ("cl_mention", "light red", "default"), | |
39 ("cl_mention_focus", "dark red,bold", "default"), | |
40 # Messages | |
41 ("date", "light gray", "default"), | |
42 ("my_nick", "dark red,bold", "default"), | |
43 ("other_nick", "dark cyan,bold", "default"), | |
44 ("info_msg", "yellow", "default", "bold"), | |
45 ("msg_lang", "dark cyan", "default"), | |
46 ("msg_mention", "dark red, bold", "default"), | |
47 ("msg_status_received", "light green, bold", "default"), | |
48 ("menubar", "light gray,bold", "dark red"), | |
49 ("menubar_focus", "light gray,bold", "dark green"), | |
50 ("selected_menu", "light gray,bold", "dark green"), | |
51 ("menuitem", "light gray,bold", "dark red"), | |
52 ("menuitem_focus", "light gray,bold", "dark green"), | |
53 ("notifs", "black,bold", "yellow"), | |
54 ("notifs_focus", "dark red", "yellow"), | |
55 ("card_neutral", "dark gray", "white", "standout,underline"), | |
56 ("card_neutral_selected", "dark gray", "dark green", "standout,underline"), | |
57 ("card_special", "brown", "white", "standout,underline"), | |
58 ("card_special_selected", "brown", "dark green", "standout,underline"), | |
59 ("card_red", "dark red", "white", "standout,underline"), | |
60 ("card_red_selected", "dark red", "dark green", "standout,underline"), | |
61 ("card_black", "black", "white", "standout,underline"), | |
62 ("card_black_selected", "black", "dark green", "standout,underline"), | |
63 ("directory", "dark cyan, bold", "default"), | |
64 ("directory_focus", "dark cyan, bold", "dark green"), | |
65 ("separator", "brown", "default"), | |
66 ("warning", "light red", "default"), | |
67 ("progress_normal", "default", "brown"), | |
68 ("progress_complete", "default", "dark green"), | |
69 ("show_disconnected", "dark gray", "default"), | |
70 ("show_normal", "default", "default"), | |
71 ("show_normal_focus", "default, bold", "default"), | |
72 ("show_chat", "dark green", "default"), | |
73 ("show_chat_focus", "dark green, bold", "default"), | |
74 ("show_away", "brown", "default"), | |
75 ("show_away_focus", "brown, bold", "default"), | |
76 ("show_dnd", "dark red", "default"), | |
77 ("show_dnd_focus", "dark red, bold", "default"), | |
78 ("show_xa", "dark red", "default"), | |
79 ("show_xa_focus", "dark red, bold", "default"), | |
80 ("resource", "light blue", "default"), | |
81 ("resource_main", "dark blue", "default"), | |
82 ("status", "yellow", "default"), | |
83 ("status_focus", "yellow, bold", "default"), | |
84 ("param_selected", "default, bold", "dark red"), | |
85 ("table_selected", "default, bold", "default"), | |
86 ] | |
87 PRESENCE = { | |
88 "unavailable": ("⨯", "show_disconnected"), | |
89 "": ("✔", "show_normal"), | |
90 "chat": ("✆", "show_chat"), | |
91 "away": ("✈", "show_away"), | |
92 "dnd": ("✖", "show_dnd"), | |
93 "xa": ("☄", "show_xa"), | |
94 } | |
95 LOG_OPT_SECTION = APP_NAME.lower() | |
96 LOG_OPT_OUTPUT = ( | |
97 "output", | |
98 constants.Const.LOG_OPT_OUTPUT_SEP + constants.Const.LOG_OPT_OUTPUT_MEMORY, | |
99 ) | |
100 CONFIG_OPT_KEY_PREFIX = "KEY_" | |
101 | |
102 MENU_ID_MAIN = "MAIN_MENU" | |
103 MENU_ID_WIDGET = "WIDGET_MENU" | |
104 | |
105 MODE_NORMAL = "NORMAL" | |
106 MODE_INSERTION = "INSERTION" | |
107 MODE_COMMAND = "COMMAND" | |
108 | |
109 GROUP_DATA_FOLDED = "folded" |