summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-06-09 13:25:11 +0200
committerAdrian Kummerlaender2018-06-09 13:25:11 +0200
commiteebc061ee2028bea165cfac291b7310ba09a791e (patch)
tree0d82f70f5e946be66071b074ad1a7ad8b9fb7e0e /pkgs
parentb9965f0fc5c5c77c688b8671094d159599e1ac21 (diff)
downloadnixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar.gz
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar.bz2
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar.lz
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar.xz
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.tar.zst
nixos_system-eebc061ee2028bea165cfac291b7310ba09a791e.zip
Update custom vim-airline theme
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/vim/conf/rc.vim1
-rw-r--r--pkgs/vim/conf/vim-color-akr/autoload/airline/themes/akr.vim144
-rw-r--r--pkgs/vim/plugins.nix2
3 files changed, 67 insertions, 80 deletions
diff --git a/pkgs/vim/conf/rc.vim b/pkgs/vim/conf/rc.vim
index 1ad8398..e7e3259 100644
--- a/pkgs/vim/conf/rc.vim
+++ b/pkgs/vim/conf/rc.vim
@@ -83,6 +83,7 @@ nnoremap <A-up> <C-W>k
nnoremap <A-down> <C-W>j
set laststatus=2
+let g:airline_theme = 'akr'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#show_tab_type = 1
diff --git a/pkgs/vim/conf/vim-color-akr/autoload/airline/themes/akr.vim b/pkgs/vim/conf/vim-color-akr/autoload/airline/themes/akr.vim
index 4b58f1e..1b847c4 100644
--- a/pkgs/vim/conf/vim-color-akr/autoload/airline/themes/akr.vim
+++ b/pkgs/vim/conf/vim-color-akr/autoload/airline/themes/akr.vim
@@ -1,100 +1,86 @@
-" Each theme is contained in its own file and declares variables scoped to the
-" file. These variables represent the possible "modes" that airline can
-" detect. The mode is the return value of mode(), which gets converted to a
-" readable string. The following is a list currently supported modes: normal,
-" insert, replace, visual, and inactive.
-"
-" Each mode can also have overrides. These are small changes to the mode that
-" don't require a completely different look. "modified" and "paste" are two
-" such supported overrides. These are simply suffixed to the major mode,
-" separated by an underscore. For example, "normal_modified" would be normal
-" mode where the current buffer is modified.
-"
-" The theming algorithm is a 2-pass system where the mode will draw over all
-" parts of the statusline, and then the override is applied after. This means
-" it is possible to specify a subset of the theme in overrides, as it will
-" simply overwrite the previous colors. If you want simultaneous overrides,
-" then they will need to change different parts of the statusline so they do
-" not conflict with each other.
-"
-" First, let's define an empty dictionary and assign it to the "palette"
-" variable. The # is a separator that maps with the directory structure. If
-" you get this wrong, Vim will complain loudly.
+" Normal mode
+" [ guifg , guibg , ctermfg , ctermbg ]
+let s:N1 = [ '#161616' , '#909636' , 0 , 10 ] " mode
+let s:N2 = [ '#161616' , '#909636' , 0 , 10 ] " info
+let s:N3 = [ '#909636' , '#161616' , 10 , 0 ] " statusline
+let s:N4 = [ '#352F6A' , 4 ] " mode modified
+
+" Insert mode
+let s:I1 = [ '#E4E093' , '#352F6A' , 3 , 4 ]
+let s:I2 = [ '#E4E093' , '#352F6A' , 3 , 4 ]
+let s:I3 = [ '#909636' , '#161616' , 10 , 0 ]
+let s:I4 = [ '#352F6A' , 4 ]
+
+" Visual mode
+let s:V1 = [ '#E4E093' , '#8C3346' , 3 , 1 ]
+let s:V2 = [ '#E4E093' , '#8C3346' , 3 , 1 ]
+let s:V3 = [ '#909636' , '#161616' , 10 , 0 ]
+let s:V4 = [ '#352F6A' , 4 ]
+
+" Replace mode
+let s:R1 = [ '#E4E093' , '#352F6A' , 3 , 4 ]
+let s:R2 = [ '#E4E093' , '#352F6A' , 3 , 4 ]
+let s:R3 = [ '#909636' , '#161616' , 10 , 0 ]
+let s:R4 = [ '#352F6A' , 4 ]
+
+" Paste mode
+let s:PA = [ '#352F6A' , 4 ]
+
+" Info modified
+let s:IM = [ '#909636' , 10 ]
+
+" Inactive mode
+let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ]
+
let g:airline#themes#akr#palette = {}
-" First let's define some arrays. The s: is just a VimL thing for scoping the
-" variables to the current script. Without this, these variables would be
-" declared globally. Now let's declare some colors for normal mode and add it
-" to the dictionary. The array is in the format:
-" [ guifg, guibg, ctermfg, ctermbg, opts ]. See "help attr-list" for valid
-" values for the "opt" value.
-let s:N1 = [ '#161616' , '#909636' , 0 , 10 ]
-let s:N2 = [ '#909636' , '#161616' , 10 , 0 ]
-let s:N3 = [ '#909636' , '#161616' , 10 , 0 ]
-let g:airline#themes#akr#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
+let g:airline#themes#akr#palette.accents = {
+ \ 'red': [ '#8C3346' , '' , 1 , '' , '' ],
+ \ }
-" Here we define overrides for when the buffer is modified. This will be
-" applied after g:airline#themes#akr#palette.normal, hence why only certain keys are
-" declared.
+let g:airline#themes#akr#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#akr#palette.normal_modified = {
- \ 'airline_c': [ '#161616' , '#352F6A' , 0 , 4 , '' ] ,
- \ }
+ \ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] ,
+ \ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] ,
+ \ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] }
+
-let s:I1 = [ '#E4E093' , '#352F6A' , 3 , 4 ]
-let s:I2 = [ '#909636' , '#161616' , 10 , 0 ]
-let s:I3 = [ '#909636' , '#161616' , 10 , 0 ]
let g:airline#themes#akr#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#akr#palette.insert_modified = {
- \ 'airline_c': [ '#161616' , '#352F6A' , 0 , 4 , '' ] ,
- \ }
-let g:airline#themes#akr#palette.insert_paste = {
- \ 'airline_a': [ s:I1[0] , '#352F6A' , s:I1[2] , 4 , '' ] ,
- \ }
+ \ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] ,
+ \ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] ,
+ \ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] }
-let g:airline#themes#akr#palette.replace = copy(g:airline#themes#akr#palette.insert)
-let g:airline#themes#akr#palette.replace.airline_a = [ s:I2[0] , '#af0000' , s:I2[2] , 124 , '' ]
-let g:airline#themes#akr#palette.replace_modified = g:airline#themes#akr#palette.insert_modified
-
-let s:V1 = [ '#E4E093' , '#8C3346' , 3 , 1 ]
-let s:V2 = [ '#909636' , '#161616' , 10 , 0 ]
-let s:V3 = [ '#909636' , '#161616' , 10 , 0 ]
let g:airline#themes#akr#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#akr#palette.visual_modified = {
- \ 'airline_c': [ '#161616' , '#8C3346' , 0 , 1 , '' ] ,
- \ }
+ \ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] ,
+ \ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] ,
+ \ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] }
-let s:IA1 = [ '#9e9e9e' , '#161616' , 247 , 0 , '' ]
-let s:IA2 = [ '#9e9e9e' , '#161616' , 247 , 0 , '' ]
-let s:IA3 = [ '#9e9e9e' , '#161616' , 247 , 0 , '' ]
-let g:airline#themes#akr#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
-let g:airline#themes#akr#palette.inactive_modified = {
- \ 'airline_c': [ '' , '' , 97 , '' , '' ] ,
- \ }
+let g:airline#themes#akr#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
+let g:airline#themes#akr#palette.replace_modified = {
+ \ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] ,
+ \ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] ,
+ \ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] }
-" Accents are used to give parts within a section a slightly different look or
-" color. Here we are defining a "red" accent, which is used by the 'readonly'
-" part by default. Only the foreground colors are specified, so the background
-" colors are automatically extracted from the underlying section colors. What
-" this means is that regardless of which section the part is defined in, it
-" will be red instead of the section's foreground color. You can also have
-" multiple parts with accents within a section.
-let g:airline#themes#akr#palette.accents = {
- \ 'red': [ '#ff0000' , '' , 9 , '' ]
- \ }
+let g:airline#themes#akr#palette.insert_paste = {
+ \ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] ,
+ \ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] ,
+ \ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] }
+
+
+let g:airline#themes#akr#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
+let g:airline#themes#akr#palette.inactive_modified = {
+ \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] }
-" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp
-" variable so that related functionality is loaded iff the user is using
-" ctrlp. Note that this is optional, and if you do not define ctrlp colors
-" they will be chosen automatically from the existing palette.
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#akr#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
- \ [ '#909636' , '#262626' , 10 , 235 , '' ],
- \ [ '#909636' , '#161616' , 10 , 0 , '' ],
- \ [ '#161616' , '#909636' , 0 , 10 , 'bold' ])
-
+ \ [ '#909636' , '#161616' , 10 , 0 , '' ] ,
+ \ [ '#909636' , '#161616' , 10 , 0 , '' ] ,
+ \ [ '#161616' , '#909636' , 0 , 10 , 'bold' ] )
diff --git a/pkgs/vim/plugins.nix b/pkgs/vim/plugins.nix
index 0d8528b..e410df5 100644
--- a/pkgs/vim/plugins.nix
+++ b/pkgs/vim/plugins.nix
@@ -36,7 +36,7 @@ in {
};
};
"vim-color-akr" = buildVimPlugin {
- name = "vim-csexact";
+ name = "vim-color-akr";
src = ./conf/vim-color-akr;
};
}