Improve colorscheme for Kitty
parent
cb957d3b74
commit
07f03b97d9
|
@ -1 +1 @@
|
||||||
colorscheme.dark.conf
|
colorscheme.greyscale-dark.conf
|
|
@ -1,26 +1,22 @@
|
||||||
cursor #a3a3a3
|
cursor_text_color #073642
|
||||||
|
cursor #839496
|
||||||
cursor_text_color background
|
foreground #839496
|
||||||
|
background #002b36
|
||||||
foreground #999999
|
selection_foreground #93a1a1
|
||||||
background #202020
|
selection_background #073642
|
||||||
|
color0 #073642
|
||||||
selection_foreground #a3a3a3
|
|
||||||
selection_background #606060
|
|
||||||
|
|
||||||
color0 #2d2d2d
|
|
||||||
color1 #dc322f
|
color1 #dc322f
|
||||||
color2 #859900
|
color2 #859900
|
||||||
color3 #b58900
|
color3 #b58900
|
||||||
color4 #268bd2
|
color4 #268bd2
|
||||||
color5 #d33682
|
color5 #d33682
|
||||||
color6 #2aa198
|
color6 #2aa198
|
||||||
color7 #f0f0f0
|
color7 #eee8d5
|
||||||
|
color8 #002b36
|
||||||
color9 #cb4b16
|
color9 #cb4b16
|
||||||
color8 #202020
|
color10 #586e75
|
||||||
color10 #606060
|
color11 #657b83
|
||||||
color11 #6d6d6D
|
color12 #839496
|
||||||
color12 #999999
|
|
||||||
color13 #6c71c4
|
color13 #6c71c4
|
||||||
color14 #a3a3a3
|
color14 #93a1a1
|
||||||
color15 #ffffff
|
color15 #fdf6e3
|
||||||
|
|
|
@ -1,42 +1,136 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
def parse_line(line):
|
import sys
|
||||||
cleaned = line.strip()
|
import re
|
||||||
split = cleaned.split(maxsplit=1)
|
|
||||||
if not split:
|
|
||||||
return None, None
|
|
||||||
if len(split) < 2:
|
|
||||||
return split[0], None
|
|
||||||
return split
|
|
||||||
|
|
||||||
def parse_variables(section):
|
|
||||||
parsed = {}
|
COLORSCHEMES = {
|
||||||
with open("colorscheme.variables.conf", "r") as f:
|
"dark": {
|
||||||
current_section = None
|
"theme": "solarized",
|
||||||
for line in f:
|
"palette": "solarized",
|
||||||
key, value = parse_line(line)
|
"cursor_text_color": "{base02}",
|
||||||
if key == "!":
|
"cursor": "{base0}",
|
||||||
current_section = value
|
"foreground": "{base0}",
|
||||||
|
"background": "{base03}",
|
||||||
|
"selection_foreground": "{base1}",
|
||||||
|
"selection_background": "{base02}",
|
||||||
|
},
|
||||||
|
"light": {
|
||||||
|
"theme": "solarized",
|
||||||
|
"palette": "solarized",
|
||||||
|
"cursor_text_color": "{base2}",
|
||||||
|
"cursor": "{base00}",
|
||||||
|
"foreground": "{base00}",
|
||||||
|
"background": "{base3}",
|
||||||
|
"selection_foreground": "{base01}",
|
||||||
|
"selection_background": "{base2}",
|
||||||
|
},
|
||||||
|
"greyscale-dark": {
|
||||||
|
"theme": "solarized",
|
||||||
|
"palette": "solarized-greyscale",
|
||||||
|
"cursor_text_color": "{base02}",
|
||||||
|
"cursor": "{base0}",
|
||||||
|
"foreground": "{base0}",
|
||||||
|
"background": "{base03}",
|
||||||
|
"selection_foreground": "{base1}",
|
||||||
|
"selection_background": "{base02}",
|
||||||
|
},
|
||||||
|
"greyscale-light": {
|
||||||
|
"theme": "solarized",
|
||||||
|
"palette": "solarized-greyscale",
|
||||||
|
"cursor_text_color": "{base2}",
|
||||||
|
"cursor": "{base00}",
|
||||||
|
"foreground": "{base00}",
|
||||||
|
"background": "{base3}",
|
||||||
|
"selection_foreground": "{base01}",
|
||||||
|
"selection_background": "{base2}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
THEMES = {
|
||||||
|
"solarized": {
|
||||||
|
"color0": "{base02}",
|
||||||
|
"color1": "{red}",
|
||||||
|
"color2": "{green}",
|
||||||
|
"color3": "{yellow}",
|
||||||
|
"color4": "{blue}",
|
||||||
|
"color5": "{magenta}",
|
||||||
|
"color6": "{cyan}",
|
||||||
|
"color7": "{base2}",
|
||||||
|
"color8": "{base03}",
|
||||||
|
"color9": "{orange}",
|
||||||
|
"color10": "{base01}",
|
||||||
|
"color11": "{base00}",
|
||||||
|
"color12": "{base0}",
|
||||||
|
"color13": "{violet}",
|
||||||
|
"color14": "{base1}",
|
||||||
|
"color15": "{base3}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
TABLE_HEADER = """
|
||||||
|
" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB
|
||||||
|
" --------- ------- ---- ------- ----------- ---------- ----------- -----------
|
||||||
|
""".strip().split(
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def read_table(f):
|
||||||
|
match_window = []
|
||||||
|
# Read until we find the table header
|
||||||
|
for line in f:
|
||||||
|
line = line.strip()
|
||||||
|
match_window.append(line)
|
||||||
|
if len(match_window) <= len(TABLE_HEADER):
|
||||||
|
continue
|
||||||
|
match_window.pop(0)
|
||||||
|
if match_window == TABLE_HEADER:
|
||||||
|
break
|
||||||
|
# Read table
|
||||||
|
for line in f:
|
||||||
|
parts = [p for p in re.split("[ \"']+", line) if len(p) > 0]
|
||||||
|
if len(parts) < 3:
|
||||||
|
break
|
||||||
|
yield (parts[0], parts[1])
|
||||||
|
|
||||||
|
|
||||||
|
def read_palette(filename):
|
||||||
|
palette = {}
|
||||||
|
with open(filename, "r") as f:
|
||||||
|
for name, value in read_table(f):
|
||||||
|
palette[name] = value
|
||||||
|
return palette
|
||||||
|
|
||||||
|
|
||||||
|
PALETTES = {
|
||||||
|
"solarized": read_palette("../../.config/nvim/colors/solarized.vim"),
|
||||||
|
"solarized-greyscale": {
|
||||||
|
**read_palette("../../.config/nvim/colors/solarized.vim"),
|
||||||
|
**{
|
||||||
|
"base03": "#202020",
|
||||||
|
"base02": "#2d2d2d",
|
||||||
|
"base01": "#606060",
|
||||||
|
"base00": "#6d6d6d",
|
||||||
|
"base0": "#969696",
|
||||||
|
"base1": "#a0a0a0",
|
||||||
|
"base2": "#eaeaea",
|
||||||
|
"base3": "#f9f9f9",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for name, scheme in COLORSCHEMES.items():
|
||||||
|
theme = THEMES[scheme["theme"]]
|
||||||
|
palette = PALETTES[scheme["palette"]]
|
||||||
|
|
||||||
|
with open(f"colorscheme.{name}.conf", "w") as f:
|
||||||
|
for name, value in scheme.items():
|
||||||
|
if name in ("theme", "palette"):
|
||||||
continue
|
continue
|
||||||
if current_section == section:
|
s = f"{name} {value.format(**palette)}\n"
|
||||||
parsed[key] = value
|
f.write(s)
|
||||||
del parsed[None]
|
for name, value in theme.items():
|
||||||
return parsed
|
s = f"{name} {value.format(**palette)}\n"
|
||||||
|
f.write(s)
|
||||||
common = parse_variables("Common")
|
|
||||||
for scheme in ("Dark", "Light"):
|
|
||||||
variables = parse_variables(scheme)
|
|
||||||
|
|
||||||
with open("colorscheme.template.conf", "r") as f:
|
|
||||||
template = f.read()
|
|
||||||
|
|
||||||
rewritten = template
|
|
||||||
for key, value in variables.items():
|
|
||||||
rewritten = rewritten.replace(key, value)
|
|
||||||
for key, value in common.items():
|
|
||||||
rewritten = rewritten.replace(key, value)
|
|
||||||
|
|
||||||
save_as = "colorscheme.{}.conf".format(scheme.lower())
|
|
||||||
with open(save_as, "w") as f:
|
|
||||||
f.write(rewritten)
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
cursor_text_color #2d2d2d
|
||||||
|
cursor #969696
|
||||||
|
foreground #969696
|
||||||
|
background #202020
|
||||||
|
selection_foreground #a0a0a0
|
||||||
|
selection_background #2d2d2d
|
||||||
|
color0 #2d2d2d
|
||||||
|
color1 #dc322f
|
||||||
|
color2 #859900
|
||||||
|
color3 #b58900
|
||||||
|
color4 #268bd2
|
||||||
|
color5 #d33682
|
||||||
|
color6 #2aa198
|
||||||
|
color7 #eaeaea
|
||||||
|
color8 #202020
|
||||||
|
color9 #cb4b16
|
||||||
|
color10 #606060
|
||||||
|
color11 #6d6d6d
|
||||||
|
color12 #969696
|
||||||
|
color13 #6c71c4
|
||||||
|
color14 #a0a0a0
|
||||||
|
color15 #f9f9f9
|
|
@ -0,0 +1,22 @@
|
||||||
|
cursor_text_color #eaeaea
|
||||||
|
cursor #6d6d6d
|
||||||
|
foreground #6d6d6d
|
||||||
|
background #f9f9f9
|
||||||
|
selection_foreground #606060
|
||||||
|
selection_background #eaeaea
|
||||||
|
color0 #2d2d2d
|
||||||
|
color1 #dc322f
|
||||||
|
color2 #859900
|
||||||
|
color3 #b58900
|
||||||
|
color4 #268bd2
|
||||||
|
color5 #d33682
|
||||||
|
color6 #2aa198
|
||||||
|
color7 #eaeaea
|
||||||
|
color8 #202020
|
||||||
|
color9 #cb4b16
|
||||||
|
color10 #606060
|
||||||
|
color11 #6d6d6d
|
||||||
|
color12 #969696
|
||||||
|
color13 #6c71c4
|
||||||
|
color14 #a0a0a0
|
||||||
|
color15 #f9f9f9
|
|
@ -1,26 +1,22 @@
|
||||||
cursor #606060
|
cursor_text_color #eee8d5
|
||||||
|
cursor #657b83
|
||||||
cursor_text_color background
|
foreground #657b83
|
||||||
|
background #fdf6e3
|
||||||
foreground #6d6d6d
|
selection_foreground #586e75
|
||||||
background #dfdfdf
|
selection_background #eee8d5
|
||||||
|
color0 #073642
|
||||||
selection_foreground #606060
|
|
||||||
selection_background #9d9d9d
|
|
||||||
|
|
||||||
color0 #2d2d2d
|
|
||||||
color1 #dc322f
|
color1 #dc322f
|
||||||
color2 #859900
|
color2 #859900
|
||||||
color3 #b58900
|
color3 #b58900
|
||||||
color4 #268bd2
|
color4 #268bd2
|
||||||
color5 #d33682
|
color5 #d33682
|
||||||
color6 #2aa198
|
color6 #2aa198
|
||||||
color7 #f0f0f0
|
color7 #eee8d5
|
||||||
|
color8 #002b36
|
||||||
color9 #cb4b16
|
color9 #cb4b16
|
||||||
color8 #202020
|
color10 #586e75
|
||||||
color10 #606060
|
color11 #657b83
|
||||||
color11 #6d6d6D
|
color12 #839496
|
||||||
color12 #999999
|
|
||||||
color13 #6c71c4
|
color13 #6c71c4
|
||||||
color14 #a3a3a3
|
color14 #93a1a1
|
||||||
color15 #ffffff
|
color15 #fdf6e3
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
cursor S_base1
|
|
||||||
|
|
||||||
cursor_text_color background
|
|
||||||
|
|
||||||
foreground S_base0
|
|
||||||
background S_base03
|
|
||||||
|
|
||||||
selection_foreground S_base1
|
|
||||||
selection_background S_base01
|
|
||||||
|
|
||||||
color0 S_base02
|
|
||||||
color1 S_red
|
|
||||||
color2 S_green
|
|
||||||
color3 S_yellow
|
|
||||||
color4 S_blue
|
|
||||||
color5 S_magenta
|
|
||||||
color6 S_cyan
|
|
||||||
color7 S_base2
|
|
||||||
color9 S_orange
|
|
||||||
color8 S_base03
|
|
||||||
color10 S_base01
|
|
||||||
color11 S_base00
|
|
||||||
color12 S_base0
|
|
||||||
color13 S_violet
|
|
||||||
color14 S_base1
|
|
||||||
color15 S_base3
|
|
|
@ -1,90 +0,0 @@
|
||||||
|
|
||||||
! Common
|
|
||||||
|
|
||||||
S_yellow #b58900
|
|
||||||
S_orange #cb4b16
|
|
||||||
S_red #dc322f
|
|
||||||
S_magenta #d33682
|
|
||||||
S_violet #6c71c4
|
|
||||||
S_blue #268bd2
|
|
||||||
S_cyan #2aa198
|
|
||||||
S_green #859900
|
|
||||||
|
|
||||||
! Dark
|
|
||||||
|
|
||||||
S_base03 #353535 ! 0x15
|
|
||||||
S_base03 #202020
|
|
||||||
S_base02 #424242
|
|
||||||
S_base02 #2d2d2d
|
|
||||||
S_base01 #757575
|
|
||||||
S_base01 #606060
|
|
||||||
S_base00 #828282
|
|
||||||
S_base00 #6d6d6D
|
|
||||||
S_base0 #969696 ! 0x3
|
|
||||||
S_base0 #999999
|
|
||||||
S_base1 #a0a0a0
|
|
||||||
S_base1 #a3a3a3
|
|
||||||
S_base2 #ededed
|
|
||||||
S_base2 #f0f0f0
|
|
||||||
S_base3 #fcfcfc
|
|
||||||
S_base3 #ffffff
|
|
||||||
|
|
||||||
! Light-Alt
|
|
||||||
|
|
||||||
S_base03 #fcfcfc ! 0x3
|
|
||||||
S_base03 #f9f9f9
|
|
||||||
S_base02 #ededed
|
|
||||||
S_base02 #eaeaea
|
|
||||||
S_base01 #a0a0a0
|
|
||||||
S_base01 #9d9d9d
|
|
||||||
S_base00 #969696
|
|
||||||
S_base00 #939393
|
|
||||||
S_base0 #828282 ! 0x15
|
|
||||||
S_base0 #6d6d6d
|
|
||||||
S_base1 #757575
|
|
||||||
S_base1 #606060
|
|
||||||
S_base2 #424242
|
|
||||||
S_base2 #2d2d2d
|
|
||||||
S_base3 #353535
|
|
||||||
S_base3 #202020
|
|
||||||
|
|
||||||
! Light
|
|
||||||
|
|
||||||
S_base03 #fcfcfc ! 0x1d
|
|
||||||
S_base03 #dfdfdf
|
|
||||||
S_base02 #ededed
|
|
||||||
S_base02 #eaeaea
|
|
||||||
S_base01 #a0a0a0
|
|
||||||
S_base01 #9d9d9d
|
|
||||||
S_base00 #969696
|
|
||||||
S_base00 #939393
|
|
||||||
S_base0 #828282 ! 0x15
|
|
||||||
S_base0 #6d6d6d
|
|
||||||
S_base1 #757575
|
|
||||||
S_base1 #606060
|
|
||||||
S_base2 #424242
|
|
||||||
S_base2 #2d2d2d
|
|
||||||
S_base3 #353535
|
|
||||||
S_base3 #202020
|
|
||||||
|
|
||||||
! Solarized-Dark
|
|
||||||
|
|
||||||
S_base03 #002b36
|
|
||||||
S_base02 #073642
|
|
||||||
S_base01 #586e75
|
|
||||||
S_base00 #657b83
|
|
||||||
S_base0 #839496
|
|
||||||
S_base1 #93a1a1
|
|
||||||
S_base2 #eee8d5
|
|
||||||
S_base3 #fdf6e3
|
|
||||||
|
|
||||||
! Solarized-Light
|
|
||||||
|
|
||||||
S_base03 #fdf6e3
|
|
||||||
S_base02 #eee8d5
|
|
||||||
S_base01 #93a1a1
|
|
||||||
S_base00 #839496
|
|
||||||
S_base0 #657b83
|
|
||||||
S_base1 #586e75
|
|
||||||
S_base2 #073642
|
|
||||||
S_base3 #002b36
|
|
|
@ -1,29 +1,31 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
print('Usage: {} fontawesome_icons.json'.format(sys.argv[0]))
|
print("Usage: {} fontawesome_icons.json".format(sys.argv[0]))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
with open(sys.argv[1], 'r') as f:
|
with open(sys.argv[1], "r") as f:
|
||||||
obj = json.load(f)
|
obj = json.load(f)
|
||||||
|
|
||||||
points = []
|
points = []
|
||||||
points_brands = []
|
points_brands = []
|
||||||
for icon, data in obj.items():
|
for icon, data in obj.items():
|
||||||
styles = data['styles']
|
styles = data["styles"]
|
||||||
u = data['unicode']
|
u = data["unicode"]
|
||||||
ufmt = 'U+{}'.format(u.upper())
|
ufmt = "U+{}".format(u.upper())
|
||||||
if "brands" in styles:
|
if "brands" in styles:
|
||||||
points_brands.append(ufmt)
|
points_brands.append(ufmt)
|
||||||
continue
|
continue
|
||||||
points.append(ufmt)
|
points.append(ufmt)
|
||||||
|
|
||||||
pointsfmt = ','.join(points)
|
pointsfmt = ",".join(points)
|
||||||
configline = 'symbol_map {} Font Awesome 5 Pro'.format(pointsfmt)
|
configline = "symbol_map {} Font Awesome 5 Pro".format(pointsfmt)
|
||||||
|
|
||||||
pointsfmt_brands = ','.join(points_brands)
|
pointsfmt_brands = ",".join(points_brands)
|
||||||
configline_brands = 'symbol_map {} Font Awesome 5 Brands'.format(pointsfmt_brands)
|
configline_brands = "symbol_map {} Font Awesome 5 Brands".format(pointsfmt_brands)
|
||||||
|
|
||||||
print(configline)
|
print(configline)
|
||||||
print(configline_brands)
|
print(configline_brands)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
# font_family IBM Plex Mono
|
# font_family IBM Plex Mono
|
||||||
# font_family Source Code Pro
|
# font_family Source Code Pro
|
||||||
font_family Fira Code Retina
|
font_family Fira Code
|
||||||
bold_font Fira Code Bold
|
bold_font Fira Code Bold
|
||||||
# bold_font auto
|
# bold_font auto
|
||||||
italic_font IBM Plex Mono Italic
|
italic_font IBM Plex Mono Italic
|
||||||
|
@ -32,7 +32,7 @@ font_size 11.0
|
||||||
|
|
||||||
#: Font size (in pts)
|
#: Font size (in pts)
|
||||||
|
|
||||||
adjust_line_height 115%
|
adjust_line_height 130%
|
||||||
# adjust_column_width 0
|
# adjust_column_width 0
|
||||||
|
|
||||||
#: Change the size of each character cell kitty renders. You can use
|
#: Change the size of each character cell kitty renders. You can use
|
||||||
|
@ -974,11 +974,11 @@ macos_show_window_title_in window
|
||||||
#: You can change the font size for all top-level kitty OS windows at
|
#: You can change the font size for all top-level kitty OS windows at
|
||||||
#: a time or only the current one.
|
#: a time or only the current one.
|
||||||
|
|
||||||
# map kitty_mod+equal change_font_size all +2.0
|
map kitty_mod+f>plus change_font_size all +2.0
|
||||||
# map cmd+plus change_font_size all +2.0
|
# map cmd+plus change_font_size all +2.0
|
||||||
# map kitty_mod+minus change_font_size all -2.0
|
map kitty_mod+f>minus change_font_size all -2.0
|
||||||
# map cmd+minus change_font_size all -2.0
|
# map cmd+minus change_font_size all -2.0
|
||||||
# map kitty_mod+backspace change_font_size all 0
|
map kitty_mod+f>backspace change_font_size all 0
|
||||||
# map cmd+0 change_font_size all 0
|
# map cmd+0 change_font_size all 0
|
||||||
|
|
||||||
#: To setup shortcuts for specific font sizes::
|
#: To setup shortcuts for specific font sizes::
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
let s:terms_italic=[
|
let s:terms_italic=[
|
||||||
\"rxvt",
|
\"rxvt",
|
||||||
\"gnome-terminal",
|
\"gnome-terminal",
|
||||||
|
\"xterm-kitty",
|
||||||
\"iTerm.app"
|
\"iTerm.app"
|
||||||
\]
|
\]
|
||||||
" For reference only, terminals are known to be incomptible.
|
" For reference only, terminals are known to be incomptible.
|
||||||
|
@ -150,6 +151,9 @@ if has("gui_running")
|
||||||
else
|
else
|
||||||
let s:terminal_italic=0 " terminals will be guilty until proven compatible
|
let s:terminal_italic=0 " terminals will be guilty until proven compatible
|
||||||
for term in s:terms_italic
|
for term in s:terms_italic
|
||||||
|
if $TERM =~ term
|
||||||
|
let s:terminal_italic=1
|
||||||
|
endif
|
||||||
if $TERM_PROGRAM =~ term
|
if $TERM_PROGRAM =~ term
|
||||||
let s:terminal_italic=1
|
let s:terminal_italic=1
|
||||||
endif
|
endif
|
||||||
|
|
31
.zshrc
31
.zshrc
|
@ -31,8 +31,8 @@ if [[ -f "$HOME/.deno" ]]; then
|
||||||
export DENO_INSTALL="$HOME/.deno"
|
export DENO_INSTALL="$HOME/.deno"
|
||||||
export PATH="$DENO_INSTALL/bin:$PATH"
|
export PATH="$DENO_INSTALL/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
if [[ -f "$HOME/.gem/ruby/2.6.0/bin" ]]; then
|
if [[ -f "$(which go 2>/dev/null)" ]]; then
|
||||||
export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"
|
export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
if [[ -f "$(which go 2>/dev/null)" ]]; then
|
if [[ -f "$(which go 2>/dev/null)" ]]; then
|
||||||
export PATH="$(go env GOPATH)/bin:$PATH"
|
export PATH="$(go env GOPATH)/bin:$PATH"
|
||||||
|
@ -67,7 +67,9 @@ case "$(uname -s)" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $PLATFORM == macos ]]; then
|
if [[ $PLATFORM == macos ]]; then
|
||||||
export PATH="$HOME/Library/Python/3.8/bin:$PATH"
|
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
|
||||||
|
export PATH="$HOME/Library/Python/3.10/bin:$PATH" # LOL
|
||||||
|
# On Linux, scripts are installed into $HOME/.local/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_term_integration() {}
|
setup_term_integration() {}
|
||||||
|
@ -130,7 +132,7 @@ format_vcs_info() {
|
||||||
echo "$text"
|
echo "$text"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
if [[ $FAST != "true" ]]; then
|
if [[ $FAST != true ]]; then
|
||||||
setup_prompt_vcs
|
setup_prompt_vcs
|
||||||
fi
|
fi
|
||||||
# prompt: return code
|
# prompt: return code
|
||||||
|
@ -198,7 +200,8 @@ setup_prompt_colors() {
|
||||||
PROMPT_COLOR_BLUE=4
|
PROMPT_COLOR_BLUE=4
|
||||||
PROMPT_COLOR_CYAN=6
|
PROMPT_COLOR_CYAN=6
|
||||||
PROMPT_COLOR_GREEN=2
|
PROMPT_COLOR_GREEN=2
|
||||||
if [[ "$LIGHT" == "true" ]]; then
|
PROMPT_COLOR_ALWAYS_BASE3=$PROMPT_COLOR_BASE3
|
||||||
|
if [[ $LIGHT == true ]]; then
|
||||||
PROMPT_COLOR_TEMP03=$PROMPT_COLOR_TEMP03
|
PROMPT_COLOR_TEMP03=$PROMPT_COLOR_TEMP03
|
||||||
PROMPT_COLOR_TEMP02=$PROMPT_COLOR_TEMP02
|
PROMPT_COLOR_TEMP02=$PROMPT_COLOR_TEMP02
|
||||||
PROMPT_COLOR_TEMP01=$PROMPT_COLOR_TEMP01
|
PROMPT_COLOR_TEMP01=$PROMPT_COLOR_TEMP01
|
||||||
|
@ -222,12 +225,12 @@ setup_prompt() {
|
||||||
PROMPT_FMT_ITALIC=$(tput sitm)
|
PROMPT_FMT_ITALIC=$(tput sitm)
|
||||||
PROMPT_FMT_RESET=$(tput sgr 0)
|
PROMPT_FMT_RESET=$(tput sgr 0)
|
||||||
|
|
||||||
PROMPT_USER=$'%{'"$PROMPT_FMT_ITALIC"$'%}%F{'"$PROMPT_COLOR_BASE3"$'}%(!.%K{'"$PROMPT_COLOR_ORANGE"$'}.%K{'"$PROMPT_COLOR_BLUE"$'}) %n'"$PROMPT_USER_MACHINE"$' %k%f%{'"$PROMPT_FMT_RESET"$'%}'
|
PROMPT_USER=$'%{'"$PROMPT_FMT_ITALIC"$'%}%F{'"$PROMPT_COLOR_ALWAYS_BASE3"$'}%(!.%K{'"$PROMPT_COLOR_ORANGE"$'}.%K{'"$PROMPT_COLOR_BLUE"$'}) %n'"$PROMPT_USER_MACHINE"$' %k%f%{'"$PROMPT_FMT_RESET"$'%}'
|
||||||
PROMPT_HISTORY=$'%F{'"$PROMPT_COLOR_BASE01"$'}%{'"$PROMPT_FMT_ITALIC"$'%} %h %{'"$PROMPT_FMT_RESET"$'%}%f'
|
PROMPT_HISTORY=$'%F{'"$PROMPT_COLOR_BASE01"$'} %h %f'
|
||||||
PROMPT_ERROR_PREV=$'$(format_return_code_prev $?)'
|
PROMPT_ERROR_PREV=$'$(format_return_code_prev $?)'
|
||||||
PROMPT_VCS=$'%K{'$PROMPT_COLOR_BASE03$'}$(format_vcs_info $vcs_info_msg_0_)%k'
|
PROMPT_VCS=$'%K{'$PROMPT_COLOR_BASE03$'}$(format_vcs_info $vcs_info_msg_0_)%k'
|
||||||
PROMPT_DIRECTORY=$'%K{'$PROMPT_COLOR_BASE02$'} %2~ %k'
|
PROMPT_DIRECTORY=$'%K{'$PROMPT_COLOR_BASE02$'} %2~ %k'
|
||||||
PROMPT_VI=$'%F{'"$PROMPT_COLOR_BASE3"$'}%{'"$PROMPT_FMT_ITALIC"$'%}$zle_vi_mode_%{'"$PROMPT_FMT_RESET"$'%}%f'
|
PROMPT_VI=$'%F{'"$PROMPT_COLOR_ALWAYS_BASE3"$'}%{'"$PROMPT_FMT_ITALIC"$'%}$zle_vi_mode_%{'"$PROMPT_FMT_RESET"$'%}%f'
|
||||||
RPROMPT="$PROMPT_HISTORY$PROMPT_USER"
|
RPROMPT="$PROMPT_HISTORY$PROMPT_USER"
|
||||||
PROMPT="$PROMPT_VI$PROMPT_VCS$PROMPT_DIRECTORY "
|
PROMPT="$PROMPT_VI$PROMPT_VCS$PROMPT_DIRECTORY "
|
||||||
}
|
}
|
||||||
|
@ -268,15 +271,23 @@ fi
|
||||||
# helper scripts
|
# helper scripts
|
||||||
|
|
||||||
function theme {
|
function theme {
|
||||||
|
case "$2" in
|
||||||
|
g)
|
||||||
|
KITTY_VARIATION=greyscale-
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
KITTY_VARIATION=
|
||||||
|
;;
|
||||||
|
esac
|
||||||
case "$1" in
|
case "$1" in
|
||||||
light)
|
light)
|
||||||
ITERM_PROFILE=Light
|
ITERM_PROFILE=Light
|
||||||
KITTY_THEME=light
|
KITTY_THEME=${KITTY_VARIATION}light
|
||||||
export LIGHT=true
|
export LIGHT=true
|
||||||
;;
|
;;
|
||||||
dark)
|
dark)
|
||||||
ITERM_PROFILE=Default
|
ITERM_PROFILE=Default
|
||||||
KITTY_THEME=dark
|
KITTY_THEME=${KITTY_VARIATION}dark
|
||||||
export LIGHT=false
|
export LIGHT=false
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue