Compare commits
15 Commits
5603a8bcd5
...
296dd40613
Author | SHA1 | Date |
---|---|---|
Daniel Flanagan | 296dd40613 | |
Daniel Flanagan | 1ad2af5824 | |
Daniel Flanagan | 291e531f87 | |
Daniel Flanagan | 6d8fd970b5 | |
Daniel Flanagan | 0753611316 | |
Daniel Flanagan | a364587edd | |
Daniel Flanagan | 74511c4731 | |
Daniel Flanagan | b2d18aaf78 | |
Daniel Flanagan | be04b8aaf0 | |
Daniel Flanagan | a037661cf4 | |
Daniel Flanagan | aeddca41b1 | |
Daniel Flanagan | 780686f185 | |
Daniel Flanagan | a7b4b583e4 | |
Daniel Flanagan | e3adbdf814 | |
Daniel Flanagan | 1939ce2e3d |
|
@ -5,6 +5,4 @@
|
|||
*.secret
|
||||
fishd.tmp.*
|
||||
|
||||
# TODO: should be unnecessary once color generation is homegrown
|
||||
/colors/gen/vendor
|
||||
/colors/gen/tmp
|
||||
/tags
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env fish
|
||||
tmux-lyte-session dotfiles $DOTFILES_PATH
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env sh
|
||||
d="$(command ls $ENV_PATH | fzf)" && \
|
||||
tmux-lyte-session "env-$d" "$ENV_PATH/$d"
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
tmux list-sessions
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set session_name $argv[1]
|
||||
set dir (set -q $argv[2] && echo $argv2 || pwd)
|
||||
tmux new-session -D -s $session_name -c $dir || \
|
||||
tmux attach-session -d -t $session_name
|
|
@ -1 +0,0 @@
|
|||
vendor
|
|
@ -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
|
|
@ -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)}
|
||||
|
|
@ -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"
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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"
|
|
@ -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
|
|
@ -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
|
||||
]===]
|
|
@ -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"
|
|
@ -1,37 +1,17 @@
|
|||
#!/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
|
||||
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
|
||||
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"
|
||||
|
||||
if [ -n "$TMUX" ]; then
|
||||
# tell tmux to pass the escape sequences through
|
||||
|
@ -53,33 +33,27 @@ 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
|
||||
|
||||
# foreground / background / cursor color
|
||||
if [ -n "$ITERM_SESSION_ID" ]; then
|
||||
# iTerm2 proprietary escape codes
|
||||
printf $printf_template_custom Pg f8f8f2 # forground
|
||||
|
@ -90,36 +64,25 @@ 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 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
|
||||
unset printf_template_custom
|
||||
|
|
|
@ -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" # black2
|
||||
white2="f8f8f8" # white2
|
||||
|
||||
# 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
|
||||
printf "\e]P%d%s" "$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"
|
||||
printf "\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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -107,6 +107,7 @@ alias dd "dd status=progress"
|
|||
alias wifi "sudo iwctl"
|
||||
alias year 'cal (date +%Y)'
|
||||
alias mount 'sudo -E mount'
|
||||
alias umount 'sudo -E umount'
|
||||
alias pa pulsemixer
|
||||
alias mail neomutt
|
||||
alias wje work-journal-entry
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
font_family Iosevka
|
||||
bold_font Iosevka Heavy
|
||||
font_size 11.0
|
||||
|
||||
font_features Iosevka -calt +FSTA +MTLB +HSKL +JSPT +dlig
|
||||
|
||||
allow_remote_control yes
|
||||
repaint_delay 5
|
||||
input_delay 5
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/*
|
||||
!/.gitignore
|
||||
!/init.vim
|
||||
!/nvim_lsp.lua
|
||||
!/init.lua
|
||||
!/ftplugin
|
||||
!/lua
|
||||
!/coc-settings.json
|
||||
!/colors
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"coc.preferences.formatOnSaveFiletypes": ["ex", "exs", "elixir"],
|
||||
"diagnostic-languageserver.filetypes": {
|
||||
"elixir": ["mix_credo", "mix_credo_compile"],
|
||||
"eelixir": ["mix_credo", "mix_credo_compile"],
|
||||
"sh": "shellcheck"
|
||||
},
|
||||
"diagnostic-languageserver.formatFiletypes": {
|
||||
"sh": "shfmt"
|
||||
},
|
||||
"elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh",
|
||||
"codeLens.enable": true
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/home/daniel/.home/.config/lytedev-dotfiles/common/colors/vim
|
|
@ -0,0 +1,150 @@
|
|||
" let s:black = '00'
|
||||
" let s:black2 = '08'
|
||||
" let s:white = '07'
|
||||
" let s:white2 = '15'
|
||||
" let s:red = '01'
|
||||
" let s:green = '02'
|
||||
" let s:yellow = '03'
|
||||
" let s:blue = '04'
|
||||
" let s:magenta = '05'
|
||||
" let s:cyan = '06'
|
||||
|
||||
" let s:cterm02 = '19'
|
||||
" let s:cterm04 = '20'
|
||||
" let s:cterm06 = '21'
|
||||
" let s:cterm09 = '16'
|
||||
" let s:cterm0F = '17'
|
||||
|
||||
hi clear
|
||||
syntax reset
|
||||
|
||||
hi normal cterm=none ctermfg=7
|
||||
hi bold cterm=bold
|
||||
|
||||
hi statusline cterm=none ctermfg=7 ctermbg=234
|
||||
hi statuslinenc cterm=none ctermfg=234 ctermbg=0
|
||||
hi inactivebuffer cterm=none ctermbg=234 ctermfg=7
|
||||
hi activebuffer cterm=none ctermfg=0 ctermbg=4
|
||||
hi dirtybuffer cterm=none ctermfg=0 ctermbg=1
|
||||
hi activedirtybuffer cterm=none ctermfg=0 ctermbg=3
|
||||
hi linenr cterm=none ctermfg=236
|
||||
hi indentblanklinechar cterm=none ctermfg=236
|
||||
hi signcolumn cterm=none ctermfg=234 ctermbg=0
|
||||
hi matchparen cterm=none ctermbg=5 ctermfg=0
|
||||
hi search cterm=bold ctermbg=4
|
||||
|
||||
hi todo cterm=none ctermfg=7 ctermbg=236
|
||||
hi comment cterm=none ctermfg=236
|
||||
hi keyword cterm=none ctermfg=7
|
||||
hi operator cterm=none ctermfg=7
|
||||
hi repeat cterm=none ctermfg=1
|
||||
hi type cterm=none ctermfg=3
|
||||
hi string cterm=none ctermfg=2
|
||||
hi noise cterm=none ctermfg=5 ctermbg=0
|
||||
hi statement cterm=none ctermfg=1 ctermbg=0
|
||||
hi conditional cterm=none ctermfg=1 ctermbg=0
|
||||
hi structure cterm=none ctermfg=4 ctermbg=0
|
||||
hi special cterm=none ctermfg=5 ctermbg=0
|
||||
hi preproc cterm=none ctermfg=1 ctermbg=0
|
||||
hi identifier cterm=none ctermfg=4 ctermbg=0
|
||||
hi constant cterm=none ctermfg=1
|
||||
hi nontext ctermfg=0 ctermbg=0
|
||||
|
||||
" TODO: diagnostics popups, telescope dialogs
|
||||
|
||||
hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0
|
||||
hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0
|
||||
|
||||
hi TelescopeBorder ctermfg=234
|
||||
hi TelescopePromptBorder ctermfg=234
|
||||
hi TelescopeResultsBorder ctermfg=234
|
||||
hi TelescopePreviewBorder ctermfg=234
|
||||
|
||||
hi TelescopeSelection ctermbg=234 ctermfg=7
|
||||
hi TelescopeSelectionCaret ctermfg=7
|
||||
hi TelescopeMultiSelection ctermfg=7
|
||||
hi TelescopeNormal ctermfg=7
|
||||
|
||||
hi TelescopeMatching ctermfg=0 ctermbg=4
|
||||
hi TelescopePromptPrefix guifg=red
|
||||
|
||||
" vim tui elements
|
||||
" 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('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
|
||||
" 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, '', '', '')
|
||||
" 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, '', '')
|
||||
" 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)
|
|
@ -0,0 +1,52 @@
|
|||
vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim'
|
||||
|
||||
-- TODO: learn about the wildmenu `q:`
|
||||
-- TODO: what is `let &fcs = 'eob: '` for?
|
||||
|
||||
require('plugins').setup()
|
||||
require'options'
|
||||
require'keymap'
|
||||
require('fold').setup()
|
||||
-- require('lsp').setup()
|
||||
require('statusline').setup()
|
||||
|
||||
function Dbg(a, d)
|
||||
if d == nil then d = 0 end
|
||||
if type(a) == 'table' then
|
||||
local s = '{\n'
|
||||
local indent = string.rep(' ', d)
|
||||
for k,v in pairs(a) do
|
||||
s = s .. ' ' .. indent .. tostring(k) .. '=' .. Dbg(v, d+1) .. '\n'
|
||||
end
|
||||
return s .. '\n' .. indent .. '}'
|
||||
elseif type(a) == 'string' then
|
||||
return a
|
||||
elseif type(a) == 'number' then
|
||||
return tostring(a)
|
||||
else
|
||||
return 'type:'..type(a)..',tostring:'..tostring(a)
|
||||
end
|
||||
end
|
||||
|
||||
local plugin_setups = {
|
||||
telescope = {
|
||||
defaults = {
|
||||
prompt_prefix = "",
|
||||
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
|
|
@ -1,262 +0,0 @@
|
|||
set fileencoding=utf8
|
||||
|
||||
let $vimdir = $XDG_CONFIG_HOME.'/nvim'
|
||||
|
||||
if empty(glob($vimdir.'/autoload/plug.vim'))
|
||||
silent !curl -fLo $vimdir/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $vimdir.'/init.vim'
|
||||
endif
|
||||
|
||||
" let g:coc_global_extensions = ['coc-elixir', 'coc-diagnostic']
|
||||
let g:completion_enable_auto_popup = 0
|
||||
let g:indent_guide_auto_colors = 1
|
||||
let g:indent_guides_enable_on_vim_startup = 1
|
||||
let g:jsonnet_fmt_on_save = 0
|
||||
let g:skipview_files = ['COMMIT_EDITMSG']
|
||||
let g:prosession_dir = $vimdir.'/sessions'
|
||||
" let g:fzf_preview_window = ['down:40%:hidden', 'ctrl-/']
|
||||
|
||||
call plug#begin($vimdir.'/plugged')
|
||||
Plug 'junegunn/vim-plug' " plugin manager should manage itself
|
||||
Plug 'sheerun/vim-polyglot' " handles language-specific configuration
|
||||
Plug 'neovim/nvim-lspconfig' " deeper language integration via language servers
|
||||
Plug 'nvim-lua/completion-nvim' " language server completion
|
||||
Plug 'junegunn/fzf' " fzf
|
||||
Plug 'junegunn/fzf.vim' " helpers for using fzf in vim
|
||||
Plug 'editorconfig/editorconfig-vim' " loads project-specific editor settings
|
||||
Plug 'tpope/vim-sleuth' " try and detect indent method
|
||||
Plug 'vim-scripts/LargeFile' " gracefully handle very large files
|
||||
Plug 'vim-scripts/restore_view.vim' " persistent buffer views
|
||||
Plug 'nathanaelkane/vim-indent-guides' " indentation guides
|
||||
Plug 'christoomey/vim-tmux-navigator' " allow window navigation to play nicely with tmux
|
||||
Plug 'tpope/vim-commentary' " toggle comments in code easily
|
||||
Plug 'tpope/vim-repeat' " better vim repeating for plugin-provided actions
|
||||
Plug 'machakann/vim-sandwich' " quickly modify text surrounding objects
|
||||
Plug 'michaeljsmith/vim-indent-object' " adds an indentation level text object
|
||||
Plug 'bkad/CamelCaseMotion' " camel case and underscore word movements
|
||||
Plug 'wellle/targets.vim' " adds some more handy text objects
|
||||
Plug 'tpope/vim-obsession' " even better session handling
|
||||
Plug 'dhruvasagar/vim-prosession' " even better session handling
|
||||
Plug 'jjo/vim-cue' " CUE lang
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
call plug#end()
|
||||
|
||||
" luafile $vimdir/lsp.lua
|
||||
" autocmd BufEnter * lua require('completion').on_attach()
|
||||
|
||||
filetype on
|
||||
filetype indent on
|
||||
filetype plugin on
|
||||
|
||||
" use :h option-list if you need to know what these do
|
||||
set encoding=utf8
|
||||
set tabstop=2 shiftwidth=2 softtabstop=2 noexpandtab
|
||||
set autoindent smartindent
|
||||
set list nostartofline listchars=trail:·,tab:\ \ ,trail:~
|
||||
set linebreak formatoptions=crql1jn " TODO: see if there is more in `:h fo-table`
|
||||
set synmaxcol=200
|
||||
set lazyredraw
|
||||
set scrolloff=8 sidescrolloff=15
|
||||
set mouse=a
|
||||
set splitright splitbelow
|
||||
set noerrorbells visualbell t_vb=
|
||||
set nobackup nowritebackup noswapfile
|
||||
set timeout ttimeoutlen=100 timeoutlen=150
|
||||
set hidden shortmess+=Iac
|
||||
set history=1000
|
||||
set undofile undodir=$vimdir/undo undolevels=1000 undoreload=10000
|
||||
set spellfile=$vimdir/spell/en.utf-8.add
|
||||
set ignorecase smartcase incsearch wrapscan hlsearch
|
||||
set foldmethod=syntax foldlevel=99 foldnestmax=10 foldlevelstart=99 " TODO: get good at folding
|
||||
set noautowrite autochdir autoread
|
||||
set nomodeline noshowmode noshowcmd laststatus=2 noruler
|
||||
set clipboard+=unnamedplus
|
||||
set t_Co=256
|
||||
let &fcs = 'eob: '
|
||||
|
||||
syntax enable
|
||||
colorscheme base16-donokai
|
||||
|
||||
hi Search cterm=NONE ctermbg=blue ctermfg=black
|
||||
hi LineNr ctermbg=none ctermfg=8
|
||||
hi CursorLineNr ctermbg=18 ctermfg=gray
|
||||
hi IndentGuidesEven ctermbg=18
|
||||
hi Normal ctermbg=NONE
|
||||
hi ColorColumn ctermbg=18
|
||||
hi TooLongColorColumn ctermbg=18 ctermfg=1
|
||||
hi ActiveBuffer ctermbg=4 ctermfg=0
|
||||
hi DirtyBuffer ctermbg=3 ctermfg=0
|
||||
hi StatusLine ctermbg=18 ctermfg=7
|
||||
hi StatusLineNC ctermbg=18 ctermfg=7
|
||||
|
||||
call matchadd('ColorColumn', '\%81v', 100)
|
||||
call matchadd('TooLongColorColumn', '\%121v', 200)
|
||||
|
||||
command! W write
|
||||
|
||||
inoremap jj <Esc>
|
||||
inoremap jJ <Esc>
|
||||
inoremap Jj <Esc>
|
||||
inoremap JJ <Esc>
|
||||
inoremap jk <Esc>
|
||||
inoremap jK <Esc>
|
||||
inoremap Jk <Esc>
|
||||
inoremap JK <Esc>
|
||||
|
||||
nnoremap <C-q> :qa<CR>
|
||||
inoremap <C-q> <Esc><C-q>
|
||||
|
||||
nnoremap <C-p> :GitFiles<CR>
|
||||
nnoremap <C-o> :Files<CR>
|
||||
nnoremap <C-u> :GFiles?<CR>
|
||||
nnoremap <C-b> :Buffers<CR>
|
||||
|
||||
nnoremap <C-h> :TmuxNavigateLeft<CR>
|
||||
nnoremap <C-j> :TmuxNavigateDown<CR>
|
||||
nnoremap <C-k> :TmuxNavigateUp<CR>
|
||||
nnoremap <C-l> :TmuxNavigateRight<CR>
|
||||
tnoremap <C-h> <C-\><C-n>:TmuxNavigateLeft<CR>
|
||||
tnoremap <C-j> <C-\><C-n>:TmuxNavigateDown<CR>
|
||||
tnoremap <C-k> <C-\><C-n>:TmuxNavigateUp<CR>
|
||||
tnoremap <C-l> <C-\><C-n>:TmuxNavigateRight<CR>
|
||||
|
||||
map <silent> ,w <Plug>CamelCaseMotion_w
|
||||
map <silent> ,b <Plug>CamelCaseMotion_b
|
||||
map <silent> ,e <Plug>CamelCaseMotion_e
|
||||
map <silent> ,ge <Plug>CamelCaseMotion_ge
|
||||
omap <silent> ib <Plug>CamelCaseMotion_ib
|
||||
xmap <silent> ib <Plug>CamelCaseMotion_ib
|
||||
omap <silent> ie <Plug>CamelCaseMotion_ie
|
||||
xmap <silent> ie <Plug>CamelCaseMotion_ie
|
||||
|
||||
map <F3> mw:%s/\s\+$//<CR>:let @/ = ""<CR>'w
|
||||
map <F4> :setlocal spell!<CR>
|
||||
|
||||
nnoremap <expr> n 'Nn'[v:searchforward]
|
||||
nnoremap <expr> N 'nN'[v:searchforward]
|
||||
|
||||
cnoremap <c-n> <down>
|
||||
cnoremap <c-p> <up>
|
||||
|
||||
xnoremap < <gv
|
||||
xnoremap > >gv
|
||||
|
||||
nnoremap gd :call CocAction('jumpDefinition')<CR>
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy :call CocActionAsync('doHover')<CR>
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" TODO: learn about the wildmenu `q:`
|
||||
|
||||
let mapleader = "\<Space>"
|
||||
nnoremap <silent> <leader>r :source $vimdir/init.vim<CR>:echo 'Reloaded init.vim'<CR>
|
||||
nnoremap <silent> <leader>gv :e $vimdir/init.vim<CR>
|
||||
nnoremap <silent> <leader>w :bd<CR>
|
||||
nnoremap <silent> <leader>h :b#<CR>
|
||||
nnoremap <silent> <leader>k :bnext<CR>
|
||||
nnoremap <silent> <leader>j :bprevious<CR>
|
||||
nnoremap <leader>/ :let @/ = ""<CR>:<BACKSPACE>
|
||||
|
||||
nnoremap <leader>t :split<CR>:term<CR>:resize 24<CR>:startinsert<CR>
|
||||
tnoremap <C-w> <C-\><C-n>:q!<CR>
|
||||
|
||||
function! NeatFoldText()
|
||||
" TODO: finish this!
|
||||
let lines_count = v:foldend - v:foldstart + 1
|
||||
let foldchar = matchstr(&fillchars, 'fold:\zs.')
|
||||
let foldtextstart = strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
|
||||
let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count)
|
||||
let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
|
||||
return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count)
|
||||
endfunction
|
||||
set foldtext=NeatFoldText()
|
||||
|
||||
" TODO: only update this portion when needed instead of every render?
|
||||
function! StatusLineBufferByNum(bufnum)
|
||||
let l:bufinfo = getbufinfo(a:bufnum)[0]
|
||||
let l:prefix = ' %#InactiveBuffer#'
|
||||
let l:suffix = '%* '
|
||||
|
||||
if l:bufinfo.changed
|
||||
let l:prefix = '%#DirtyBuffer# '
|
||||
let l:suffix = ' %*'
|
||||
end
|
||||
|
||||
if l:bufinfo['hidden'] == 0 && index(l:bufinfo['windows'], g:statusline_winid) >= 0
|
||||
let l:prefix = '%#ActiveBuffer# '
|
||||
let l:suffix = ' %*'
|
||||
if l:bufinfo.changed
|
||||
let l:prefix = '%#ActiveBuffer# *'
|
||||
let l:suffix = ' %*'
|
||||
end
|
||||
endif
|
||||
|
||||
return l:prefix . fnamemodify(bufname(a:bufnum), ':t') . l:suffix
|
||||
endfunction
|
||||
|
||||
au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif
|
||||
|
||||
let g:status_line_max_length = 5
|
||||
function! StatusLineBuffers()
|
||||
" TODO: mark buffers with unsaved changes
|
||||
let l:active_index = -1
|
||||
let l:acc = []
|
||||
for l:bufnum in nvim_list_bufs()
|
||||
let l:bufinfo = getbufinfo(l:bufnum)[0]
|
||||
if l:bufinfo.listed == 0
|
||||
continue
|
||||
end
|
||||
let l:entry = StatusLineBufferByNum(bufnum)
|
||||
let l:acc = add(l:acc, l:entry)
|
||||
if l:entry =~ "^%#ActiveBuffer#"
|
||||
let l:active_index = index(l:acc, l:entry)
|
||||
endif
|
||||
endfor
|
||||
if l:active_index >= 0
|
||||
" TODO: instead implement this as a wraparound carousel?
|
||||
let l:offset = g:status_line_max_length / 2
|
||||
let l:min_buf_num = max([0, (l:active_index - offset)])
|
||||
let l:max_buf_num = min([(len(l:acc) - 1), (l:min_buf_num + g:status_line_max_length - 1)])
|
||||
let l:min_buf_num = max([0, (l:max_buf_num - g:status_line_max_length + 1)])
|
||||
let l:buflist = join(l:acc[(l:min_buf_num):(l:max_buf_num)], '')
|
||||
let l:prefix = ""
|
||||
let l:suffix = ""
|
||||
if l:min_buf_num > 0
|
||||
let l:prefix = "< "
|
||||
endif
|
||||
if l:max_buf_num < len(l:acc) - 1
|
||||
let l:suffix = " >"
|
||||
endif
|
||||
return l:prefix . l:buflist . l:suffix
|
||||
else
|
||||
return join(l:acc, '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! StatusLine()
|
||||
" try
|
||||
return StatusLineBuffers().'%*%=%c,%l/%L (%p%%)'
|
||||
" catch
|
||||
" return 'buflisterr%*%=%c,%l/%L (%p%%)'
|
||||
" endtry
|
||||
endfunction
|
||||
|
||||
augroup slime | au! BufNewFile,BufRead *.slimleex set syntax=slim | augroup END
|
||||
augroup ctmpl | au! BufNewFile,BufRead *.ctmpl set syntax=gohtmltmpl | augroup END
|
||||
|
||||
" set laststatus=0 showtabline tabline=%!StatusLine()
|
||||
set statusline=%!StatusLine()
|
||||
|
||||
imap <silent> <c-n> <Plug>(completion_trigger)
|
||||
|
||||
if filereadable(expand($ENV_PATH.'/init.vim'))
|
||||
source "$ENV_PATH/init.vim"
|
||||
endif
|
||||
|
||||
for f in glob($ENV_PATH.'/*/init.d.vim', 0, 1)
|
||||
source "$f"
|
||||
endfor
|
||||
|
||||
set number
|
|
@ -0,0 +1,12 @@
|
|||
function NeatFoldText()
|
||||
-- TODO: finish this!
|
||||
-- local lines_count = vim.foldend - vim.foldstart + 1
|
||||
-- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.')
|
||||
-- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
|
||||
-- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count)
|
||||
-- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
|
||||
-- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count)
|
||||
end
|
||||
-- set foldtext=NeatFoldText()
|
||||
|
||||
return {setup = function() end}
|
|
@ -0,0 +1,67 @@
|
|||
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},
|
||||
n = {noremap = true},
|
||||
sn = {silent = true, noremap = true},
|
||||
}
|
||||
local keymap = {
|
||||
n = {
|
||||
['<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>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>',
|
||||
['<c-g>'] = '<cmd>Telescope live_grep<cr>',
|
||||
['<c-b>'] = '<cmd>Telescope buffers<cr>',
|
||||
['<leader>t'] = '<cmd>Telescope help_tags<cr>',
|
||||
['<c-h>'] = ':TmuxNavigateLeft<cr>',
|
||||
['<c-j>'] = ':TmuxNavigateDown<cr>',
|
||||
['<c-k>'] = ':TmuxNavigateUp<cr>',
|
||||
['<c-l>'] = ':TmuxNavigateRight<cr>',
|
||||
['<expr> n'] = "'Nn'[v:searchforward]",
|
||||
['<expr> N'] = "'nN'[v:searchforward]",
|
||||
},
|
||||
t = {},
|
||||
[''] = {
|
||||
['<space>'] = {'<nop>', m.sn},
|
||||
['<f3>'] = 'mw:%s/\\s\\+$//<cr>:let @/ = ""<cr>\'w',
|
||||
['<f4>'] = ':setlocal spell!<cr>',
|
||||
[',w'] = {'<Plug>CamelCaseMotion_w', m.s},
|
||||
[',b'] = {'<Plug>CamelCaseMotion_b', m.s},
|
||||
[',e'] = {'<Plug>CamelCaseMotion_e', m.s},
|
||||
[',ge'] = {'<Plug>CamelCaseMotion_ge', m.s},
|
||||
},
|
||||
o = {
|
||||
['ib'] = {'<Plug>CamelCaseMotion_ib', m.s},
|
||||
['ie'] = {'<Plug>CamelCaseMotion_ie', m.s},
|
||||
},
|
||||
x = {
|
||||
['<'] = '<gv',
|
||||
['>'] = '>gv',
|
||||
['ib'] = {'<Plug>CamelCaseMotion_ib', m.s},
|
||||
['ie'] = {'<Plug>CamelCaseMotion_ie', m.s},
|
||||
},
|
||||
c = {
|
||||
['<c-n>'] = '<down>',
|
||||
['<c-p>'] = '<up>',
|
||||
},
|
||||
i = {
|
||||
['<c-q>'] = '<esc><c-q>',
|
||||
['<c-n>'] = {'<Plug>(completion_trigger)', m.s},
|
||||
},
|
||||
}
|
||||
for mode,mappings in pairs(keymap) do
|
||||
for key,bind in pairs(mappings) do
|
||||
if type(bind) == 'table' then
|
||||
vim.api.nvim_set_keymap(mode, key, bind[1], bind[2])
|
||||
else
|
||||
vim.api.nvim_set_keymap(mode, key, bind, {})
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,86 @@
|
|||
local opts = {noremap=true, silent=true}
|
||||
|
||||
vim.api.nvim_set_keymap('n', '[g', '<Plug>(coc-diagnostic-prev)', opts)
|
||||
vim.api.nvim_set_keymap('n', ']g', '<Plug>(coc-diagnostic-next)', opts)
|
||||
|
||||
vim.api.nvim_set_keymap('n', 'gd', '<Plug>(coc-definition)', opts)
|
||||
vim.api.nvim_set_keymap('n', 'gy', '<Plug>(coc-type-definition)', opts)
|
||||
|
||||
local nvim_lsp = require('lspconfig')
|
||||
local on_attach = function(_client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
local kmaps = {
|
||||
['gD']='<Cmd>lua vim.lsp.buf.declaration()<CR>'
|
||||
}
|
||||
|
||||
for k,v in pairs(kmaps) do
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', k, v, opts)
|
||||
end
|
||||
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
end
|
||||
|
||||
local servers = {'clangd', 'rust_analyzer', 'pyright', 'tsserver'}
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup{on_attach=on_attach}
|
||||
end
|
||||
|
||||
local sumneko_root_path = vim.fn.getenv('HOME')..'/.local/bin/sumneko_lua'
|
||||
local sumneko_binary_path = '/bin/linux/lua-language-server'
|
||||
nvim_lsp.sumneko_lua.setup{
|
||||
cmd={sumneko_root_path .. sumneko_binary_path, '-E', sumneko_root_path..'/main.lua'};
|
||||
on_attach=on_attach,
|
||||
settings={
|
||||
Lua={
|
||||
runtime={
|
||||
version='LuaJIT',
|
||||
path=vim.split(package.path, ';'),
|
||||
},
|
||||
diagnostics={
|
||||
globals={'vim'},
|
||||
},
|
||||
workspace={
|
||||
library={
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
|
||||
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.cmd "command! Format execute 'lua vim.lsp.buf.formatting()'"
|
||||
vim.o.completeopt = 'menuone,noinsert'
|
||||
|
||||
--[[require'compe'.setup{
|
||||
enabled=true,
|
||||
autocomplete=true,
|
||||
debug=false,
|
||||
min_length=1,
|
||||
preselect='enable',
|
||||
throttle_time=80,
|
||||
source_timeout=200,
|
||||
incomplete_delay=400,
|
||||
max_abbr_width=100,
|
||||
max_kind_width=100,
|
||||
max_menu_width=100,
|
||||
documentation=true,
|
||||
source={path=true, nvim_lsp=true},
|
||||
}
|
||||
]]--
|
||||
|
||||
return {
|
||||
setup=function()
|
||||
end
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
local globals = {
|
||||
mapleader = ' ',
|
||||
maplocalleader = ' ',
|
||||
completion_enable_auto_popup = 0,
|
||||
skipview_files = {'COMMIT_EDITMSG'},
|
||||
indent_blankline_char = '▏',
|
||||
indent_blankline_filetype_exclude = {'help', 'packer'},
|
||||
indent_blankline_buftype_exclude = {'terminal', 'nofile'},
|
||||
indent_blankline_char_highlight = 'LineNr',
|
||||
}
|
||||
for k,v in pairs(globals) do vim.g[k] = v end
|
||||
|
||||
local options = {
|
||||
inccommand = 'nosplit',
|
||||
tabstop = 2,
|
||||
softtabstop = 2,
|
||||
shiftwidth = 2,
|
||||
smartindent = true,
|
||||
list = true,
|
||||
listchars = 'trail:·,tab: ',
|
||||
linebreak = true,
|
||||
formatoptions = 'crql1jn',
|
||||
synmaxcol = 200,
|
||||
lazyredraw = true,
|
||||
scrolloff = 8,
|
||||
sidescrolloff = 15,
|
||||
mouse = 'a',
|
||||
splitright = true,
|
||||
splitbelow = true,
|
||||
errorbells = false,
|
||||
visualbell = true,
|
||||
backup = false,
|
||||
writebackup = false,
|
||||
swapfile = false,
|
||||
timeout = true,
|
||||
timeoutlen = 150,
|
||||
hidden = true,
|
||||
shortmess = 'filnxToOFIac',
|
||||
history = 1000,
|
||||
undofile = true,
|
||||
undodir = vim.g.vimdir .. '/undo',
|
||||
undolevels = 1000,
|
||||
undoreload = 1000,
|
||||
spellfile = vim.g.vimdir .. '/spell/en.utf-8.add',
|
||||
ignorecase = true,
|
||||
smartcase = true,
|
||||
incsearch = true,
|
||||
wrapscan = true,
|
||||
hlsearch = true,
|
||||
foldmethod = 'syntax',
|
||||
foldlevel = 99,
|
||||
foldnestmax = 10,
|
||||
foldlevelstart = 99,
|
||||
autowrite = false,
|
||||
autochdir = true,
|
||||
autoread = true,
|
||||
modeline = false,
|
||||
showmode = false,
|
||||
showcmd = false,
|
||||
laststatus = 2,
|
||||
ruler = false,
|
||||
number = true,
|
||||
}
|
||||
for k,v in pairs(options) do
|
||||
vim.o[k] = v
|
||||
end
|
||||
|
||||
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
|
||||
-- ]]
|
|
@ -0,0 +1,43 @@
|
|||
local setup = function()
|
||||
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
|
||||
|
||||
local packer = require'packer'
|
||||
packer.startup(function()
|
||||
local plugins = {
|
||||
'wbthomason/packer.nvim',
|
||||
'editorconfig/editorconfig-vim',
|
||||
'tpope/vim-sleuth',
|
||||
'vim-scripts/LargeFile',
|
||||
'vim-scripts/restore_view.vim',
|
||||
'christoomey/vim-tmux-navigator',
|
||||
'tpope/vim-fugitive',
|
||||
'tpope/vim-rhubarb',
|
||||
'tpope/vim-commentary',
|
||||
'tpope/vim-repeat',
|
||||
'machakann/vim-sandwich',
|
||||
'michaeljsmith/vim-indent-object',
|
||||
'wellle/targets.vim',
|
||||
'bkad/CamelCaseMotion',
|
||||
'ludovicchabant/vim-gutentags',
|
||||
'tpope/vim-obsession',
|
||||
'dhruvasagar/vim-prosession',
|
||||
{'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}},
|
||||
'joshdick/onedark.vim',
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
{'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}},
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/nvim-compe',
|
||||
'sheerun/vim-polyglot',
|
||||
{'neoclide/coc.nvim', branch = 'release'},
|
||||
}
|
||||
for _,plugin in ipairs(plugins) do
|
||||
packer.use(plugin)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return {setup = setup}
|
|
@ -0,0 +1,80 @@
|
|||
local fn = vim.fn
|
||||
local api = vim.api
|
||||
local status_line_max_length = 5
|
||||
|
||||
-- TODO: only update this portion when needed instead of every render?
|
||||
local status_line_buffer_by_num = function(bufnum)
|
||||
local is_active = false
|
||||
local bufinfo = fn.getbufinfo(bufnum)[1]
|
||||
local prefix = ' %#InactiveBuffer#'
|
||||
local suffix = '%* '
|
||||
|
||||
if bufinfo.changed == 1 then
|
||||
prefix = '%#DirtyBuffer# '
|
||||
suffix = ' %*'
|
||||
end
|
||||
|
||||
local windex = fn.index(bufinfo.windows, vim.g.statusline_winid)
|
||||
if bufinfo.hidden and windex >= 0 then
|
||||
is_active = true
|
||||
prefix = '%#ActiveBuffer# '
|
||||
suffix = ' %*'
|
||||
if bufinfo.changed == 1 then
|
||||
prefix = '%#ActiveDirtyBuffer# *'
|
||||
suffix = ' %*'
|
||||
end
|
||||
end
|
||||
|
||||
return (prefix .. fn.fnamemodify(fn.bufname(bufnum), ':t') .. suffix), is_active
|
||||
end
|
||||
|
||||
local status_line_buffers = function()
|
||||
-- TODO: mark buffers with unsaved changes
|
||||
|
||||
local active_index = -1
|
||||
local acc = {}
|
||||
for _,bufnum in ipairs(api.nvim_list_bufs()) do
|
||||
local bufinfo = fn.getbufinfo(bufnum)[1]
|
||||
if bufinfo.listed ~= 0 then
|
||||
local entry, is_active = status_line_buffer_by_num(bufnum)
|
||||
table.insert(acc, entry)
|
||||
if is_active then
|
||||
active_index = #acc
|
||||
end
|
||||
end
|
||||
end
|
||||
if active_index >= 0 then
|
||||
-- TODO: instead implement this as a wraparound carousel?
|
||||
local offset = status_line_max_length / 2
|
||||
local min_buf_num = math.max(0, (active_index - offset))
|
||||
local max_buf_num = math.min(#acc - 1, min_buf_num + status_line_max_length - 1)
|
||||
min_buf_num = math.max(0, max_buf_num - status_line_max_length + 1)
|
||||
local buflist = table.concat({unpack(acc, min_buf_num+1, max_buf_num+1)}, '')
|
||||
local prefix = ''
|
||||
local suffix = ''
|
||||
if min_buf_num > 0 then
|
||||
prefix = '< '
|
||||
end
|
||||
if max_buf_num < (#acc - 1) then
|
||||
suffix = ' >'
|
||||
end
|
||||
return prefix .. buflist .. suffix
|
||||
else
|
||||
local suffix = ''
|
||||
if #acc - 1 >status_line_max_length then
|
||||
suffix = ' >'
|
||||
end
|
||||
local buflist = table.concat({unpack(acc, 1, math.min(#acc, status_line_max_length))}, '')
|
||||
return buflist .. suffix .. active_index
|
||||
end
|
||||
end
|
||||
|
||||
function StatusLine()
|
||||
return status_line_buffers() .. '%*%=%c,%l/%L (%p%%)'
|
||||
end
|
||||
|
||||
return {
|
||||
setup=function()
|
||||
vim.o.statusline = '%!v:lua.StatusLine()'
|
||||
end
|
||||
}
|
|
@ -31,6 +31,7 @@ yay -Sy --needed --noconfirm \
|
|||
neovim-nightly-bin `# Text Editors` \
|
||||
sc-im `# Spreadsheets` \
|
||||
unzip `# Simple Unzipping` \
|
||||
ctags `# Tags` \
|
||||
tmux `# Terminal Multiplexer` \
|
||||
kitty `# Almost Better Terminal Emulator` \
|
||||
curl `# HTTP Utility` \
|
||||
|
|
|
@ -32,6 +32,12 @@ profile desktop-ultrawide {
|
|||
exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh"
|
||||
}
|
||||
|
||||
profile laptop-with-display {
|
||||
output "Sharp Corporation 0x144A 0x00000000" enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal
|
||||
output DP-1 enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal
|
||||
exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-single-workspace.bash"
|
||||
}
|
||||
|
||||
profile laptop {
|
||||
output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; }
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; }
|
||||
setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; }
|
||||
setup_output eDP-1 1 2 3 4 5 6 7 8 9
|
Reference in New Issue