This commit is contained in:
Geoffrey Frogeye 2018-07-30 10:55:06 +02:00
parent 16f9814d64
commit 8e43663661
6 changed files with 77 additions and 74 deletions

1
Xresources.d/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
theme

View file

@ -1,36 +0,0 @@
! special
*.foreground: #f1ebeb
*.background: #272822
*.cursorColor: #f1ebeb
! black
*.color0: #48483e
*.color8: #76715e
! red
*.color1: #dc2566
*.color9: #fa2772
! green
*.color2: #8fc029
*.color10: #a7e22e
! yellow
*.color3: #d4c96e
*.color11: #e7db75
! blue
*.color4: #55bcce
*.color12: #66d9ee
! magenta
*.color5: #9358fe
*.color13: #ae82ff
! cyan
*.color6: #56b7a5
*.color14: #66efd5
! white
*.color7: #acada1
*.color15: #cfd0c2

8
bashrc
View file

@ -127,11 +127,15 @@ export PATH="$HOME/.bin/:$HOME/.scripts/:$PATH"
# UTILITIES
# Theme
[ -f ~/.bin/colorSchemeApply ] && source ~/.bin/colorSchemeApply
[ -f ~/.bin/colorSchemeApplyFzf ] && source ~/.bin/colorSchemeApplyFzf
# Bash completion
[ -f /etc/bash_completion ] && . /etc/bash_completion
[ -f /etc/bash_completion ] && source /etc/bash_completion
# Fuzzy matching all the way
export FZF_DEFAULT_OPTS="--height 100% --layout=default"
export FZF_DEFAULT_OPTS="${FZF_DEFAULT_OPTS} --height 100% --layout=default"
export FZF_CTRL_T_OPTS="--preview '[[ -d {} ]] && ls -l --color=always {} || [[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (highlight -O ansi -l {} || coderay {} || rougify {} || cat {}) 2> /dev/null | head -500'"
export FZF_COMPLETION_OPTS="${FZF_CTRL_T_OPTS}"
[ -f /usr/share/fzf/completion.bash ] && source /usr/share/fzf/completion.bash

View file

@ -143,15 +143,15 @@ set $WS10 10
# Workspace output
workspace "$WS1" output LVDS1
workspace "$WS2" output VGA1
workspace "$WS2" output HDMI1
workspace "$WS3" output LVDS1
workspace "$WS4" output VGA1
workspace "$WS4" output HDMI1
workspace "$WS5" output LVDS1
workspace "$WS6" output VGA1
workspace "$WS6" output HDMI1
workspace "$WS7" output LVDS1
workspace "$WS8" output VGA1
workspace "$WS8" output HDMI1
workspace "$WS9" output LVDS1
workspace "$WS10" output VGA1
workspace "$WS10" output HDMI1
# switch to workspace
bindsym $mod+1 workspace $WS1
@ -331,24 +331,24 @@ mode "$mode_temp" {
}
# Colors
set $bg #272822
set $fg #f1ebeb
set $00 #48483e
set $01 #dc2566
set $02 #8fc029
set $03 #d4c96e
set $04 #55bcce
set $05 #9358fe
set $06 #56b7a5
set $07 #acada1
set $08 #76715e
set $09 #fa2772
set $10 #a7e22e
set $11 #e7db75
set $12 #66d9ee
set $13 #ae82ff
set $14 #66efd5
set $15 #cfd0c2
set_from_resource $background i3wm.background #272822
set_from_resource $foreground i3wm.foreground #f1ebeb
set_from_resource $color00 i3wm.color0 #48483e
set_from_resource $color01 i3wm.color1 #dc2566
set_from_resource $color02 i3wm.color2 #8fc029
set_from_resource $color03 i3wm.color3 #d4c96e
set_from_resource $color04 i3wm.color4 #55bcce
set_from_resource $color05 i3wm.color5 #9358fe
set_from_resource $color06 i3wm.color6 #56b7a5
set_from_resource $color07 i3wm.color7 #acada1
set_from_resource $color08 i3wm.color8 #76715e
set_from_resource $color09 i3wm.color9 #fa2772
set_from_resource $color10 i3wm.color10 #a7e22e
set_from_resource $color11 i3wm.color11 #e7db75
set_from_resource $color12 i3wm.color12 #66d9ee
set_from_resource $color13 i3wm.color13 #ae82ff
set_from_resource $color14 i3wm.color14 #66efd5
set_from_resource $color15 i3wm.color15 #cfd0c2
# Inactivity settings
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
@ -374,10 +374,10 @@ set $ignore #ff00000
# Theme colors
#class border backgr. text indicator child_border
client.focused $02 $02 $bg $07 $10
client.focused_inactive $03 $03 $08 $15 $14
client.unfocused $08 $08 $fg $11 $00
client.urgent $01 $01 $fg $05 $09
client.placeholder $ignore $06 $fg $ignore $14
client.focused $color02 $color02 $background $color08 $color10
client.focused_inactive $color03 $color03 $color08 $color15 $color14
client.unfocused $color08 $color08 $color07 $color11 $color00
client.urgent $color01 $color01 $color07 $foreground $color09
client.placeholder $ignore $color06 $color07 $ignore $color14
client.background $15
client.background $color15

35
scripts/changeColors Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Fetchs colors from https://github.com/chriskempson/base16 templates
# and apply them into my configuration
scheme="$1"
# TODO Verify if scheme is known
# Shell (allows to use all colors in Vim while still having nice colors in the rest of the terminal)
curl "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-${scheme}.sh" > ~/.bin/colorSchemeApply
chmod +x ~/.bin/colorSchemeApply
# Xressources (I'm not sure if this is really needed with shell overriding these but i3 load those resources)
curl "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-${scheme}-256.Xresources" > ~/.Xresources.d/theme
# Vim
echo -e "let base16colorspace=256\nset termguicolors\ncolorscheme base16-${scheme}" > ~/.vim/colorscheme.vim
# FZF
curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.bin/colorSchemeApplyFzf
chmod +x ~/.bin/colorSchemeApplyFzf
# qutebrowser
curl "https://raw.githubusercontent.com/theova/base16-qutebrowser/4a17eea8a39f722c2cee95fb44d4a87f5eb2518f/themes/base16-${scheme}.config.py" > ~/.config/qutebrowser/theme.py
# TODO dunst (template online, but not to my liking)
# TODO bar (might change bar in the future, so...)
# TODO qutebrowser (need to fiddle with the config thing)
# TODO highlight (there IS a template but the colors look different from vim and mostly the same from when there's no config)
# Reload a bunch of things to make changes immediate
source ~/.bashrc
xrdb -load ~/.Xresources
i3-msg reload

11
vimrc
View file

@ -22,7 +22,7 @@ call plug#begin()
" Plug 'L9'
" Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
Plug 'tomasr/molokai'
Plug 'chriskempson/base16-vim'
Plug 'tpope/vim-surround'
" Plug 'tpope/vim-fugitive'
" Plug 'tpope/vim-repeat'
@ -69,7 +69,7 @@ let g:airline#extensions#tabline#enabled = 1
let g:airline_section_a = airline#section#create(['mode'])
let g:airline_section_b = airline#section#create(['branch', 'hunks'])
let g:airline_section_z = airline#section#create(['%B', '@', '%l', ':', '%c'])
let g:airline_theme = 'wombat'
let g:airline_theme = 'base16'
""" AUTOFORMAT """
nmap <F3> :Autoformat<CR>
@ -164,10 +164,6 @@ set splitbelow
syntax enable
set background=dark
colorscheme molokai
let g:molokai_original = 1
" From http://stackoverflow.com/a/5004785/2766106
set list
set listchars=tab:╾╌,trail,extends:↦,precedes:↤,nbsp:_
@ -184,6 +180,9 @@ set showcmd
let vimDir = '$HOME/.vim'
let &runtimepath.=','.vimDir
" theme
source $HOME/.vim/colorscheme.vim
" Keep undo history across sessions by storing it in a file
if has('persistent_undo')
let myUndoDir = expand(vimDir . '/undodir')