~mdkcore/dotfiles

c0e752793a47a93df9e6f42448cbe4d2fd178d29 — Rodrigo Oliveira 1 year, 10 months ago a3a488c + ff41afb master
Merge branch 'base16'
17 files changed, 189 insertions(+), 70 deletions(-)

M .install.conf.yaml
D Xresources
A alacritty/.gitignore
M alacritty/alacritty.yml
A alacritty/color_template.yml
M dunst/dunstrc
M i3/config
A i3/scripts/dunst_launcher
M nvim/bundles.vim
M polybar/config
M profile
A rofi/.gitignore
R rofi/{colors.rasi => color_template.rasi}
M tig/config
A tig/theme.tigrc
M tmux.conf
M zshrc
M .install.conf.yaml => .install.conf.yaml +1 -5
@@ 12,8 12,6 @@
    ~/.gitconfig: gitconfig
    # tmux
    ~/.tmux.conf: tmux.conf
    # Xresources
    ~/.Xresources: Xresources
    # XCompose
    ~/.XCompose: XCompose
    # xinitrc


@@ 50,9 48,7 @@
    # xkb mappings
    ~/.config/xkb: xkb
    # alacritty
    ~/.config/alacritty/alacritty.yml:
        create: true
        path: alacritty/alacritty.yml
    ~/.config/alacritty: alacritty
- shell:
    # mutt
    -

D Xresources => Xresources +0 -1
@@ 1,1 0,0 @@
! Xft.dpi: 112

A alacritty/.gitignore => alacritty/.gitignore +1 -0
@@ 0,0 1,1 @@
colors.yml

M alacritty/alacritty.yml => alacritty/alacritty.yml +3 -0
@@ 1,3 1,6 @@
import:
  - ./.config/alacritty/colors.yml

font:
  normal:
    family: Input Nerd Font

A alacritty/color_template.yml => alacritty/color_template.yml +36 -0
@@ 0,0 1,36 @@
colors:
  primary:
    background: '0x{{color0}}'
    foreground: '0x{{color7}}'

  cursor:
    text: '0x{{color0}}'
    cursor: '0x{{color7}}'

  normal:
    black:   '0x{{color0}}'
    red:     '0x{{color1}}'
    green:   '0x{{color2}}'
    yellow:  '0x{{color3}}'
    blue:    '0x{{color4}}'
    magenta: '0x{{color5}}'
    cyan:    '0x{{color6}}'
    white:   '0x{{color7}}'

  bright:
    black:   '0x{{color8}}'
    red:     '0x{{color9}}'
    green:   '0x{{color10}}'
    yellow:  '0x{{color11}}'
    blue:    '0x{{color12}}'
    magenta: '0x{{color13}}'
    cyan:    '0x{{color14}}'
    white:   '0x{{color15}}'

  indexed_colors:
    - { index: 16, color: '0x{{color16}}' }
    - { index: 17, color: '0x{{color17}}' }
    - { index: 18, color: '0x{{color18}}' }
    - { index: 19, color: '0x{{color19}}' }
    - { index: 20, color: '0x{{color20}}' }
    - { index: 21, color: '0x{{color21}}' }

M dunst/dunstrc => dunst/dunstrc +5 -11
@@ 1,3 1,6 @@
# NOTE: colors are defined on i3/scripts/dunst_launcher ;)
# XXX cleanup

[global]
    font = Input Nerd Font 10



@@ 10,7 13,7 @@
    show_age_threshold = 60
    word_wrap = yes
    ignore_newline = no
    geometry = "300x5-30+20"
    geometry = "300x5-30+35"
    shrink = no
    transparency = 0
    idle_threshold = 120


@@ 20,10 23,9 @@
    history_length = 20
    show_indicators = yes
    line_height = 0
    separator_height = 2
    separator_height = 1
    padding = 8
    horizontal_padding = 8
    separator_color = frame
    startup_notification = false
    #dmenu = /usr/bin/dmenu -p dunst:
    browser = xdg-open


@@ 33,7 35,6 @@

[frame]
    width = 1
    color = "#586e75"

[shortcuts]
    #close = ctrl+space


@@ 42,20 43,13 @@
    #history = ctrl+grave
    #context = ctrl+shift+period

# solarized color scheme following my configuration on i3
[urgency_low]
    background = "#073642"
    foreground = "#93a1a1"
    timeout = 10

[urgency_normal]
    background = "#657b83"
    foreground = "#fdf6e3"
    timeout = 10

[urgency_critical]
    background = "#d33682"
    foreground = "#fdf6e3"
    timeout = 0

# vim: ft=cfg

M i3/config => i3/config +30 -6
@@ 123,12 123,35 @@ mode "resize" {
}
bindsym $mod+r mode "resize"

# solarized colors (slightly modified)
# class                 border  bg      text    indic
client.focused          #657b83 #657b83 #fdf6e3 #657b83
client.focused_inactive #073642 #073642 #eee8d5 #6c71c4
client.unfocused        #073642 #073642 #93a1a1 #586e75
client.urgent           #d33682 #d33682 #fdf6e3 #dc322f
# colors from Xresources, based on base16
set_from_resource $base00 color0    #000000
set_from_resource $base01 color18   #000000
set_from_resource $base02 color19   #000000
set_from_resource $base03 color8    #000000
set_from_resource $base04 color20   #000000
set_from_resource $base05 color7    #000000
set_from_resource $base06 color21   #000000
set_from_resource $base07 color15   #000000
set_from_resource $base08 color1    #000000
set_from_resource $base09 color16   #000000
set_from_resource $base0A color3    #000000
set_from_resource $base0B color2    #000000
set_from_resource $base0C color6    #000000
set_from_resource $base0D color4    #000000
set_from_resource $base0E color5    #000000
set_from_resource $base0F color17   #000000

# class                 border  backgr  text    indic   child_border
client.focused          $base05 $base0D $base00 $base0D $base05
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused        $base01 $base00 $base05 $base01 $base01
client.urgent           $base08 $base08 $base00 $base08 $base08
client.placeholder      $base00 $base00 $base05 $base00 $base00
client.background       $base07
# colors

# border configuration
default_border normal 1

# special rules
for_window [window_role="pop-up"]   floating enable


@@ 146,6 169,7 @@ mouse_warping       none

# init commands
####################
exec_always --no-startup-id $HOME/.i3/scripts/dunst_launcher
exec_always --no-startup-id $HOME/.i3/scripts/polybar_launcher&
exec --no-startup-id nextcloud&
exec --no-startup-id nm-applet

A i3/scripts/dunst_launcher => i3/scripts/dunst_launcher +20 -0
@@ 0,0 1,20 @@
#!/bin/sh

xresource_color() {
    xrdb -query | grep "\*$1\:" | awk '{print $NF}'
}

base00=$(xresource_color color0)
base01=$(xresource_color color18)
base03=$(xresource_color color8)
base05=$(xresource_color color7)
base07=$(xresource_color color15)
base08=$(xresource_color color1)

while killall dunst ; do true ; done

dunst \
    -lb "$base00" -lf "$base03" -lfr "$base05" \
    -nb "$base01" -nf "$base05" -nfr "$base05" \
    -cb "$base08" -cf "$base07" -cfr "$base05" \
    -sep_color "$base05" &

M nvim/bundles.vim => nvim/bundles.vim +15 -5
@@ 115,6 115,10 @@ Plugin 'junegunn/fzf.vim'
" vim-devicons | https://github.com/ryanoasis/vim-devicons
Plugin 'ryanoasis/vim-devicons'


" base16-vim | https://github.com/chriskempson/base16-vim
Plugin 'chriskempson/base16-vim'

call vundle#end()
filetype plugin indent on



@@ 250,11 254,8 @@ nmap <silent> <C-_> <Plug>(pydocstring)
" vim-indent-guides
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
" odd and even with same color :)
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  ctermbg=black
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=black

let g:indent_guides_auto_colors = 1
let g:indent_guides_color_change_percent = 2

" just autoload on python files; toggle with <leader>ig
augroup python_files


@@ 277,3 278,12 @@ nmap <silent> <F6> <Plug>(ale_next_wrap)
" vim-devicons | https://github.com/ryanoasis/vim-devicons
" uname -s
let g:WebDevIconsOS = 'Linux'


" base16-vim | https://github.com/chriskempson/base16-vim
set termguicolors
if filereadable(expand("~/.vimrc_background"))
    let base16colorspace=256
    source ~/.vimrc_background
    let g:airline_theme='base16'
endif

M polybar/config => polybar/config +24 -9
@@ 17,15 17,30 @@
;==========================================================

[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
base00 = ${xrdb:color0:#000000}
base01 = ${xrdb:color18:#000000}
base02 = ${xrdb:color19:#000000}
base03 = ${xrdb:color8:#000000}
base04 = ${xrdb:color20:#000000}
base05 = ${xrdb:color7:#000000}
base06 = ${xrdb:color21:#000000}
base07 = ${xrdb:color15:#000000}
base08 = ${xrdb:color1:#000000}
base09 = ${xrdb:color16:#000000}
base0A = ${xrdb:color3:#000000}
base0B = ${xrdb:color2:#000000}
base0C = ${xrdb:color6:#000000}
base0D = ${xrdb:color4:#000000}
base0E = ${xrdb:color5:#000000}
base0F = ${xrdb:color17:#000000}

background = ${colors.base00}
background-alt = ${colors.base01}
foreground = ${colors.base05}
foreground-alt = ${colors.base05}
primary = ${colors.base08}
secondary = ${colors.base0B}
alert = ${colors.base0A}

[bar/primary]
;monitor = ${env:MONITOR:HDMI-1}

M profile => profile +4 -2
@@ 92,11 92,11 @@ export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

alias grep='grep -n --color=always --exclude=\*~'
alias grep='grep -n --color=auto --exclude=\*~'
alias less='less -R'
alias ip='ip --color=auto'

alias ls='ls --color=always'
alias ls='ls --color=auto'
alias nls='ls -1 | wc -l'
alias tls='ls -ot --color --ignore=\*~ | head | grep -v "total" | tr -s " " | cut -d" " -f5- | column -t'
alias als='ls -la'


@@ 106,6 106,8 @@ alias wget='wget -c'
alias cmake='cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
alias make='bear -a make'

alias diff='diff --color=auto'

# simple bell, usefull when waiting the completion of something on another
# tmux window ;)
alias bell='echo -n "\007"' # or 'tput bel'

A rofi/.gitignore => rofi/.gitignore +1 -0
@@ 0,0 1,1 @@
colors.rasi

R rofi/colors.rasi => rofi/color_template.rasi +11 -11
@@ 1,15 1,15 @@
* {
                                 /* rgba */
    red:                         #dc322fFF; // base08 100%
    blue:                        #268bd2FF; // base0D 100%
    white:                       #fdf6e3FF; // base07 100%
    yellow:                      #b58900FF; // base0A 100%
    lightfg:                     #eee8d5FF; // base06 100%
    lightbg:                     #073642FF; // base01 100%
    foreground:                  #93a1a1FF; // base05 100%
    background:                  #002b36FF; // base00 100%
    background-color:            #002b3600; // base00   0%
    highlight:                   bold #268bd2FF; // blue
                                 // rgba
    red:                         #{{color1}}ff;
    blue:                        #{{color4}}ff;
    white:                       #{{color15}}ff;
    yellow:                      #{{color3}}ff;
    lightfg:                     #{{color21}}ff;
    lightbg:                     #{{color18}}ff;
    foreground:                  #{{color7}}ff;
    background:                  #{{color0}}ff;
    background-color:            #{{color0}}00;
    highlight:                   bold #{{color4}}ff;

    separator-color:             var(foreground);
    border-color:                var(foreground);

M tig/config => tig/config +1 -0
@@ 1,6 1,7 @@
# source: https://github.com/jonas/tig/blob/master/contrib/
source ~/.config/tig/vim.tigrc
source ~/.config/tig/git-flow.tigrc
source ~/.config/tig/theme.tigrc

bind generic cv !git commit -v
bind generic cs !git commit -sv

A tig/theme.tigrc => tig/theme.tigrc +3 -0
@@ 0,0 1,3 @@
color cursor                21  18  bold
color title-blur            7   18
color title-focus           7   18  bold

M tmux.conf => tmux.conf +20 -16
@@ 72,24 72,28 @@ bind W select-pane -t: -P 'bg=colour052'
bind r source-file "$HOME/.tmux.conf"

# colors
# default statusbar colors
set-option -g status-style "fg=colour20,bg=colour18"
# default window title colors
set-window-option -g window-status-style "fg=colour20,bg=default"
# active window title colors
set-window-option -g window-status-current-style "fg=colour3,bg=default"
# pane border
set-option -g pane-border-fg colour240 # cyan/blue
set-option -g pane-active-border-fg blue

# clock
set-window-option -g clock-mode-colour colour166 # orange

set-option -g pane-border-style "fg=colour18"
set-option -g pane-active-border-style "fg=colour7"
# message text
set-option -g message-bg colour233 # gray
set-option -g message-fg colour247 # gray

# list
set-option -g mode-bg colour233 # gray
set-option -g mode-fg colour247 # gray

# panes
set-option -g display-panes-colour colour94 #orange
set-option -g display-panes-active-colour colour166 #blue
set-option -g message-style "fg=colour7,bg=colour18"
# pane number display
set-option -g display-panes-active-colour "colour2"
set-option -g display-panes-colour "colour3"
# clock
set-window-option -g clock-mode-colour "colour2"
# copy mode highlight (affects choose-window, choose-session, find-window,
# buffer list... :/) | alternative: "fg=colour15,bg=colour18"
set-window-option -g mode-style "fg=colour7,bg=colour19"
# bell
set-window-option -g window-status-bell-style "fg=colour18,bg=colour1"
# colors

# damn delay
set -sg escape-time 0

M zshrc => zshrc +14 -4
@@ 84,9 84,11 @@ export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS="--no-mouse \
    --ansi \
    -0 -1 \
    --color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254 \
    --color info:254,prompt:37,spinner:108,pointer:235,marker:235"
export FZF_CTRL_T_OPTS="--preview '$HOME/.config/ranger/scope.sh {}' \
    --color=bg+:18,bg:0,spinner:6,hl:4 \
    --color=fg:20,header:4,info:3,pointer:6 \
    --color=marker:6,fg+:21,prompt:3,hl+:4"
export FZF_CTRL_T_OPTS="--preview '$HOME/.config/ranger/scope.sh {} \
        $(tput cols) $(tput lines) $HOME/.cache/ranger False' \
    --bind 'ctrl-t:toggle-preview'"

# based on https://github.com/junegunn/fzf/issues/477#issuecomment-444053054


@@ 94,7 96,9 @@ fzf-history-widget-accept-or-edit() {
    local selected num
    setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null
    selected=( $(fc -rl 1 |
        FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort --expect=ctrl-e $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd))
        FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS \
        -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort --expect=ctrl-e \
        $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd))
    )

    local ret=$?


@@ 122,3 126,9 @@ bindkey '^F' fzf-history-widget-accept-or-edit
# TODO bindings should be done after setting all plugins
# control + r
bindkey "^R" history-incremental-pattern-search-backward

# Base16 Shell
BASE16_SHELL="$HOME/downloads/GIT/base16-shell/"
[ -n "$PS1" ] && \
    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
        eval "$("$BASE16_SHELL/profile_helper.sh")"