Colors overhaul

This commit is contained in:
Daniel Flanagan 2021-07-04 11:01:15 -05:00
parent a037661cf4
commit be04b8aaf0
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
23 changed files with 179 additions and 1246 deletions

7
common/bin/dns-cleaner Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -x -e
API="https://api.netlify.com/api/v1"
TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)"
URL="$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN"
curl -sL "$URL" > /tmp/zone.json

11
common/bin/dns-deleter Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
API="https://api.netlify.com/api/v1"
TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)"
while read -r l; do
set -x -e
ID="$(echo $l | awk '{print $2}')"
URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN"
curl -X DELETE -sL "$URL" &
done
wait

View File

@ -1 +0,0 @@
vendor

View File

@ -1,47 +0,0 @@
#!/usr/bin/env bash
SCHEME="donokai"
TYPE="dark"
# v=$(ruby --version)
if [[ $? -eq 0 ]]; then
if [[ -n $1 ]]; then SCHEME=$1; fi
if [[ -n $2 ]]; then TYPE=$2; fi
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
mkdir -p "$DIR/vendor"
B16_DIR="$DIR/vendor/base16-builder"
COLORS_PATH="$B16_DIR/output"
if [ -d "$B16_DIR" ]; then
echo "Skipping repo pull down..."
rm -rf "$COLORS_PATH"
mkdir -p "$COLORS_PATH"
else
git clone https://github.com/lytedev/base16-builder.git "$DIR/vendor/base16-builder"
fi
"$DIR/vendor/base16-builder/base16" -t vim -s "$DIR/schemes/$SCHEME.yml"
"$DIR/vendor/base16-builder/base16" -t vconsole -s "$DIR/schemes/$SCHEME.yml"
"$DIR/vendor/base16-builder/base16" -t xresources -s "$DIR/schemes/$SCHEME.yml"
"$DIR/vendor/base16-builder/base16" -t shell -s "$DIR/schemes/$SCHEME.yml"
# replace existing color files
rm -f "$DIR/../shell"
rm -f "$DIR/../vconsole"
rm -f "$DIR/../vim"
rm -f "$DIR/../xresources"
cp "$COLORS_PATH/xresources/base16-$SCHEME.$TYPE.xresources" "$DIR/../xresources"
cp "$COLORS_PATH/vconsole/base16-$SCHEME.$TYPE.sh" "$DIR/../vconsole"
cp "$COLORS_PATH/vim/base16-$SCHEME.vim" "$DIR/../vim"
cp "$COLORS_PATH/shell/base16-$SCHEME.$TYPE.sh" "$DIR/../shell"
chmod +x "$DIR/../shell"
chmod +x "$DIR/../vconsole"
echo "Colors have been regenerated. You will need to re-link them."
else
echo "Ruby isn't installed."
fi

View File

@ -1,20 +0,0 @@
#!/usr/bin/env moon
scheme_file = "donokai"
template_file = [
"shell"
]
scheme = require(scheme_file)!
scheme.meta = scheme.meta || {}
scheme.meta.author = scheme.meta.author || "Unknown Author"
scheme.meta.name = scheme.meta.name || "Unnamed Color Scheme"
for f in template_files
template_data = require(t)!
colors = scheme.colors
if "function" == type template_data.color_map
colors = {template_data.color_map(k, v) for k, v in pairs(colors)}

View File

@ -1,18 +0,0 @@
scheme: "Bright"
author: "Chris Kempson (http://chriskempson.com)"
base00: "111111"
base01: "303030"
base02: "505050"
base03: "b0b0b0"
base04: "d0d0d0"
base05: "e0e0e0"
base06: "f5f5f5"
base07: "ffffff"
base08: "fb0120"
base09: "fc6d24"
base0A: "fda331"
base0B: "a1c659"
base0C: "76c7b7"
base0D: "6fb3d2"
base0E: "d381c3"
base0F: "be643c"

View File

@ -1,22 +0,0 @@
=>
meta:
name: "Donokai"
author: "Daniel Flanagan (https://lyte.dev)"
colors:
base00: "111111" -- background, dark grey
base01: "383830" -- lighter grey
base02: "49483e" -- lighter grey
base03: "75715e" -- pale-ish yellow
base04: "a59f85" -- lighter peuce
base05: "f8f8f2" -- foreground white
base06: "f5f4f1" -- foreground 2 white
base07: "f9f8f5" -- foreground 3 white
base08: "f92672" -- magenta
base09: "fd971f" -- orange
base0A: "f4bf75" -- yellow
base0B: "a6e22e" -- green
base0C: "a1efe4" -- cyan
base0D: "66d9ef" -- blue
base0E: "ae81ff" -- purple
base0F: "cc6633" -- pale orange

View File

@ -1,18 +0,0 @@
scheme: "Donokai"
author: "Daniel Flanagan(https://lytedev.io)"
base00: "111111" # background, dark grey
base01: "383830" # lighter grey
base02: "49483e" # lighter grey
base03: "75715e" # pale-ish yellow
base04: "a59f85" # lighter peuce
base05: "f8f8f2" # foreground white
base06: "f5f4f1" # foreground 2 white
base07: "f9f8f5" # foreground 3 white
base08: "f92672" # magenta
base09: "fd971f" # orange
base0A: "f4bf75" # yellow
base0B: "a6e22e" # green
base0C: "a1efe4" # cyan
base0D: "66d9ef" # blue
base0E: "ae81ff" # purple
base0F: "cc6633" # pale orange

View File

@ -1,18 +0,0 @@
scheme: "Donokai-BLACK"
author: "Daniel Flanagan(https://lytedev.io)"
base00: "000000" # background, dark grey
base01: "383830" # lighter grey
base02: "49483e" # lighter grey
base03: "75715e" # pale-ish yellow
base04: "a59f85" # lighter peuce
base05: "f8f8f2" # foreground white
base06: "f5f4f1" # foreground 2 white
base07: "f9f8f5" # foreground 3 white
base08: "f92672" # magenta
base09: "fd971f" # orange
base0A: "f4bf75" # yellow
base0B: "a6e22e" # green
base0C: "a1efe4" # cyan
base0D: "66d9ef" # blue
base0E: "ae81ff" # purple
base0F: "cc6633" # pale orange

View File

@ -1,37 +0,0 @@
scheme: "Holodized"
author: "Daniel Flanagan(https://lytedev.io)"
base00: "eeeeee" # background, light cream
base01: "ddd6c3" # darker cream
base02: "ada693" # darker cream
base03: "8d8673" # pale-ish yellow
base04: "554f45" # darker peuce
base05: "111111" # foreground dark grey
base06: "555555" # foreground 2 dark grey
base07: "888888" # foreground 3 dark grey
base08: "990833" # magenta
base09: "8d370f" # orange
base0A: "947010" # yellow
base0B: "06623e" # green
base0C: "006677" # cyan
base0D: "004488" # blue
base0E: "4e117f" # purple
base0F: "883311" # pale orange
# scheme: "Holodized"
# author: "Daniel Flanagan @lytedev (modified Solarized Light)"
# base00: "fdf6e3"
# base01: "eee8d5"
# base02: "93a1a1"
# base03: "839496"
# base04: "657b83"
# base05: "111111"
# base06: "073642"
# base07: "002b36"
# base08: "8c220f"
# base09: "8b2b06"
# base0A: "b58900"
# base0B: "859900"
# base0C: "2aa198"
# base0D: "268bd2"
# base0E: "6c71c4"
# base0F: "d33682"

View File

@ -1,250 +0,0 @@
#!/bin/sh
# Base16 <%= @.scheme %> - Shell color setup script
# <%= @author %>
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
fi
color00="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 - Black
color01="<%= split_by_slash(@base["08"]["hex"]) %>" # Base 08 - Red
color02="<%= split_by_slash(@base["0B"]["hex"]) %>" # Base 0B - Green
color03="<%= split_by_slash(@base["0A"]["hex"]) %>" # Base 0A - Yellow
color04="<%= split_by_slash(@base["0D"]["hex"]) %>" # Base 0D - Blue
color05="<%= split_by_slash(@base["0E"]["hex"]) %>" # Base 0E - Magenta
color06="<%= split_by_slash(@base["0C"]["hex"]) %>" # Base 0C - Cyan
color07="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - White
color08="<%= split_by_slash(@base["03"]["hex"]) %>" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="<%= split_by_slash(@base["07"]["hex"]) %>" # Base 07 - Bright White
color16="<%= split_by_slash(@base["09"]["hex"]) %>" # Base 09
color17="<%= split_by_slash(@base["0F"]["hex"]) %>" # Base 0F
color18="<%= split_by_slash(@base["01"]["hex"]) %>" # Base 01
color19="<%= split_by_slash(@base["02"]["hex"]) %>" # Base 02
color20="<%= split_by_slash(@base["04"]["hex"]) %>" # Base 04
color21="<%= split_by_slash(@base["06"]["hex"]) %>" # Base 06
color_foreground="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05
color_background="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00
color_cursor="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
# non-interactive
alias printf=/bin/false
else
printf_template="\033]4;%d;rgb:%s\033\\"
printf_template_var="\033]%d;rgb:%s\033\\"
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg <%= @base["05"]["hex"] %> # forground
printf $printf_template_custom Ph <%= @base["00"]["hex"] %> # background
printf $printf_template_custom Pi <%= @base["05"]["hex"] %> # bold color
printf $printf_template_custom Pj <%= @base["02"]["hex"] %> # selection color
printf $printf_template_custom Pk <%= @base["05"]["hex"] %> # selected text color
printf $printf_template_custom Pl <%= @base["05"]["hex"] %> # cursor
printf $printf_template_custom Pm <%= @base["00"]["hex"] %> # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor
#!/bin/sh
# Base16 Donokai - Shell color setup script
# Daniel Flanagan(https://lytedev.io)
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
fi
color00="11/11/11" # Base 00 - Black
color01="f9/26/72" # Base 08 - Red
color02="a6/e2/2e" # Base 0B - Green
color03="f4/bf/75" # Base 0A - Yellow
color04="66/d9/ef" # Base 0D - Blue
color05="ae/81/ff" # Base 0E - Magenta
color06="a1/ef/e4" # Base 0C - Cyan
color07="f8/f8/f2" # Base 05 - White
color08="75/71/5e" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="f9/f8/f5" # Base 07 - Bright White
color16="fd/97/1f" # Base 09
color17="cc/66/33" # Base 0F
color18="38/38/30" # Base 01
color19="49/48/3e" # Base 02
color20="a5/9f/85" # Base 04
color21="f5/f4/f1" # Base 06
color_foreground="f8/f8/f2" # Base 05
color_background="11/11/11" # Base 00
color_cursor="f8/f8/f2" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
# non-interactive
alias printf=/bin/false
else
printf_template="\033]4;%d;rgb:%s\033\\"
printf_template_var="\033]%d;rgb:%s\033\\"
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg f8f8f2 # forground
printf $printf_template_custom Ph 111111 # background
printf $printf_template_custom Pi f8f8f2 # bold color
printf $printf_template_custom Pj 49483e # selection color
printf $printf_template_custom Pk f8f8f2 # selected text color
printf $printf_template_custom Pl f8f8f2 # cursor
printf $printf_template_custom Pm 111111 # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

View File

@ -1,255 +0,0 @@
=>
color_map: (k, v) ->
r, g, b = v\match "(%d%d)(%d%d)(%d%d)"
k, "#{r}/#{g}/#{b}"
content: [===[#!/bin/sh
# #{@.meta.name} by #{@.meta.author} %>
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
fi
color00="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 - Black
color01="<%= split_by_slash(@base["08"]["hex"]) %>" # Base 08 - Red
color02="<%= split_by_slash(@base["0B"]["hex"]) %>" # Base 0B - Green
color03="<%= split_by_slash(@base["0A"]["hex"]) %>" # Base 0A - Yellow
color04="<%= split_by_slash(@base["0D"]["hex"]) %>" # Base 0D - Blue
color05="<%= split_by_slash(@base["0E"]["hex"]) %>" # Base 0E - Magenta
color06="<%= split_by_slash(@base["0C"]["hex"]) %>" # Base 0C - Cyan
color07="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - White
color08="<%= split_by_slash(@base["03"]["hex"]) %>" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="<%= split_by_slash(@base["07"]["hex"]) %>" # Base 07 - Bright White
color16="<%= split_by_slash(@base["09"]["hex"]) %>" # Base 09
color17="<%= split_by_slash(@base["0F"]["hex"]) %>" # Base 0F
color18="<%= split_by_slash(@base["01"]["hex"]) %>" # Base 01
color19="<%= split_by_slash(@base["02"]["hex"]) %>" # Base 02
color20="<%= split_by_slash(@base["04"]["hex"]) %>" # Base 04
color21="<%= split_by_slash(@base["06"]["hex"]) %>" # Base 06
color_foreground="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05
color_background="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00
color_cursor="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
# non-interactive
alias printf=/bin/false
else
printf_template="\033]4;%d;rgb:%s\033\\"
printf_template_var="\033]%d;rgb:%s\033\\"
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg <%= @base["05"]["hex"] %> # forground
printf $printf_template_custom Ph <%= @base["00"]["hex"] %> # background
printf $printf_template_custom Pi <%= @base["05"]["hex"] %> # bold color
printf $printf_template_custom Pj <%= @base["02"]["hex"] %> # selection color
printf $printf_template_custom Pk <%= @base["05"]["hex"] %> # selected text color
printf $printf_template_custom Pl <%= @base["05"]["hex"] %> # cursor
printf $printf_template_custom Pm <%= @base["00"]["hex"] %> # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor
#!/bin/sh
# Base16 Donokai - Shell color setup script
# Daniel Flanagan(https://lytedev.io)
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
fi
color00="11/11/11" # Base 00 - Black
color01="f9/26/72" # Base 08 - Red
color02="a6/e2/2e" # Base 0B - Green
color03="f4/bf/75" # Base 0A - Yellow
color04="66/d9/ef" # Base 0D - Blue
color05="ae/81/ff" # Base 0E - Magenta
color06="a1/ef/e4" # Base 0C - Cyan
color07="f8/f8/f2" # Base 05 - White
color08="75/71/5e" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="f9/f8/f5" # Base 07 - Bright White
color16="fd/97/1f" # Base 09
color17="cc/66/33" # Base 0F
color18="38/38/30" # Base 01
color19="49/48/3e" # Base 02
color20="a5/9f/85" # Base 04
color21="f5/f4/f1" # Base 06
color_foreground="f8/f8/f2" # Base 05
color_background="11/11/11" # Base 00
color_cursor="f8/f8/f2" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
# non-interactive
alias printf=/bin/false
else
printf_template="\033]4;%d;rgb:%s\033\\"
printf_template_var="\033]%d;rgb:%s\033\\"
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg f8f8f2 # forground
printf $printf_template_custom Ph 111111 # background
printf $printf_template_custom Pi f8f8f2 # bold color
printf $printf_template_custom Pj 49483e # selection color
printf $printf_template_custom Pk f8f8f2 # selected text color
printf $printf_template_custom Pl f8f8f2 # cursor
printf $printf_template_custom Pm 111111 # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor
]===]

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
THEME="$1"
echo "$THEME"
"$DIR/generator/gen.bash" "$THEME"
"$DOTFILES_PATH/apps/de/x/loadresources"
resrc
restartbar
# TODO: set GTK theme to "Arc-Dark" or "Arc-Light"

View File

@ -1,37 +1,27 @@
#!/bin/sh
# Base16 Donokai - Shell color setup script
# Daniel Flanagan(https://lytedev.io)
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux console (use 'vconsole' template instead)
return 2>/dev/null || exit 0
return 2>/dev/null || exit 0
fi
color00="11/11/11" # Base 00 - Black
color01="f9/26/72" # Base 08 - Red
color02="a6/e2/2e" # Base 0B - Green
color03="f4/bf/75" # Base 0A - Yellow
color04="66/d9/ef" # Base 0D - Blue
color05="ae/81/ff" # Base 0E - Magenta
color06="a1/ef/e4" # Base 0C - Cyan
color07="f8/f8/f2" # Base 05 - White
color08="75/71/5e" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="f9/f8/f5" # Base 07 - Bright White
black="11/11/11"
red="f9/26/72"
green="a6/e2/2e"
yellow="f4/bf/75"
blue="66/d9/ef"
magenta="ae/81/ff"
cyan="a1/ef/e4"
white="cccccc"
black2="75/71/5e"
white2="f8/f8/f8"
# TODO: name these?
color16="fd/97/1f" # Base 09
color17="cc/66/33" # Base 0F
color18="38/38/30" # Base 01
color19="49/48/3e" # Base 02
color20="a5/9f/85" # Base 04
color21="f5/f4/f1" # Base 06
color_foreground="f8/f8/f2" # Base 05
color_background="11/11/11" # Base 00
color_cursor="f8/f8/f2" # Base 05
if [ -n "$TMUX" ]; then
# tell tmux to pass the escape sequences through
@ -53,33 +43,36 @@ else
printf_template_custom="\033]%s%s\033\\"
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
c() {
t="${1}"; shift
c="${1}"; shift
for n in "$@"; do
printf "$t" "$n" "$c"
done
}
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
ct() { c "$printf_template" "$@"; }
cv() { c "$printf_template" "$@"; }
cc() { c "$printf_template" "$@"; }
ct $black 0
ct $red 1 9
ct $green 2 10
ct $yellow 3 11
ct $blue 4 12
ct $magenta 5 13
ct $cyan 6 14
ct $white 7 10
ct $black2 8
ct $white2 15
ct $color16 16
ct $color17 17
ct $color18 18
ct $color19 19
ct $color20 20
ct $color21 21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg f8f8f2 # forground
@ -90,36 +83,33 @@ if [ -n "$ITERM_SESSION_ID" ]; then
printf $printf_template_custom Pl f8f8f2 # cursor
printf $printf_template_custom Pm 111111 # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
cv $white 10
cv $black 11
cc ";7" 12
fi
# clean up
unset -f c
unset -f ct
unset -f cv
unset -f cc
unset black
unset red
unset green
unset yellow
unset blue
unset magenta
unset cyan
unset white
unset black2
unset white2
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset printf_template_custom
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

View File

@ -1,62 +1,48 @@
#!/bin/sh
# Base16 Donokai - Virtual console color setup script
# Daniel Flanagan(https://lytedev.io)
color00="111111" # Base 00 - Black
color01="f92672" # Base 08 - Red
color02="a6e22e" # Base 0B - Green
color03="f4bf75" # Base 0A - Yellow
color04="66d9ef" # Base 0D - Blue
color05="ae81ff" # Base 0E - Magenta
color06="a1efe4" # Base 0C - Cyan
color07="f8f8f2" # Base 05 - White
color08="75715e" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="f9f8f5" # Base 07 - Bright White
black="111111" # black
red="f92672" # red
green="a6e22e" # green
yellow="f4bf75" # yellow
blue="66d9ef" # blue
magenta="ae81ff" # magenta
cyan="a1efe4" # cyan
white="cccccc" # white
black2="75715e" # black
white2="f8f8f8" # white
# 16 color space
echo -e "\e]P0$color00"
echo -e "\e]P1$color01"
echo -e "\e]P2$color02"
echo -e "\e]P3$color03"
echo -e "\e]P4$color04"
echo -e "\e]P5$color05"
echo -e "\e]P6$color06"
echo -e "\e]P7$color07"
echo -e "\e]P8$color08"
echo -e "\e]P9$color09"
echo -e "\e]PA$color10"
echo -e "\e]PB$color11"
echo -e "\e]PC$color12"
echo -e "\e]PD$color13"
echo -e "\e]PE$color14"
echo -e "\e]PF$color15"
if [ -x /sbin/clear ]; then
c() {
c="${1}"; shift
for n in "$@"; do
echo -e "\e]P${n}${c}";
done
}
c $black 0
c $red 1 9
c $green 2 A
c $yellow 3 B
c $blue 4 C
c $magenta 5 D
c $cyan 6 E
c $white 7
c $black2 8
c $white2 F
if [ -x /sbin/clear ]; then
/sbin/clear
else
echo -e "\e[H"
echo -e "\e[2J"
echo -e "\e[H\e[2J"
fi
# clean up
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset -f c
unset black
unset red
unset green
unset yellow
unset blue
unset magenta
unset cyan
unset white
unset black2
unset white2

View File

@ -1,302 +0,0 @@
let s:gui00 = "111111"
let s:gui01 = "383830"
let s:gui02 = "49483e"
let s:gui03 = "75715e"
let s:gui04 = "a59f85"
let s:gui05 = "f8f8f2"
let s:gui06 = "f5f4f1"
let s:gui07 = "f9f8f5"
let s:gui08 = "f92672"
let s:gui09 = "fd971f"
let s:gui0A = "f4bf75"
let s:gui0B = "a6e22e"
let s:gui0C = "a1efe4"
let s:gui0D = "66d9ef"
let s:gui0E = "ae81ff"
let s:gui0F = "cc6633"
" Terminal color definitions
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "10"
let s:cterm02 = "11"
let s:cterm04 = "12"
let s:cterm06 = "13"
let s:cterm09 = "09"
let s:cterm0F = "14"
endif
" Theme setup
hi clear
syntax reset
let g:colors_name = "base16-donokai"
" Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
endif
if a:guibg != ""
exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
endif
if a:ctermfg != ""
exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
endif
if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if a:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp
endif
endfun
" Return GUI color for light/dark variants
fun s:gui(color)
if &background == "dark"
return a:color
endif
if a:color == s:gui00
return s:gui07
elseif a:color == s:gui01
return s:gui06
elseif a:color == s:gui02
return s:gui05
elseif a:color == s:gui03
return s:gui04
elseif a:color == s:gui04
return s:gui03
elseif a:color == s:gui05
return s:gui02
elseif a:color == s:gui06
return s:gui01
elseif a:color == s:gui07
return s:gui00
endif
return a:color
endfun
" Return terminal color for light/dark variants
fun s:cterm(color)
if &background == "dark"
return a:color
endif
if a:color == s:cterm00
return s:cterm07
elseif a:color == s:cterm01
return s:cterm06
elseif a:color == s:cterm02
return s:cterm05
elseif a:color == s:cterm03
return s:cterm04
elseif a:color == s:cterm04
return s:cterm03
elseif a:color == s:cterm05
return s:cterm02
elseif a:color == s:cterm06
return s:cterm01
elseif a:color == s:cterm07
return s:cterm00
endif
return a:color
endfun
" Vim editor colors
call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "")
call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "")
call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "")
call <sid>hi("Italic", "", "", "", "", "none", "")
call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "", "")
call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "")
call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "")
call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
" Standard syntax highlighting
call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Character", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none", "")
call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Float", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none", "")
call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Number", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none", "")
call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "")
call <sid>hi("Type", s:gui0A, "", s:cterm0A, "", "none", "")
call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "")
" C highlighting
call <sid>hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "")
" C# highlighting
call <sid>hi("csClass", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csType", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "")
" CSS highlighting
call <sid>hi("cssBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "")
" Diff highlighting
call <sid>hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "")
call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "")
" Git highlighting
call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "")
" GitGutter highlighting
call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "")
" HTML highlighting
call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("htmlTag", s:gui05, "", s:cterm05, "", "", "")
" JavaScript highlighting
call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "")
" Markdown highlighting
call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "")
" NERDTree highlighting
call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
" PHP highlighting
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
" Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "")
call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "")
call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "")
" SASS highlighting
call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "")
" Signify highlighting
call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "")
call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "")
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E)
" Remove functions
delf <sid>hi
delf <sid>gui
delf <sid>cterm
" Remove color variables
unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F

View File

@ -1,52 +0,0 @@
! Base16 Donokai
! Scheme: Daniel Flanagan(https://lytedev.io)
#define base00 #111111
#define base01 #383830
#define base02 #49483e
#define base03 #75715e
#define base04 #a59f85
#define base05 #f8f8f2
#define base06 #f5f4f1
#define base07 #f9f8f5
#define base08 #f92672
#define base09 #fd971f
#define base0A #f4bf75
#define base0B #a6e22e
#define base0C #a1efe4
#define base0D #66d9ef
#define base0E #ae81ff
#define base0F #cc6633
*foreground: base05
*background: base00
*cursorColor: base05
*color0: base00
*color1: base08
*color2: base0B
*color3: base0A
*color4: base0D
*color5: base0E
*color6: base0C
*color7: base05
*color8: base03
*color9: base09
*color10: base01
*color11: base02
*color12: base04
*color13: base06
*color14: base0F
*color15: base07
rofi.color-window: base00,base0D,base05,base00
rofi.color-normal: base00,base05,base00,base0D,base00
rofi.color-normal: base00,base05,base00,base0D,base00
rofi.color-active: base00,base05,base00,base0D,base00
rofi.color-urgent: base00,base05,base00,base0D,base00
bspwm.normal_border_color: base00
bspwm.focused_border_color: base0D
bspwm.active_border_color: base00
bspwm.presel_feedback_color: base0D

View File

@ -5,3 +5,4 @@
!/ftplugin
!/lua
!/coc-settings.json
!/colors/donokai.vim

View File

@ -1,41 +1,33 @@
local kmap = vim.api.nvim_set_keymap
local excmd = vim.api.nvim_command
local nvim_exec = vim.api.nvim_exec
vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim'
-- TODO: learn about the wildmenu `q:`
-- TODO: what is `let &fcs = 'eob: '` for?
local evalvim = function(vimscript, output)
if (output == nil) then
output = false
end
nvim_exec(vimscript, output)
end
require('plugins').setup()
require'options'
require'keymap'
require('fold').setup()
-- require('lsp').setup()
require('statusline').setup()
do
local plugin_setups = {
telescope = {
defaults = {
mappings = {i = {['c-u'] = false, ['c-d'] = false}},
generic_sorter = require('telescope.sorters').get_fzy_sorter,
file_sorter = require('telescope.sorters').get_fzy_sorter,
}
},
fold = true,
statusline = true,
lsp = true,
}
for k,v in pairs(plugin_setups) do
if type(v) == 'function' then
v(require(k))
elseif type(v) == 'table' then
require(k).setup(v)
elseif v == true then
require(k).setup()
end
local plugin_setups = {
telescope = {
defaults = {
mappings = {i = {['c-u'] = false, ['c-d'] = false}},
generic_sorter = require('telescope.sorters').get_fzy_sorter,
file_sorter = require('telescope.sorters').get_fzy_sorter,
}
},
}
for k,v in pairs(plugin_setups) do
if type(v) == 'function' then
v(require(k))
elseif type(v) == 'table' then
require(k).setup(v)
elseif type(v) == 'string' then
require(k)[v]()
elseif v == true then
require(k)
end
end

View File

@ -1,6 +1,4 @@
local vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim'
for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do kmap('i', keys, '<Esc>', {}) end
for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do vim.api.nvim_set_keymap('i', keys, '<Esc>', {}) end
local m = {
s = {silent = true},
@ -9,12 +7,13 @@ local m = {
}
local keymap = {
n = {
['<leader>r'] = {':luafile ' .. vimdir .. '/init.lua<cr>:echo \'Reloaded init.lua\'<cr>', m.s},
['<leader>gv'] = {':e ' .. vimdir .. '/init.lua<cr>', m.s},
['<leader>r'] = {':luafile ' .. vim.g.vimdir .. '/init.lua<cr>:echo \'Reloaded init.lua\'<cr>', m.s},
['<leader>gv'] = {':e ' .. vim.g.vimdir .. '/init.lua<cr>', m.s},
['<leader>w'] = {':bd<cr>', m.s},
['<leader>h'] = {'b#<cr>', m.s},
['<leader>h'] = {':b#<cr>', m.s},
['<leader>k'] = {':bnext<cr>', m.s},
['<leader>j'] = {':bprevious<cr>', m.s},
['<leader>m'] = {':lua print()<cr>', m.s},
['<leader>/'] = {':let @/ = ""<cr>:<BACKSPACE>', m.s},
['<c-q>'] = ':qa<cr>',
['<c-p>'] = '<cmd>Telescope git_files<cr>',

View File

@ -63,8 +63,7 @@ nvim_lsp.sumneko_lua.setup{
vim.cmd "command! Format execute 'lua vim.lsp.buf.formatting()'"
vim.o.completeopt = 'menuone,noinsert'
-- Compe setup
require'compe'.setup{
--[[require'compe'.setup{
enabled=true,
autocomplete=true,
debug=false,
@ -79,6 +78,7 @@ require'compe'.setup{
documentation=true,
source={path=true, nvim_lsp=true},
}
]]--
return {
setup=function()

View File

@ -38,10 +38,10 @@ local options = {
shortmess = 'filnxToOFIac',
history = 1000,
undofile = true,
undodir = vimdir .. '/undo',
undodir = vim.g.vimdir .. '/undo',
undolevels = 1000,
undoreload = 1000,
spellfile = vimdir .. '/spell/en.utf-8.add',
spellfile = vim.g.vimdir .. '/spell/en.utf-8.add',
ignorecase = true,
smartcase = true,
incsearch = true,
@ -59,31 +59,31 @@ local options = {
showcmd = false,
laststatus = 2,
ruler = false,
termguicolors = true,
number = true,
}
for k,v in pairs(options) do
vim.o[k] = v
end
vim.api.nvim_exec([[
hi Search cterm=NONE ctermbg=blue ctermfg=black
hi LineNr ctermbg=0 ctermfg=8
hi CursorLineNr ctermbg=18 ctermfg=gray
hi IndentGuidesEven ctermbg=18
hi Normal ctermbg=NONE
hi ActiveBuffer ctermbg=4 ctermfg=0
hi DirtyBuffer ctermbg=3 ctermfg=0
hi StatusLine ctermbg=1 ctermfg=7
hi StatusLineNC ctermbg=2 ctermfg=7
command! W write
augroup oncommit
au! BufReadPost *
if stridx(&ft, 'commit') >= 0
exe "startinsert!"
endif
augroup END
augroup slime
au! BufNewFile,BufRead *.slimleex set syntax=slim
augroup END
colorscheme base16-donokai
]], false)
vim.api.nvim_command'colorscheme donokai'
vim.api.nvim_command[[
function! SynGroup()
let l:s = synID(line('.'), col('.'), 1)
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
endfun
nnoremap <c-m> :call SynGroup()<cr>
]]
-- vim.api.nvim_command[[
-- command! W write
-- augroup oncommit
-- au! BufReadPost *
-- if stridx(&ft, 'commit') >= 0
-- exe "startinsert!"
-- endif
-- augroup END
-- augroup slime
-- au! BufNewFile,BufRead *.slimleex set syntax=slim
-- augroup END
-- ]]

View File

@ -1,6 +1,6 @@
local setup = function()
local packer_install_path = "#{fn.stdpath 'data'}/site/pack/packer/start/packer.nvim"
if #vim.fn.glob(packer_install_path) > 0 then
local packer_install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if #vim.fn.glob(packer_install_path) == 0 then
vim.fn.system {'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path}
vim.api.nvim_command'packadd packer.nvim'
end
@ -27,7 +27,7 @@ local setup = function()
'dhruvasagar/vim-prosession',
{'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}},
'joshdick/onedark.vim',
{'lukas-reineke/indent-blankline.nvim', branch = 'lua'},
'lukas-reineke/indent-blankline.nvim',
{'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}},
'neovim/nvim-lspconfig',
'hrsh7th/nvim-compe',