add dark-blue theme
This commit is contained in:
@ -4,7 +4,7 @@ env:
|
||||
TERM: xterm-256color
|
||||
|
||||
schemas:
|
||||
lupan_light: &dark
|
||||
lupan_dark: &dark
|
||||
primary:
|
||||
background: '#1a3a34'
|
||||
foreground: '#f2f6e1'
|
||||
@ -26,6 +26,28 @@ schemas:
|
||||
magenta: '#b056b5'
|
||||
cyan: '#169191'
|
||||
white: '#ffffff'
|
||||
lupan_dark_blue: &dark-blue
|
||||
primary:
|
||||
background: '#092e50'
|
||||
foreground: '#c0c0c0'
|
||||
normal:
|
||||
black: '#000000'
|
||||
red: '#e6436d'
|
||||
green: '#59c19f'
|
||||
yellow: '#f6bc25'
|
||||
blue: '#55b3fd'
|
||||
magenta: '#dc88e9'
|
||||
cyan: '#77adc4'
|
||||
white: '#f2f6e1'
|
||||
bright:
|
||||
black: '#888888'
|
||||
red: '#e694a9'
|
||||
green: '#94e6a9'
|
||||
yellow: '#fbda62'
|
||||
blue: '#1081ff'
|
||||
magenta: '#b056b5'
|
||||
cyan: '#169191'
|
||||
white: '#ffffff'
|
||||
lupan_light: &light
|
||||
primary:
|
||||
background: '#f2f6e1'
|
||||
@ -49,7 +71,7 @@ schemas:
|
||||
cyan: '#169191'
|
||||
white: '#ffffff'
|
||||
|
||||
colors: *dark
|
||||
colors: *dark
|
||||
|
||||
font:
|
||||
size: 13.5
|
||||
@ -59,4 +81,4 @@ font:
|
||||
key_bindings:
|
||||
- key: F6
|
||||
mods: Control|Shift
|
||||
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/switch_bg.py"] }
|
||||
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh next"] }
|
||||
|
21
alacritty/.config/alacritty/set_theme.sh
Executable file
21
alacritty/.config/alacritty/set_theme.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
dark|dark-blue|light)
|
||||
sed -i "s/^colors: [*].*/colors: *$1/" ~/.config/alacritty/alacritty.yml
|
||||
;;
|
||||
next)
|
||||
case $(grep colors: ~/.config/alacritty/alacritty.yml) in
|
||||
'colors: *dark')
|
||||
THEME=dark-blue
|
||||
;;
|
||||
'colors: *dark-blue')
|
||||
THEME=light
|
||||
;;
|
||||
*)
|
||||
THEME=dark
|
||||
;;
|
||||
esac
|
||||
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
|
||||
;;
|
||||
esac
|
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
action = 'switch'
|
||||
if len(sys.argv) > 1:
|
||||
action = sys.argv[1]
|
||||
path = os.path.join(os.getenv('HOME'), '.config/alacritty/alacritty.yml')
|
||||
with open(path, 'r+') as f:
|
||||
cfg = f.read()
|
||||
if "colors: *dark" in cfg and action in ['switch', 'light']:
|
||||
cfg = cfg.replace("colors: *dark", "colors: *light")
|
||||
elif "colors: *light" in cfg and action in ['switch', 'dark']:
|
||||
cfg = cfg.replace("colors: *light", "colors: *dark")
|
||||
f.seek(0)
|
||||
f.write(cfg)
|
Reference in New Issue
Block a user