Skip to content

Commit 95c3d74

Browse files
added four themes to the themes directory
1 parent f88174e commit 95c3d74

File tree

9 files changed

+131
-140
lines changed

9 files changed

+131
-140
lines changed

zulipterminal/cli/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import configparser
77
import logging
88
import os
9+
import re
910
import stat
1011
import sys
1112
import traceback
1213
from enum import Enum
13-
import re
14-
from os import path , remove
14+
from os import path, remove
1515
from typing import Dict, List, NamedTuple, Optional, Tuple
1616

1717
import requests

zulipterminal/config/themes.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
from zulipterminal.config.color import Background, term16
99
from zulipterminal.themes import (
10-
gruvbox_dark_high_contrast,
1110
gruvbox_dark,
12-
gruvbox_light,
13-
zt_blue, zt_dark,
14-
zt_light,
11+
gruvbox_dark_high_contrast,
1512
gruvbox_dark_low_contrast,
13+
gruvbox_light,
1614
gruvbox_light_high_contrast,
17-
gruvbox_light_low_contrast
18-
15+
gruvbox_light_low_contrast,
16+
zt_blue,
17+
zt_dark,
18+
zt_light,
1919
)
2020

2121

@@ -109,7 +109,7 @@
109109
"gruvbox_dark_high_contrast": gruvbox_dark_high_contrast,
110110
"gruvbox_dark_low_contrast": gruvbox_dark_low_contrast,
111111
"gruvbox_light_high_contrast": gruvbox_light_high_contrast,
112-
"gruvbox_light_low_contrast": gruvbox_light_low_contrast,
112+
"gruvbox_light_low_contrast": gruvbox_light_low_contrast,
113113
# "sample": sample,
114114
}
115115

zulipterminal/core.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
Defines the `Controller`, which sets up the `Model`, `View`, and how they interact
33
"""
44

5-
import os
65
import itertools
6+
import os
77
import signal
88
import sys
99
import time
1010
import webbrowser
11-
import requests
1211
from functools import partial
1312
from platform import platform
1413
from types import TracebackType
1514
from typing import Any, Dict, List, Optional, Tuple, Type, Union
16-
import subprocess
17-
import configparser
1815

1916
import pyperclip
2017
import urwid
@@ -101,19 +98,7 @@ def __init__(
10198

10299
self.show_loading()
103100
client_identifier = f"ZulipTerminal/{ZT_VERSION} {platform()}"
104-
105-
api_key = ''
106-
config_file = os.path.expanduser(config_file)
107-
if os.path.exists(config_file):
108-
config = configparser.ConfigParser()
109-
config.read(config_file)
110-
api_config = dict(config.items('api'))
111-
api_key = api_config['key']
112-
command = ['python3', os.path.join(os.path.dirname(__file__), '../tools/encrypt.py'), '--decrypt', api_key]
113-
114-
decryped_key = subprocess.run(command, stdout=subprocess.PIPE, text=True)
115-
decrypted_key= decryped_key.stdout.strip()
116-
self.client = zulip.Client(config_file=config_file, client=client_identifier,api_key=decrypted_key)
101+
self.client = zulip.Client(config_file=config_file, client=client_identifier)
117102
self.model = Model(self)
118103
self.view = View(self)
119104
# Start polling for events after view is rendered.

zulipterminal/themes/gruvbox_dark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from zulipterminal.config.color import DefaultBoldColor as Color
1111

1212

13-
# fmt: off
13+
# fmt: off
1414
STYLES = {
1515
# style_name : foreground background
1616
None : (Color.WHITE, Background.COLOR),
@@ -88,4 +88,4 @@
8888
}
8989
}
9090
}
91-
# fmt: on
91+
# fmt: on

zulipterminal/themes/gruvbox_dark_high_contrast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@
9898
}
9999
}
100100
}
101-
# fmt: on
101+
# fmt: on

zulipterminal/themes/gruvbox_dark_low_contrast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@
9898
}
9999
}
100100
}
101-
# fmt: on
101+
# fmt: on
Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"""
2-
GRUVBOX LIGHT HIGH CONTRAST
3-
----------------------------
2+
CUSTOM HIGH CONTRAST
3+
---------------------
44
5-
For syntax highlighting, this theme uses the solarized light styles
6-
from pygments. This could be updated to a gruvbox style when the style
7-
is released.
5+
This theme is inspired by the observed colors in the provided screenshot.
6+
It uses a high-contrast color palette for better readability.
87
9-
For further details on themefiles look at the theme contribution guide
8+
For further details on themefiles look at the theme contribution guide.
109
"""
11-
1210
from pygments.styles.solarized import SolarizedLightStyle
1311

1412
from zulipterminal.config.color import Background
@@ -20,68 +18,68 @@
2018
STYLES = {
2119
# style_name : foreground background
2220
None : (Color.DARK0_HARD, Background.COLOR),
23-
'selected' : (Color.LIGHT0_HARD, Color.NEUTRAL_BLUE),
24-
'msg_selected' : (Color.LIGHT0_HARD, Color.NEUTRAL_BLUE),
25-
'header' : (Color.NEUTRAL_BLUE, Color.BRIGHT_BLUE),
26-
'general_narrow' : (Color.LIGHT0_HARD, Color.BRIGHT_BLUE),
21+
'selected' : (Color.LIGHT0_HARD, Color.BRIGHT_YELLOW),
22+
'msg_selected' : (Color.LIGHT0_HARD, Color.BRIGHT_YELLOW),
23+
'header' : (Color.BRIGHT_ORANGE, Color.DARK0_HARD),
24+
'general_narrow' : (Color.LIGHT0_HARD, Color.DARK0_HARD),
2725
'general_bar' : (Color.DARK0_HARD, Background.COLOR),
28-
'msg_sender' : (Color.NEUTRAL_YELLOW__BOLD, Background.COLOR),
29-
'unread' : (Color.NEUTRAL_PURPLE, Background.COLOR),
26+
'msg_sender' : (Color.BRIGHT_GREEN, Background.COLOR),
27+
'unread' : (Color.BRIGHT_RED, Background.COLOR),
3028
'user_active' : (Color.BRIGHT_GREEN, Background.COLOR),
31-
'user_idle' : (Color.NEUTRAL_YELLOW, Background.COLOR),
29+
'user_idle' : (Color.BRIGHT_YELLOW, Background.COLOR),
3230
'user_offline' : (Color.DARK0_HARD, Background.COLOR),
3331
'user_inactive' : (Color.DARK0_HARD, Background.COLOR),
3432
'user_bot' : (Color.DARK0_HARD, Background.COLOR),
35-
'title' : (Color.DARK0_HARD__BOLD, Background.COLOR),
36-
'column_title' : (Color.DARK0_HARD__BOLD, Background.COLOR),
33+
'title' : (Color.DARK0_HARD, Background.COLOR),
34+
'column_title' : (Color.DARK0_HARD, Background.COLOR),
3735
'time' : (Color.BRIGHT_BLUE, Background.COLOR),
3836
'bar' : (Color.DARK0_HARD, Color.GRAY_244),
39-
'msg_emoji' : (Color.NEUTRAL_PURPLE, Background.COLOR),
40-
'reaction' : (Color.NEUTRAL_PURPLE__BOLD, Background.COLOR),
41-
'reaction_mine' : (Color.LIGHT0_HARD, Color.NEUTRAL_PURPLE),
42-
'msg_heading' : (Color.LIGHT0_HARD__BOLD, Color.BRIGHT_GREEN),
37+
'msg_emoji' : (Color.BRIGHT_PURPLE, Background.COLOR),
38+
'reaction' : (Color.BRIGHT_PURPLE, Background.COLOR),
39+
'reaction_mine' : (Color.LIGHT0_HARD, Color.BRIGHT_PURPLE),
40+
'msg_heading' : (Color.LIGHT0_HARD, Color.BRIGHT_GREEN),
4341
'msg_math' : (Color.LIGHT0_HARD, Color.GRAY_244),
44-
'msg_mention' : (Color.BRIGHT_RED__BOLD, Background.COLOR),
42+
'msg_mention' : (Color.BRIGHT_RED, Background.COLOR),
4543
'msg_link' : (Color.BRIGHT_BLUE, Background.COLOR),
46-
'msg_link_index' : (Color.BRIGHT_BLUE__BOLD, Background.COLOR),
47-
'msg_quote' : (Color.NEUTRAL_YELLOW, Background.COLOR),
48-
'msg_bold' : (Color.DARK0_HARD__BOLD, Background.COLOR),
44+
'msg_link_index' : (Color.BRIGHT_BLUE, Background.COLOR),
45+
'msg_quote' : (Color.BRIGHT_YELLOW, Background.COLOR),
46+
'msg_bold' : (Color.DARK0_HARD, Background.COLOR),
4947
'msg_time' : (Color.LIGHT0_HARD, Color.DARK0_HARD),
50-
'footer' : (Color.LIGHT0_HARD, Color.LIGHT4),
48+
'footer' : (Color.LIGHT0_HARD, Color.DARK2),
5149
'footer_contrast' : (Color.DARK0_HARD, Background.COLOR),
52-
'starred' : (Color.BRIGHT_RED__BOLD, Background.COLOR),
53-
'unread_count' : (Color.NEUTRAL_YELLOW, Background.COLOR),
54-
'starred_count' : (Color.LIGHT4, Background.COLOR),
55-
'table_head' : (Color.DARK0_HARD__BOLD, Background.COLOR),
50+
'starred' : (Color.BRIGHT_RED, Background.COLOR),
51+
'unread_count' : (Color.BRIGHT_YELLOW, Background.COLOR),
52+
'starred_count' : (Color.DARK2, Background.COLOR),
53+
'table_head' : (Color.DARK0_HARD, Background.COLOR),
5654
'filter_results' : (Color.LIGHT0_HARD, Color.BRIGHT_GREEN),
5755
'edit_topic' : (Color.LIGHT0_HARD, Color.GRAY_244),
5856
'edit_tag' : (Color.LIGHT0_HARD, Color.GRAY_244),
59-
'edit_author' : (Color.NEUTRAL_YELLOW, Background.COLOR),
57+
'edit_author' : (Color.BRIGHT_YELLOW, Background.COLOR),
6058
'edit_time' : (Color.BRIGHT_BLUE, Background.COLOR),
6159
'current_user' : (Color.DARK0_HARD, Background.COLOR),
6260
'muted' : (Color.BRIGHT_BLUE, Background.COLOR),
6361
'popup_border' : (Color.DARK0_HARD, Background.COLOR),
64-
'popup_category' : (Color.BRIGHT_BLUE__BOLD, Background.COLOR),
62+
'popup_category' : (Color.BRIGHT_BLUE, Background.COLOR),
6563
'popup_contrast' : (Color.LIGHT0_HARD, Color.GRAY_244),
66-
'popup_important' : (Color.BRIGHT_RED__BOLD, Background.COLOR),
64+
'popup_important' : (Color.BRIGHT_RED, Background.COLOR),
6765
'widget_disabled' : (Color.GRAY_244, Background.COLOR),
6866
'area:help' : (Color.LIGHT0_HARD, Color.BRIGHT_GREEN),
69-
'area:msg' : (Color.LIGHT0_HARD, Color.NEUTRAL_PURPLE),
67+
'area:msg' : (Color.LIGHT0_HARD, Color.BRIGHT_PURPLE),
7068
'area:stream' : (Color.LIGHT0_HARD, Color.BRIGHT_BLUE),
7169
'area:error' : (Color.LIGHT0_HARD, Color.BRIGHT_RED),
7270
'area:user' : (Color.LIGHT0_HARD, Color.BRIGHT_YELLOW),
7371
'search_error' : (Color.BRIGHT_RED, Background.COLOR),
7472
'task:success' : (Color.LIGHT0_HARD, Color.BRIGHT_GREEN),
7573
'task:error' : (Color.LIGHT0_HARD, Color.BRIGHT_RED),
76-
'task:warning' : (Color.LIGHT0_HARD, Color.NEUTRAL_PURPLE),
74+
'task:warning' : (Color.LIGHT0_HARD, Color.BRIGHT_PURPLE),
7775
'ui_code' : (Color.LIGHT0_HARD, Color.DARK0_HARD),
7876
}
7977

8078
META = {
8179
'background': Color.LIGHT0_HARD,
8280
'pygments': {
8381
'styles' : SolarizedLightStyle().styles,
84-
'background': 'h230',
82+
'background': '#ffffff',
8583
'overrides' : {
8684
'c' : '#586e75, italics', # base01
8785
'cp' : '#d33682', # magenta
@@ -98,4 +96,4 @@
9896
}
9997
}
10098
}
101-
# fmt: on
99+
# fmt: on

zulipterminal/themes/gruvbox_light_low_contrast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@
9898
}
9999
}
100100
}
101-
# fmt: on
101+
# fmt: on

0 commit comments

Comments
 (0)