summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Xresources/.Xresources/Tomorrow23
-rw-r--r--Xresources/.Xresources/Tomorrow-Night23
-rw-r--r--Xresources/.Xresources/Tomorrow-Night-Blue23
-rw-r--r--Xresources/.Xresources/Tomorrow-Night-Bright23
-rw-r--r--Xresources/.Xresources/Tomorrow-Night-Eighties23
-rw-r--r--Xresources/.Xresources/base.xresources (renamed from Xresources/.Xresources/base)0
m---------Xresources/.Xresources/base160
-rw-r--r--Xresources/.Xresources/seoul256.dark.xresources (renamed from Xresources/.Xresources/seoul256)2
-rw-r--r--Xresources/.Xresources/solarized.dark.xresources (renamed from Xresources/.Xresources/solarized-dark)2
-rw-r--r--Xresources/.Xresources/solarized.light.xresources (renamed from Xresources/.Xresources/solarized-light)2
-rw-r--r--Xresources/.Xresources/transparent.xresources (renamed from Xresources/.Xresources/transparent)2
m---------vim/.vim/vim-plug0
-rw-r--r--vim/.vimrc3
-rwxr-xr-xxinit/.xinitrc2
-rw-r--r--zsh/.zsh/functions59
-rw-r--r--zsh/.zshrc1
17 files changed, 46 insertions, 145 deletions
diff --git a/.gitmodules b/.gitmodules
index 64ed203..2e79e83 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,3 +7,6 @@
[submodule "zsh/.zsh/zgen"]
path = zsh/.zsh/zgen
url = https://github.com/tarjoilija/zgen
+[submodule "Xresources/.Xresources/base16"]
+ path = Xresources/.Xresources/base16
+ url = https://github.com/chriskempson/base16-xresources
diff --git a/Xresources/.Xresources/Tomorrow b/Xresources/.Xresources/Tomorrow
deleted file mode 100644
index 680fcc4..0000000
--- a/Xresources/.Xresources/Tomorrow
+++ /dev/null
@@ -1,23 +0,0 @@
-# include ".Xresources/base"
-
-URxvt*foreground: #4d4d4c
-URxvt*background: #ffffff
-URxvt*borderColor: #ffffff
-URxvt*cursorColor: #aeafad
-
-URxvt*color0: #000000
-URxvt*color8: #666666
-URxvt*color1: #c82829
-URxvt*color9: #FF3334
-URxvt*color2: #718c00
-URxvt*color10: #9ec400
-URxvt*color3: #f5871f
-URxvt*color11: #eab700
-URxvt*color4: #4271ae
-URxvt*color12: #4271ae
-URxvt*color5: #8959a8
-URxvt*color13: #b777e0
-URxvt*color6: #3e999f
-URxvt*color14: #54ced6
-URxvt*color7: #d6d6d6
-URxvt*color15: #efefef
diff --git a/Xresources/.Xresources/Tomorrow-Night b/Xresources/.Xresources/Tomorrow-Night
deleted file mode 100644
index cd6a958..0000000
--- a/Xresources/.Xresources/Tomorrow-Night
+++ /dev/null
@@ -1,23 +0,0 @@
-# include ".Xresources/base"
-
-URxvt*foreground: #c5c8c6
-URxvt*background: #1d1f21
-URxvt*borderColor: #1d1f21
-URxvt*cursorColor: #aeafad
-
-URxvt*color0: #000000
-URxvt*color8: #666666
-URxvt*color1: #cc6666
-URxvt*color9: #FF3334
-URxvt*color2: #b5bd68
-URxvt*color10: #9ec400
-URxvt*color3: #de935f
-URxvt*color11: #f0c674
-URxvt*color4: #81a2be
-URxvt*color12: #81a2be
-URxvt*color5: #b294bb
-URxvt*color13: #b777e0
-URxvt*color6: #8abeb7
-URxvt*color14: #54ced6
-URxvt*color7: #373b41
-URxvt*color15: #282a2e
diff --git a/Xresources/.Xresources/Tomorrow-Night-Blue b/Xresources/.Xresources/Tomorrow-Night-Blue
deleted file mode 100644
index 693ab61..0000000
--- a/Xresources/.Xresources/Tomorrow-Night-Blue
+++ /dev/null
@@ -1,23 +0,0 @@
-# include ".Xresources/base"
-
-URxvt*foreground: #ffffff
-URxvt*background: #002451
-URxvt*borderColor: #002451
-URxvt*cursorColor: #aeafad
-
-URxvt*color0: #000000
-URxvt*color8: #666666
-URxvt*color1: #ff9da4
-URxvt*color9: #FF3334
-URxvt*color2: #d1f1a9
-URxvt*color10: #9ec400
-URxvt*color3: #ffc58f
-URxvt*color11: #ffeead
-URxvt*color4: #bbdaff
-URxvt*color12: #bbdaff
-URxvt*color5: #ebbbff
-URxvt*color13: #b777e0
-URxvt*color6: #99ffff
-URxvt*color14: #54ced6
-URxvt*color7: #003f8e
-URxvt*color15: #00346e
diff --git a/Xresources/.Xresources/Tomorrow-Night-Bright b/Xresources/.Xresources/Tomorrow-Night-Bright
deleted file mode 100644
index 14f57b1..0000000
--- a/Xresources/.Xresources/Tomorrow-Night-Bright
+++ /dev/null
@@ -1,23 +0,0 @@
-# include ".Xresources/base"
-
-URxvt*foreground: #eaeaea
-URxvt*background: #000000
-URxvt*borderColor: #000000
-URxvt*cursorColor: #aeafad
-
-URxvt*color0: #000000
-URxvt*color8: #666666
-URxvt*color1: #d54e53
-URxvt*color9: #FF3334
-URxvt*color2: #b9ca4a
-URxvt*color10: #9ec400
-URxvt*color3: #e78c45
-URxvt*color11: #e7c547
-URxvt*color4: #7aa6da
-URxvt*color12: #7aa6da
-URxvt*color5: #c397d8
-URxvt*color13: #b777e0
-URxvt*color6: #70c0b1
-URxvt*color14: #54ced6
-URxvt*color7: #424242
-URxvt*color15: #2a2a2a
diff --git a/Xresources/.Xresources/Tomorrow-Night-Eighties b/Xresources/.Xresources/Tomorrow-Night-Eighties
deleted file mode 100644
index 0a7dff7..0000000
--- a/Xresources/.Xresources/Tomorrow-Night-Eighties
+++ /dev/null
@@ -1,23 +0,0 @@
-# include ".Xresources/base"
-
-URxvt*foreground: #cccccc
-URxvt*background: #2d2d2d
-URxvt.borderColor: #2d2d2d
-URxvt*cursorColor: #aeafad
-
-URxvt*color0: #000000
-URxvt*color8: #666666
-URxvt*color1: #f2777a
-URxvt*color9: #FF3334
-URxvt*color2: #99cc99
-URxvt*color10: #9ec400
-URxvt*color3: #f99157
-URxvt*color11: #ffcc66
-URxvt*color4: #6699cc
-URxvt*color12: #6699cc
-URxvt*color5: #cc99cc
-URxvt*color13: #b777e0
-URxvt*color6: #66cccc
-URxvt*color14: #54ced6
-URxvt*color7: #515151
-URxvt*color15: #393939
diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base.xresources
index 6a17306..6a17306 100644
--- a/Xresources/.Xresources/base
+++ b/Xresources/.Xresources/base.xresources
diff --git a/Xresources/.Xresources/base16 b/Xresources/.Xresources/base16
new file mode 160000
+Subproject 6c9a5bfa876dca27a20e2a701fb9bd851bbc107
diff --git a/Xresources/.Xresources/seoul256 b/Xresources/.Xresources/seoul256.dark.xresources
index 8b282e9..ad67aa5 100644
--- a/Xresources/.Xresources/seoul256
+++ b/Xresources/.Xresources/seoul256.dark.xresources
@@ -1,5 +1,3 @@
-# include ".Xresources/base"
-
! Border color
URxvt.borderColor: #3a3a3a
diff --git a/Xresources/.Xresources/solarized-dark b/Xresources/.Xresources/solarized.dark.xresources
index 1c51f21..c820c23 100644
--- a/Xresources/.Xresources/solarized-dark
+++ b/Xresources/.Xresources/solarized.dark.xresources
@@ -1,5 +1,3 @@
-# include ".Xresources/base"
-
URxvt.borderColor: #002b36
*background: #002b36
diff --git a/Xresources/.Xresources/solarized-light b/Xresources/.Xresources/solarized.light.xresources
index c4b962d..5d076f4 100644
--- a/Xresources/.Xresources/solarized-light
+++ b/Xresources/.Xresources/solarized.light.xresources
@@ -1,5 +1,3 @@
-# include ".Xresources/base"
-
URxvt.borderColor: #fdf6e3
*background: #fdf6e3
diff --git a/Xresources/.Xresources/transparent b/Xresources/.Xresources/transparent.xresources
index 0791609..39d696c 100644
--- a/Xresources/.Xresources/transparent
+++ b/Xresources/.Xresources/transparent.xresources
@@ -1,5 +1,3 @@
-# include "solarized-dark"
-
! True transparency
URxvt.transparent: true
URxvt.shading: 10
diff --git a/vim/.vim/vim-plug b/vim/.vim/vim-plug
-Subproject 0507fc897e3d4d95604e9d4298045eb6750d8ae
+Subproject 41de3c713c0b82700bfcb50a45e9d7756a2cce9
diff --git a/vim/.vimrc b/vim/.vimrc
index d084e70..9b17ea2 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -4,6 +4,7 @@ let maplocalleader = "\\"
"" Plugins
call plug#begin('~/.vim/plugged')
+Plug 'chriskempson/base16-vim'
Plug 'airblade/vim-gitgutter'
Plug 'altercation/vim-colors-solarized'
Plug 'beloglazov/vim-online-thesaurus'
@@ -199,7 +200,6 @@ set breakindent
let &showbreak='--> '
set colorcolumn=0
set scrolloff=0
-set t_Co=256
set guitablabel=%N\ %t\ %M
set showcmd
@@ -232,6 +232,7 @@ au BufNewFile,BufRead *.edp comp freefem
au BufNewFile,BufRead *.geo setf gmsh
" Colorscheme
+let base16colorspace=256
silent! colo $COLORSCHEME
if $BACKGROUND=="dark"
set background=dark
diff --git a/xinit/.xinitrc b/xinit/.xinitrc
index 92a562b..6b014cd 100755
--- a/xinit/.xinitrc
+++ b/xinit/.xinitrc
@@ -7,7 +7,7 @@ xset r rate 400 50
$HOME/bin/keyboard
# Load Xresources to light colorscheme
-xrdb -I$HOME ~/.Xresources/Tomorrow-Night-Eighties
+xrdb ~/.Xresources/base.xresources
# Background
feh --bg-fill --randomize /usr/share/backgrounds
diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions
index f916655..aad8b01 100644
--- a/zsh/.zsh/functions
+++ b/zsh/.zsh/functions
@@ -1,42 +1,63 @@
+#!/bin/zsh
+
if [[ -z ${ZSH_COLORS} ]]; then
ZSH_COLORS=${HOME}/.local/share/zsh/colors.zsh
fi
-if [[ -f ${ZSH_COLORS} ]]; then
- source ${ZSH_COLORS}
-fi
+colorschemes=$(echo ${HOME}/.Xresources/**/* | sed "s#${HOME}/.Xresources/##g" | sed 's#base16/base16-##g')
function colo {
# Xresource file
- XRESOURCE=$1
-
- if [[ "${XRESOURCE}" == *"-dark" ]]; then
- export COLORSCHEME=${XRESOURCE%-dark}
- export BACKGROUND="dark"
- elif [[ "${XRESOURCE}" == *"-light" ]]; then
- export COLORSCHEME=${XRESOURCE%-light}
- export BACKGROUND="light"
- else
- export COLORSCHEME=${XRESOURCE}
- export BACKGROUND=""
+ if [[ -z $1 ]]; then
+ XRESOURCE=$(echo ${colorschemes} | sed 's/ /\n/g' | fzf)
+ else
+ XRESOURCE=$1
+ fi
+ if [[ -z ${XRESOURCE} ]]; then
+ return
+ fi
+ if [[ ! -f ${HOME}/.Xresources/${XRESOURCE} ]]; then
+ XRESOURCE=base16/base16-${XRESOURCE}
+ fi
+ if [[ ! -f ${HOME}/.Xresources/${XRESOURCE} ]]; then
+ echo "Invalid colorscheme!"
+ return
fi
# Change colors for current session
- cat ~/.Xresources/${XRESOURCE} | tr -d ' \t' | sed -n \
+ /usr/bin/cpp ~/.Xresources/${XRESOURCE} | tr -d ' \t' | sed -n \
-e 's/.*background:/\x1b]11;/p' \
-e 's/.*foreground:/\x1b]10;/p' \
- -e 's/.*borderColor:/\x1b]708;/p' \
-e 's/.*color\([0-9][^:]*\):/\x1b]4;\1;/p' | tr \\n \\a
-
+
+ # Ensure border color is the same as background
+ bg=$(/usr/bin/cpp ~/.Xresources/${XRESOURCE} | grep "background" | sed 's/[^ ]\+[ ]\+\([^ ]\+\)$/\1/')
+ echo "\x1b]708;${bg}" | tr \\n \\a
+
# Load Xresources file for future sessions
- xrdb -I$HOME ~/.Xresources/${XRESOURCE}
+ xrdb ~/.Xresources/base.xresources
+ xrdb -merge ~/.Xresources/${XRESOURCE}
+ xrdb -merge <<< "URxvt.borderColor: ${bg}"
# Change default environment variable for future sessions
mkdir -p $(dirname ${ZSH_COLORS})
+
+ COLORSCHEME=$(echo $(basename ${XRESOURCE}) | sed 's/\([^.]\+\)\..\+$/\1/g')
+ BACKGROUND=$(echo ${XRESOURCE} | sed 's/^.\+\(dark\|light\).\+$/\1/')
+
echo "export COLORSCHEME=${COLORSCHEME}" > ${ZSH_COLORS}
echo "export BACKGROUND=${BACKGROUND}" >> ${ZSH_COLORS}
+ echo "export XRESOURCE=${XRESOURCE}" >> ${ZSH_COLORS}
+ source ${ZSH_COLORS}
}
+# Source colors
+if [[ -f ${ZSH_COLORS} ]]; then
+ source ${ZSH_COLORS}
+ colo ${XRESOURCE}
+ # echo "sourced ${XRESOURCE}"
+fi
+
# Completion for colorschemes (-M -> Case insensitive)
-compctl -k "($(ls ${HOME}/.Xresources))" -M 'm:{a-z}={A-Z}' colo
+compctl -k "(${colorschemes})" -M 'm:{a-z}={A-Z}' colo
diff --git a/zsh/.zshrc b/zsh/.zshrc
index fe44e9e..8fb638c 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -5,7 +5,6 @@
source "$HOME/.zsh/plugins"
source "$HOME/.zsh/functions"
source "$HOME/.zsh/alias"
-source "$HOME/.zsh/tmp"
# Custom key bindings for built-in widgets
bindkey -a 'k' history-beginning-search-backward