aboutsummaryrefslogtreecommitdiff
path: root/.local/share/mode/switch.d/vim
blob: 6c83f9fb64cbc28dac0864cc5983fbe1ffb4ea1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
PREFIX="$XDG_CONFIG_HOME/nvim/mode"
mkdir -p "$PREFIX"

# lightline
cat << EOF > "$PREFIX/lightline.vim"
let s:bg = [ '$bg', 'NONE' ]
let s:fg = [ '$fg', 'NONE' ]
let s:mode = [ '$color0', 'NONE' ]
let s:faint = [ '$color8', 'NONE' ]
let s:none = [ 'NONE', 'NONE' ]
let s:test = [ '#ff00ff', 'NONE' ]

let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:fg, s:mode ], [ s:faint, s:bg ] ]
let s:p.normal.right = [ [ s:faint, s:bg ] ]
let s:p.normal.middle = [ [ s:none, s:none ] ]
let s:p.normal.error = [ [ s:test, s:test ] ]
let s:p.normal.warning = [ [ s:test, s:test ] ]
let s:p.inactive.left = copy(s:p.normal.left)
let s:p.inactive.right = copy(s:p.normal.right)
let s:p.inactive.middle = copy(s:p.normal.middle)
let s:p.insert.left = copy(s:p.normal.left)
let s:p.replace.left = copy(s:p.insert.left)
let s:p.visual.left = copy(s:p.insert.left)
let s:p.tabline.left = copy(s:p.normal.right)
let s:p.tabline.tabsel = [ [ s:fg, s:mode ] ]
let s:p.tabline.middle = copy(s:p.normal.right)
let s:p.tabline.right = copy(s:p.normal.right)

let g:lightline#colorscheme#auto#palette = lightline#colorscheme#flatten(s:p)
EOF

# terminal colors
cat << EOF > "$PREFIX/termcolors.vim"
let g:terminal_color_0 = '$color0'
let g:terminal_color_1 = '$color1'
let g:terminal_color_2 = '$color2'
let g:terminal_color_3 = '$color3'
let g:terminal_color_4 = '$color4'
let g:terminal_color_5 = '$color5'
let g:terminal_color_6 = '$color6'
let g:terminal_color_7 = '$color7'
let g:terminal_color_8 = '$color8'
let g:terminal_color_9 = '$color9'
let g:terminal_color_10 = '$color10'
let g:terminal_color_11 = '$color11'
let g:terminal_color_12 = '$color12'
let g:terminal_color_13 = '$color13'
let g:terminal_color_14 = '$color14'
let g:terminal_color_15 = '$color15'
EOF

# color scheme
cat << EOF > "$PREFIX/colorscheme.vim"
colorscheme $vim_theme_name
EOF