alacritty: add theme prefix and new themes to set_theme.sh
This commit is contained in:
parent
eaa85c8630
commit
fa4d56a6f4
@ -99,4 +99,4 @@ font:
|
||||
key_bindings:
|
||||
- key: F6
|
||||
mods: Control|Shift
|
||||
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh next"] }
|
||||
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh --next"] }
|
||||
|
@ -1,19 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
dark|dark-blue|light)
|
||||
lupan-dark|lupan-dark-blue|lupan-dark-gray|lupan-light|lupan-material-dark|lupan-material-light)
|
||||
sed -i "s/^colors: [*].*/colors: *$1/" ~/.config/alacritty/alacritty.yml
|
||||
;;
|
||||
next)
|
||||
--next)
|
||||
case $(grep colors: ~/.config/alacritty/alacritty.yml) in
|
||||
'colors: *dark')
|
||||
THEME=dark-blue
|
||||
'colors: *lupan-dark')
|
||||
THEME=lupan-dark-blue
|
||||
;;
|
||||
'colors: *dark-blue')
|
||||
THEME=light
|
||||
'colors: *lupan-dark-blue')
|
||||
THEME=lupan-dark-gray
|
||||
;;
|
||||
'colors: *lupan-dark-gray')
|
||||
THEME=lupan-light
|
||||
;;
|
||||
'colors: *lupan-light')
|
||||
THEME=lupan-material-dark
|
||||
;;
|
||||
'colors: *lupan-material-dark')
|
||||
THEME=lupan-material-light
|
||||
;;
|
||||
*)
|
||||
THEME=dark
|
||||
THEME=lupan-dark
|
||||
;;
|
||||
esac
|
||||
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
|
||||
|
Loading…
x
Reference in New Issue
Block a user