Improve foot configuration
parent
d9a6fd798a
commit
d93d603cae
|
@ -0,0 +1,40 @@
|
||||||
|
font=Fira Code:size=11
|
||||||
|
font-bold=Fira Code:weight=bold:size=11
|
||||||
|
font-italic=IBM Plex Mono:slant=italic:size=11
|
||||||
|
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11
|
||||||
|
line-height=18
|
||||||
|
vertical-letter-offset=2
|
||||||
|
dpi-aware=no
|
||||||
|
pad=20x20
|
||||||
|
resize-delay-ms=500
|
||||||
|
|
||||||
|
[tweak]
|
||||||
|
#render-timer=osd
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
alpha=0.875
|
||||||
|
#cursor_text_color=073642
|
||||||
|
#cursor=839496
|
||||||
|
foreground=839496
|
||||||
|
background=002b36
|
||||||
|
#selection_foreground=93a1a1
|
||||||
|
#selection_background=073642
|
||||||
|
regular0=073642
|
||||||
|
regular1=dc322f
|
||||||
|
regular2=859900
|
||||||
|
regular3=b58900
|
||||||
|
regular4=268bd2
|
||||||
|
regular5=d33682
|
||||||
|
regular6=2aa198
|
||||||
|
regular7=eee8d5
|
||||||
|
bright0=002b36
|
||||||
|
bright1=cb4b16
|
||||||
|
bright2=586e75
|
||||||
|
bright3=657b83
|
||||||
|
bright4=839496
|
||||||
|
bright5=6c71c4
|
||||||
|
bright6=93a1a1
|
||||||
|
bright7=fdf6e3
|
||||||
|
|
||||||
|
[csd]
|
||||||
|
border-width=8
|
|
@ -0,0 +1,138 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
COLORSCHEMES = {
|
||||||
|
"dark": {
|
||||||
|
"theme": "solarized",
|
||||||
|
"palette": "solarized",
|
||||||
|
"cursor_text_color": "{base02}",
|
||||||
|
"cursor": "{base0}",
|
||||||
|
"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("../nvim/colors/solarized.vim"),
|
||||||
|
"solarized-greyscale": {
|
||||||
|
**read_palette("../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"]]
|
||||||
|
|
||||||
|
values = {}
|
||||||
|
for key, value in scheme.items():
|
||||||
|
values[key] = value.format(**palette).replace("#", "")
|
||||||
|
for key, value in theme.items():
|
||||||
|
values[key] = value.format(**palette).replace("#", "")
|
||||||
|
|
||||||
|
tmpl: str
|
||||||
|
with open("foot.ini.tmpl", "r") as f:
|
||||||
|
tmpl = f.read()
|
||||||
|
with open(f"foot.{name}.ini", "w") as f:
|
||||||
|
f.write(tmpl.format(**values))
|
|
@ -0,0 +1,40 @@
|
||||||
|
font=Fira Code:size=11
|
||||||
|
font-bold=Fira Code:weight=bold:size=11
|
||||||
|
font-italic=IBM Plex Mono:slant=italic:size=11
|
||||||
|
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11
|
||||||
|
line-height=18
|
||||||
|
vertical-letter-offset=2
|
||||||
|
dpi-aware=no
|
||||||
|
pad=20x20
|
||||||
|
resize-delay-ms=500
|
||||||
|
|
||||||
|
[tweak]
|
||||||
|
#render-timer=osd
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
alpha=0.875
|
||||||
|
#cursor_text_color=2d2d2d
|
||||||
|
#cursor=969696
|
||||||
|
foreground=969696
|
||||||
|
background=202020
|
||||||
|
#selection_foreground=a0a0a0
|
||||||
|
#selection_background=2d2d2d
|
||||||
|
regular0=2d2d2d
|
||||||
|
regular1=dc322f
|
||||||
|
regular2=859900
|
||||||
|
regular3=b58900
|
||||||
|
regular4=268bd2
|
||||||
|
regular5=d33682
|
||||||
|
regular6=2aa198
|
||||||
|
regular7=eaeaea
|
||||||
|
bright0=202020
|
||||||
|
bright1=cb4b16
|
||||||
|
bright2=606060
|
||||||
|
bright3=6d6d6d
|
||||||
|
bright4=969696
|
||||||
|
bright5=6c71c4
|
||||||
|
bright6=a0a0a0
|
||||||
|
bright7=f9f9f9
|
||||||
|
|
||||||
|
[csd]
|
||||||
|
border-width=8
|
|
@ -0,0 +1,40 @@
|
||||||
|
font=Fira Code:size=11
|
||||||
|
font-bold=Fira Code:weight=bold:size=11
|
||||||
|
font-italic=IBM Plex Mono:slant=italic:size=11
|
||||||
|
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11
|
||||||
|
line-height=18
|
||||||
|
vertical-letter-offset=2
|
||||||
|
dpi-aware=no
|
||||||
|
pad=20x20
|
||||||
|
resize-delay-ms=500
|
||||||
|
|
||||||
|
[tweak]
|
||||||
|
#render-timer=osd
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
alpha=0.875
|
||||||
|
#cursor_text_color={cursor_text_color}
|
||||||
|
#cursor={cursor}
|
||||||
|
foreground={foreground}
|
||||||
|
background={background}
|
||||||
|
#selection_foreground={selection_foreground}
|
||||||
|
#selection_background={selection_background}
|
||||||
|
regular0={color0}
|
||||||
|
regular1={color1}
|
||||||
|
regular2={color2}
|
||||||
|
regular3={color3}
|
||||||
|
regular4={color4}
|
||||||
|
regular5={color5}
|
||||||
|
regular6={color6}
|
||||||
|
regular7={color7}
|
||||||
|
bright0={color8}
|
||||||
|
bright1={color9}
|
||||||
|
bright2={color10}
|
||||||
|
bright3={color11}
|
||||||
|
bright4={color12}
|
||||||
|
bright5={color13}
|
||||||
|
bright6={color14}
|
||||||
|
bright7={color15}
|
||||||
|
|
||||||
|
[csd]
|
||||||
|
border-width=8
|
|
@ -0,0 +1,40 @@
|
||||||
|
font=Fira Code:size=11
|
||||||
|
font-bold=Fira Code:weight=bold:size=11
|
||||||
|
font-italic=IBM Plex Mono:slant=italic:size=11
|
||||||
|
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11
|
||||||
|
line-height=18
|
||||||
|
vertical-letter-offset=2
|
||||||
|
dpi-aware=no
|
||||||
|
pad=20x20
|
||||||
|
resize-delay-ms=500
|
||||||
|
|
||||||
|
[tweak]
|
||||||
|
#render-timer=osd
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
alpha=0.875
|
||||||
|
#cursor_text_color=eee8d5
|
||||||
|
#cursor=657b83
|
||||||
|
foreground=657b83
|
||||||
|
background=fdf6e3
|
||||||
|
#selection_foreground=586e75
|
||||||
|
#selection_background=eee8d5
|
||||||
|
regular0=073642
|
||||||
|
regular1=dc322f
|
||||||
|
regular2=859900
|
||||||
|
regular3=b58900
|
||||||
|
regular4=268bd2
|
||||||
|
regular5=d33682
|
||||||
|
regular6=2aa198
|
||||||
|
regular7=eee8d5
|
||||||
|
bright0=002b36
|
||||||
|
bright1=cb4b16
|
||||||
|
bright2=586e75
|
||||||
|
bright3=657b83
|
||||||
|
bright4=839496
|
||||||
|
bright5=6c71c4
|
||||||
|
bright6=93a1a1
|
||||||
|
bright7=fdf6e3
|
||||||
|
|
||||||
|
[csd]
|
||||||
|
border-width=8
|
|
@ -88,6 +88,9 @@ bindsym $mod+F10 input * xkb_switch_layout 1, input * xkb_options "lv3:menu_swit
|
||||||
|
|
||||||
input type:touchpad {
|
input type:touchpad {
|
||||||
natural_scroll enabled
|
natural_scroll enabled
|
||||||
|
scroll_method two_finger
|
||||||
|
click_method clickfinger
|
||||||
|
pointer_accel 0.15
|
||||||
}
|
}
|
||||||
input type:pointer {
|
input type:pointer {
|
||||||
natural_scroll enabled
|
natural_scroll enabled
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Output configuration:
|
# Output configuration:
|
||||||
#
|
#
|
||||||
set $output_laptop "Unknown 0x095F 0x00000000"
|
set $output_laptop "BOE 0x095F Unknown"
|
||||||
output $output_laptop position 0 0 transform 0 scale 1.25
|
output $output_laptop position 0 0 transform 0 scale 1.25
|
||||||
bindsym $mod+XF86MonBrightnessDown output $output_laptop scale 1.25
|
bindsym $mod+XF86MonBrightnessDown output $output_laptop scale 1.25
|
||||||
bindsym $mod+XF86MonBrightnessUp output $output_laptop scale 1.5
|
bindsym $mod+XF86MonBrightnessUp output $output_laptop scale 1.5
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
!.config/containers
|
!.config/containers
|
||||||
!.config/fontconfig
|
!.config/fontconfig
|
||||||
!.config/foot
|
!.config/foot
|
||||||
|
.config/foot/foot.ini
|
||||||
!.config/git
|
!.config/git
|
||||||
!.config/kitty
|
!.config/kitty
|
||||||
.config/kitty/colorscheme.conf
|
.config/kitty/colorscheme.conf
|
||||||
|
|
22
.zshrc
22
.zshrc
|
@ -567,19 +567,19 @@ slowest_functions+=( setup_nope )
|
||||||
# helper scripts
|
# helper scripts
|
||||||
|
|
||||||
function theme {
|
function theme {
|
||||||
local iterm_profile kitty_theme kitty_variation gnome_theme macos_theme
|
local iterm_profile term_theme term_variation gnome_theme macos_theme
|
||||||
case "$2" in
|
case "$2" in
|
||||||
g)
|
g)
|
||||||
kitty_variation=greyscale-
|
term_variation=greyscale-
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
kitty_variation=
|
term_variation=
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case "$1" in
|
case "$1" in
|
||||||
light)
|
light)
|
||||||
iterm_profile=Light
|
iterm_profile=Light
|
||||||
kitty_theme=${kitty_variation}light
|
term_theme=${term_variation}light
|
||||||
export LIGHT=true
|
export LIGHT=true
|
||||||
echo "export LIGHT=true" > ~/.zshrc-theme
|
echo "export LIGHT=true" > ~/.zshrc-theme
|
||||||
gnome_theme=Adwaita
|
gnome_theme=Adwaita
|
||||||
|
@ -588,7 +588,7 @@ function theme {
|
||||||
;;
|
;;
|
||||||
dark)
|
dark)
|
||||||
iterm_profile=Default
|
iterm_profile=Default
|
||||||
kitty_theme=${kitty_variation}dark
|
term_theme=${term_variation}dark
|
||||||
export LIGHT=false
|
export LIGHT=false
|
||||||
echo "export LIGHT=false" > ~/.zshrc-theme
|
echo "export LIGHT=false" > ~/.zshrc-theme
|
||||||
gnome_theme=Adwaita-dark
|
gnome_theme=Adwaita-dark
|
||||||
|
@ -600,11 +600,15 @@ function theme {
|
||||||
echo -e "\033]50;SetProfile=$ITERM_PROFILE\a"
|
echo -e "\033]50;SetProfile=$ITERM_PROFILE\a"
|
||||||
fi
|
fi
|
||||||
if [[ "$TERM" == "xterm-kitty" ]]; then
|
if [[ "$TERM" == "xterm-kitty" ]]; then
|
||||||
kitty @ set-colors -c -a ~/.config/kitty/colorscheme.$kitty_theme.conf
|
kitty @ set-colors -c -a ~/.config/kitty/colorscheme.$term_theme.conf
|
||||||
kitty @ env LIGHT=$LIGHT
|
kitty @ env LIGHT=$LIGHT
|
||||||
if [[ -z "$SSH_CLIENT" ]]; then
|
fi
|
||||||
ln -sf colorscheme.$kitty_theme.conf ~/.config/kitty/colorscheme.conf
|
if [[ "$TERM" == "foot-extra" ]]; then
|
||||||
fi
|
|
||||||
|
fi
|
||||||
|
if [[ -z "$SSH_CLIENT" ]]; then
|
||||||
|
ln -sf foot.$term_theme.ini ~/.config/foot/foot.ini
|
||||||
|
ln -sf colorscheme.$term_theme.conf ~/.config/kitty/colorscheme.conf
|
||||||
fi
|
fi
|
||||||
setup_prompt
|
setup_prompt
|
||||||
if [[ -z "$SSH_CLIENT" ]]; then
|
if [[ -z "$SSH_CLIENT" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue