Initial commit

This commit is contained in:
Dave Gallant
2019-10-21 16:37:23 -04:00
commit cec4966e44
28 changed files with 1827 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.
env:
TERM: xterm-256color
window:
padding:
x: 10
y: 10
# Font configuration
font:
normal:
Default:
family: Fira Code
style: Regular
bold:
family: Fira Code
italic:
family: Fira Code
bold_italic:
family: Fira
size: 11.0
# falcon colorscheme for alacritty
# by fenetikm, https://github.com/fenetikm/falcon
colors:
# Default colors
primary:
background: '0x020221'
foreground: '0xb4b4b9'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x020221'
cursor: '0xffe8c0'
# Normal colors
normal:
black: '0x000004'
red: '0xff3600'
green: '0x718e3f'
yellow: '0xffc552'
blue: '0x635196'
magenta: '0xff761a'
cyan: '0x34bfa4'
white: '0xb4b4b9'
# Bright colors
bright:
black: '0x020221'
red: '0xff8e78'
green: '0xb1bf75'
yellow: '0xffd392'
blue: '0x99a4bc'
magenta: '0xffb07b'
cyan: '0x8bccbf'
white: '0xf8f8ff'
custom_cursor_colors: true
background_opacity: 0.9
shell:
program: /bin/bash
args:
- -l
- -c
- "tmux"
key_bindings:
- { key: Home, mods: Control, action: ResetFontSize }
- { key: Add, mods: Control, action: IncreaseFontSize }
- { key: Subtract, mods: Control, action: DecreaseFontSize }

47
.config/bspwm/bspwmrc Executable file
View File

@@ -0,0 +1,47 @@
#! /bin/sh
sxhkd &
monitors=$(xrandr | grep -swc 'connected')
# I currently have a laptop and a desktop with 2 monitors
# This checks the number of monitors and then sets desktops
if [ "$monitors" -gt 1 ]; then
bspc monitor HDMI-A-0 -d 1 2 3 4 5
bspc monitor DisplayPort-0 -d 6 7 8 9 0
else
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
fi
bspc config border_width 2
bspc config window_gap 4
bspc config focus_follows_pointer true
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Gimp state=floating follow=on
bspc rule -a Zathura state=tiled
bspc rule -a feh state=floating
# Set background
feh --bg-fill ~/Pictures/Wallpapers/laughingman.jpg &
# lemonbar-xft-git
~/.config/lemonbar/lemonbar.sh | lemonbar -p -f "Fira Code-12" -f "Font Awesome 5 Free" -f "Noto Color Emoji" -B '#000000' -F '#FFFFFF' &
stalonetray &
# Compositor to prevent screen tearing
compton --config ~/.config/compton.conf -b
# Switch to a lefty mouse if mouse detected
if xinput list | grep -qi 'mouse'; then
xmodmap -e "pointer = 3 2 1 " # swap mouse buttons
fi
sleep 3
xdo above -t "$(xdo id -n root)" "$(xdo id -n stalonetray)"
xdo above -t "$(xdo id -n root)" "$(xdo id -n lemonbar)"

236
.config/compton.conf Normal file
View File

@@ -0,0 +1,236 @@
# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "xrender";
#################################
#
# GLX backend
#
#################################
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
# Useful with --glx-swap-method, as well.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;
# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
glx-swap-method = "undefined";
#################################
#
# Shadows
#
#################################
# Enabled client-side shadows on windows.
shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = -5;
# The top offset for shadows. (default -15)
shadow-offset-y = -5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;
# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"name *= 'Chrome'",
"name *= 'Chromium'",
"name *= 'VLC'",
"name *= 'compton'",
"name = 'Docky'",
"name = 'Kupfer'",
"name = 'Notification'",
"name = 'Plank'",
"name = 'cpt_frame_window'",
"class_g = 'Firefox' && argb",
"class_g = 'Tor Browser' && argb",
"class_g = 'Conky'",
"class_g = 'Kupfer'",
"class_g = 'Synapse'",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;
#################################
#
# Opacity
#
#################################
#inactive-opacity = 1;
#active-opacity = 1;
#frame-opacity = 1;
#inactive-opacity-override = false;
opacity-rule = ["85:class_g = 'kitty'"];
# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
#################################
#
# Other
#
#################################
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;
# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesnt have the effect of --sw-opti unlike other methods. Experimental.
# (Note some VSync methods may not be enabled at compile time.)
vsync = "opengl";
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
#################################
#
# Window type settings
#
#################################
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
};
######################
#
# XSync
# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

52
.config/dunst/dunstrc Normal file
View File

@@ -0,0 +1,52 @@
[global]
monitor = 0
follow = mouse
geometry = "250x50-24+24"
indicate_hidden = yes
shrink = no
separator_height = 0
padding = 16
horizontal_padding = 24
frame_width = 2
sort = no
idle_threshold = 120
font = Fira Code 12
line_height = 4
markup = full
format = "<b>%s</b>\n%b"
alignment = left
show_age_threshold = 60
word_wrap = yes
ignore_newline = no
stack_duplicates = false
hide_duplicate_count = yes
show_indicators = no
icon_position = off
sticky_history = yes
history_length = 20
browser = /usr/bin/firefox -new-tab
always_run_script = true
title = Dunst
class = Dunst
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+shift+grave
context = ctrl+shift+period
[urgency_low]
background = "#2f343f"
foreground = "#d8dee8"
timeout = 2
[urgency_normal]
background = "#2f343f"
foreground = "#d8dee8"
timeout = 4
[urgency_critical]
background = "#2f343f"
foreground = "#d8dee8"
frame_color = "#bf616a"
timeout = 0

68
.config/lemonbar/lemonbar.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
# lemonbar-xft-git is required for for fontconfig typefaces
# hex colours
green='#00EE00'
grey='#888888'
red='#FF0000'
yellow='#FFFF00'
Battery() {
capacity=$(grep -hs ^ /sys/class/power_supply/BAT0/capacity)
if [ -n "$capacity" ]; then
case $capacity in
[0-1][0-9]{0,1}) colour=$red ;;
[2-3][0-9]) colour=$yellow ;;
*) colour=$green ;;
esac
echo -e " %{F$colour}[$capacity%]%{F-}%{B-}"
fi
}
Clock() {
TIME=$(date '+%l:%M:%S %p')
echo -e -n " ${TIME}"
}
Calendar() {
DATE=$(date "+%a, %D")
echo -e -n " ${DATE}"
}
ActiveWindow() {
len=$(echo -n "$(xdotool getwindowfocus getwindowname)" | wc -m)
max_len=70
if [ "$len" -gt $max_len ]; then
title="$(xdotool getwindowfocus getwindowname | cut -c 1-$max_len)..."
else
title="$(xdotool getwindowfocus getwindowname)"
fi
echo -n " %{F$grey}[ $title ]%{F-}%{B-}"
}
Weather() {
echo '(' "$(curl -Ss 'https://wttr.in/yxu?0&T&Q' 2>/dev/null | cut -c 16- | head -2 | xargs echo)" ')'
}
Ip() {
dig +short myip.opendns.com @resolver1.opendns.com
}
while true; do
if ! (($(date '+%s') % 60)); then
ip=$(Ip)
weather=$(Weather)
fi
desktop_name=$(bspc query -D -d focused --names)
panel_info=$(echo -e "%{c}[$desktop_name] $(ActiveWindow)" "%{r}$weather $ip $(Calendar)$(Clock)$(Battery)")
# List of all the monitors/screens
monitors=$(xrandr | grep -o "^.* connected" | sed "s/ connected//")
tmp=0
barout=''
for _ in echo "$monitors"; do
barout+="%{S${tmp}}$panel_info"
((tmp = tmp + 1))
done
echo "$barout"
sleep 0.1s
done

View File

@@ -0,0 +1 @@
../../../.vim/colors/xoria256.vim

169
.config/nvim/init.vim Executable file
View File

@@ -0,0 +1,169 @@
" nvim config
set nocompatible
filetype off
" disable swap files
set noswapfile
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Plugins
call plug#begin('~/.vim/plugged')
Plug 'ap/vim-css-color'
Plug 'fatih/vim-go'
Plug 'hashivim/vim-terraform'
Plug 'itchyny/lightline.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'psf/black'
Plug 'rust-lang/rust.vim'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'vifm/vifm.vim'
Plug 'vim-syntastic/syntastic'
Plug 'yuki-ycino/fzf-preview.vim'
" Initialize plugin system
call plug#end()
filetype plugin indent on
" Security
set modelines=0
" Show line numbers
set number
" Show file stats
set ruler
" Highlight current line
set cursorline
" Encoding
set encoding=utf-8
" ignore case when searching
set ignorecase
set smartcase
" Status bar
set laststatus=2
" Last line
set showmode
set showcmd
" autoread
set autoread
" Mouse
set mouse=a
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" Display all matching files when we tab complete
set wildmenu
set tabstop=4
set shiftwidth=4
set expandtab
" Enable folding
set foldmethod=indent
set foldlevel=99
" Incremental search
set incsearch
" highlight search
set hlsearch
" Enable folding with the spacebar
nnoremap <space> za
" replace visually selected
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left>
" Custom Commands
command JsonFormat execute "::%!jq '.'"
" Shortcuts
map <Leader>r :Rg<CR>
map <Leader>g :Rg<CR>
map <Leader>f :FzfPreviewDirectoryFiles<CR>
map <Leader>n :NERDTree<CR>
noremap <Leader>y "*y
noremap <Leader>p "*p
noremap <Leader>Y "+y
noremap <Leader>P "+p
set pastetoggle=<F3>
" Python indentation
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
let python_highlight_all=1
syntax on
set t_Co=256
colorscheme xoria256
" Transparency
hi Normal guibg=NONE ctermbg=NONE
" highlight red lines
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
" groovy syntax
au BufNewFile,BufRead Jenkinsfile setf groovy
au BufNewFile,BufRead Jenkinsfile set tabstop=2 shiftwidth=2 expandtab
" vim-go
let g:go_auto_sameids = 0
let g:go_fmt_command = "goimports"
let g:go_fmt_experimental = 1
let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_format_strings = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_functions = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_operators = 1
let g:go_highlight_space_tab_error = 1
let g:go_highlight_string_spellcheck = 1
let g:go_highlight_trailing_whitespace_error = 0
let g:go_highlight_types = 1
let g:go_highlight_variable_assignments = 1
let g:go_highlight_variable_declarations = 1
let g:go_metalinter_autosave=1
let g:go_metalinter_autosave_enabled=['golint', 'govet']
" vim-terraform
let g:terraform_align=1
let g:terraform_fmt_on_save=1
let g:terraform_fold_sections=1
" rust.vim
let g:rustfmt_autosave = 1
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

View File

@@ -0,0 +1,120 @@
" Vim color file
"
" Name: xoria256.vim
" Version: 1.5
" Maintainer: Dmitriy Y. Zotikov (xio) <xio@ungrund.org>
"
" Should work in recent 256 color terminals. 88-color terms like urxvt are
" NOT supported.
"
" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or
" similar value.
"
" Color numbers (0-255) see:
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
"
" For a specific filetype highlighting rules issue :syntax list when a file of
" that type is opened.
" Initialization {{{
if &t_Co != 256 && ! has("gui_running")
echomsg ""
echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)"
echomsg ""
finish
endif
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "xoria256"
"}}}
" Colours {{{1
"" General {{{2
hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none
hi Cursor ctermbg=214 guibg=#ffaf00
hi CursorColumn ctermbg=238 guibg=#444444
hi CursorLine ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi FoldColumn ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none
hi LineNr ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold
hi Pmenu ctermfg=0 guifg=#000000 ctermbg=250 guibg=#bcbcbc
hi PmenuSel ctermfg=255 guifg=#eeeeee ctermbg=243 guibg=#767676
hi PmenuSbar ctermbg=252 guibg=#d0d0d0
hi PmenuThumb ctermfg=243 guifg=#767676
hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f
hi SignColumn ctermfg=248 guifg=#a8a8a8
hi SpecialKey ctermfg=77 guifg=#5fdf5f
hi SpellBad ctermfg=160 guifg=fg ctermbg=bg cterm=underline guisp=#df0000
hi SpellCap ctermfg=189 guifg=#dfdfff ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellRare ctermfg=168 guifg=#df5f87 ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellLocal ctermfg=98 guifg=#875fdf ctermbg=bg guibg=bg cterm=underline gui=underline
hi StatusLine ctermfg=15 guifg=#ffffff ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold
hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=none gui=none
hi TabLineFill ctermfg=fg guifg=fg ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Title ctermfg=225 guifg=#ffdfff
hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00
hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline
hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Visual ctermfg=255 guifg=#eeeeee ctermbg=96 guibg=#875f87
hi VisualNOS ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi WildMenu ctermfg=0 guifg=#000000 ctermbg=150 guibg=#afdf87 cterm=bold gui=bold
"" Syntax highlighting {{{2
hi Comment guifg=#787882 ctermfg=243 guibg=NONE ctermbg=NONE gui=Italic cterm=Italic
hi Constant ctermfg=229 guifg=#ffffaf
hi Identifier ctermfg=182 guifg=#dfafdf cterm=none
hi Ignore ctermfg=238 guifg=#444444
hi Number ctermfg=180 guifg=#dfaf87
hi PreProc ctermfg=150 guifg=#afdf87
hi Special ctermfg=174 guifg=#df8787
hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none
hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none
"" Special {{{2
""" .diff {{{3
hi diffAdded ctermfg=150 guifg=#afdf87
hi diffRemoved ctermfg=174 guifg=#df8787
""" vimdiff {{{3
hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf
"hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none
hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none
hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf
hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none
""" HTML {{{3
" hi htmlTag ctermfg=146 guifg=#afafdf
" hi htmlEndTag ctermfg=146 guifg=#afafdf
hi htmlTag ctermfg=244
hi htmlEndTag ctermfg=244
hi htmlArg ctermfg=182 guifg=#dfafdf
hi htmlValue ctermfg=187 guifg=#dfdfaf
hi htmlTitle ctermfg=254 ctermbg=95
" hi htmlArg ctermfg=146
" hi htmlTagName ctermfg=146
" hi htmlString ctermfg=187
""" django {{{3
hi djangoVarBlock ctermfg=180
hi djangoTagBlock ctermfg=150
hi djangoStatement ctermfg=146
hi djangoFilter ctermfg=174
""" python {{{3
hi pythonExceptions ctermfg=174
""" NERDTree {{{3
hi Directory ctermfg=110 guifg=#87afdf
hi treeCWD ctermfg=180 guifg=#dfaf87
hi treeClosable ctermfg=174 guifg=#df8787
hi treeOpenable ctermfg=150 guifg=#afdf87
hi treePart ctermfg=244 guifg=#808080
hi treeDirSlash ctermfg=244 guifg=#808080
hi treeLink ctermfg=182 guifg=#dfafdf

131
.config/nvim/nvim/init.vim Executable file
View File

@@ -0,0 +1,131 @@
set nocompatible
filetype off
set noswapfile
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Specify a directory for plugins
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'psf/black'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-fugitive'
" Initialize plugin system
call plug#end()
filetype plugin indent on
" Security
set modelines=0
" Show line numbers
set number
" Show file stats
set ruler
" Highlight current line
set cursorline
" Encoding
set encoding=utf-8
" ignore case when searching
set ignorecase
" Status bar
set laststatus=2
" Last line
set showmode
set showcmd
" Mouse
set mouse=a
" FINDING FILES
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" Display all matching files when we tab complete
set wildmenu
set tabstop=4
set shiftwidth=4
set expandtab
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
" replace visually selected
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left>
" Custom Commands
command JsonFormat execute "::%!jq '.'"
" Shortcuts
map <Leader>r :Rg<CR>
map <Leader>f :FZF<CR>
map <Leader>n :NERDTree<CR>
noremap <Leader>y "*y
noremap <Leader>p "*p
noremap <Leader>Y "+y
noremap <Leader>P "+p
set pastetoggle=<F3>
" Python indentation
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
let python_highlight_all=1
syntax on
set t_Co=256
colorscheme xoria256
" Transparency
hi Normal guibg=NONE ctermbg=NONE
" highlight red lines
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
" groovy syntax
au BufNewFile,BufRead Jenkinsfile setf groovy
au BufNewFile,BufRead Jenkinsfile set tabstop=2 shiftwidth=2 expandtab
" vim-go
let g:go_auto_sameids = 1
let g:go_fmt_command = "goimports"
let g:go_fmt_experimental = 1
let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_format_strings = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_functions = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_operators = 1
let g:go_highlight_space_tab_error = 1
let g:go_highlight_string_spellcheck = 1
let g:go_highlight_trailing_whitespace_error = 0
let g:go_highlight_types = 1
let g:go_highlight_variable_assignments = 1
let g:go_highlight_variable_declarations = 1
let g:go_metalinter_autosave=1
let g:go_metalinter_autosave_enabled=['golint', 'govet']

View File

@@ -0,0 +1,49 @@
# The theme colours can be an rgb string of the form "255, 255, 255" or a string that references the colours from your terminal theme: Reset, Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed, LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, White.
theme:
active: Green
banner: Green
error_border: Red
error_text: LightRed
hint: Yellow
hovered: Green
inactive: Gray
playbar_background: Black
playbar_progress: Green
playbar_text: White
selected: Green
text: "255, 255, 255"
behavior:
seek_milliseconds: 5000
volume_increment: 10
# The lower the number the higher the "frames per second". You can decrease this number so that the audio visualisation is smoother but this can be expensive!
tick_rate_milliseconds: 250
keybindings:
# Key stroke can be used if it only uses two keys:
# ctrl-q works,
# ctrl-alt-q doesn't.
back: "ctrl-q"
jump_to_album: "a"
# Shift modifiers use a capital letter (also applies with other modifier keys
# like ctrl-A)
jump_to_artist_album: "A"
manage_devices: "d"
decrease_volume: "-"
increase_volume: "+"
toggle_playback: " "
seek_backwards: "<"
seek_forwards: ">"
next_track: "n"
previous_track: "p"
copy_song_url: "c"
copy_album_url: "C"
help: "?"
shuffle: "s"
repeat: "r"
search: "/"
audio_analysis: "v"

14
.config/srv/config.yaml Normal file
View File

@@ -0,0 +1,14 @@
---
feeds:
- https://aws.amazon.com/blogs/security/feed/
- https://news.ycombinator.com/rss
- https://www.archlinux.org/feeds/news/
- https://www.bleepingcomputer.com/feed/
- https://www.itworldcanada.com/feed
- https://www.reddit.com/r/golang/.rss
- https://www.reddit.com/r/linux/.rss
- https://www.zdnet.com/topic/security/rss.xml
# Optionally define an application to view the feeds
externalViewer: firefox-developer-edition
externalViewerArgs:
- --new-window

2
.config/starship.toml Normal file
View File

@@ -0,0 +1,2 @@
# Don't print a new line at the start of the prompt
add_newline = false

143
.config/sxhkd/sxhkdrc Normal file
View File

@@ -0,0 +1,143 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
alacritty
# program launcher
super + d
dmenu_run
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit bspwm normally
super + alt + Escape
bspc quit
# close and kill
super + q
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# if the current node is automatic, send it to the last manual, otherwise pull the last leaf
super + y
bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
# swap the current node and the biggest node
super + g
bspc node -s biggest
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {x,y,z}
bspc node -g {locked,sticky,private}
#
# focus/swap
#
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous node in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
# flip layout vertically/horizontally
super + shift + {v,h}
bspc node @/ --flip {vertical,horizontal}
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + shift + {Left,Down,Up,Right}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# shrink a window by moving one of its side inward
super + shift + control + {Left,Down,Up,Right}
bspc node -z {right -20 0,top 0 20,bottom 0 20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
# circulate the leaves of the tree
super + {_,shift + }c
bspc node @/ --circulate {backward,forward}
# make split ratios equal
super + equal
bspc node @/ --equalize
# lock screen
super + @l
XSECURELOCK_NO_COMPOSITE=1 \
XSECURELOCK_PASSWORD_PROMPT=kaomoji \
xsecurelock
# suspend
super + {_,shift + }s
systemctl suspend
# screenshot
super + @Print
exec import png:- | xclip -selection clipboard -t image/png

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Clipmenu daemon
[Service]
ExecStart=/usr/bin/clipmenud
Restart=always
RestartSec=500ms
Environment=DISPLAY=:0
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProtectControlGroups=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=
RestrictRealtime=yes
[Install]
WantedBy=default.target

52
.gitconfig Normal file
View File

@@ -0,0 +1,52 @@
[alias]
aa = add -A .
br = branch
ca = commit -S --amend
cb = checkout -b
ci = commit
cm = commit -m
co = checkout
cs = commit -S
csm = commit -S -m
csa = commit -S --amend
deleted = log --diff-filter=D --summary
di = diff
dic = diff --cached
dicn = diff --cached --name-only
din = diff --name-only
dump = cat-file -p
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ms = merge --squash
pb = pull --rebase
po = push origin
por = push origin HEAD:refs/for/$1
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
st = status
type = cat-file -t
[color]
diff = auto
status = auto
branch = auto
[core]
editor = vim
[user]
name = Dave Gallant
[push]
default = current
[pull]
rebase = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[commit]
gpgsign = true
[gpg]
program = gpg

14
.github/workflows/shfmt.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: sh-checker
on:
- pull_request
jobs:
sh-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run the sh-checker
uses: davegallant/action-sh-checker@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sh_checker_comment: true

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
# avoid weird recursion problems
.dotfiles

1
.gnupg/gpg-agent.conf Normal file
View File

@@ -0,0 +1 @@
pinentry-program /usr/bin/pinentry-curses

25
.stalonetrayrc Normal file
View File

@@ -0,0 +1,25 @@
# vim:filetype=config:tw=80:et
background "#000000"
decorations none
dockapp_mode simple
fuzzy_edges 0
geometry 1x1
grow_gravity W
icon_gravity SE
icon_size 22
kludges fix_window_pos,force_icons_size
log_level err
max_geometry 8x1
no_shrink false
parent_bg false
scrollbars none
skip_taskbar true
sticky true
tint_color white
tint_level 0
transparent false
vertical false
window_layer top
window_strut auto
window_type dock
xsync false

44
.tmux.conf Normal file
View File

@@ -0,0 +1,44 @@
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set -g mouse on
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
set -g status-interval 5
set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 2000 # slightly longer status messages display time
# Lots of scrollback.
setw -g history-limit 50000000
setw -q -g utf8 on
# activity
set -g monitor-activity on
set -g visual-activity off
set -g status-right '#(gitmux #{pane_current_path})'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tpm'
# Theme
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @colors-solarized 'dark'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

24
.vifm/colors/minimal.vifm Normal file
View File

@@ -0,0 +1,24 @@
" colortheme
highlight clear
highlight Win cterm=none ctermfg=255 ctermbg=none
highlight Directory cterm=bold ctermfg=12 ctermbg=default
highlight Link cterm=bold ctermfg=216 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=9 ctermbg=default
highlight Socket cterm=bold ctermfg=10 ctermbg=default
highlight Device cterm=bold ctermfg=9 ctermbg=default
highlight Fifo cterm=bold ctermfg=150 ctermbg=default
highlight Executable cterm=none ctermfg=150 ctermbg=default
highlight Selected cterm=none ctermfg=255 ctermbg=236
highlight CurrLine cterm=reverse
highlight TopLine cterm=none ctermfg=255 ctermbg=none
highlight TopLineSel cterm=bold ctermfg=110 ctermbg=none
highlight StatusLine cterm=none ctermfg=15 ctermbg=none
highlight WildMenu cterm=reverse ctermfg=255 ctermbg=black
highlight CmdLine cterm=none ctermfg=255 ctermbg=none
highlight ErrorMsg cterm=none ctermfg=203 ctermbg=none
highlight Border cterm=none ctermfg=black ctermbg=none
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=255
highlight SuggestBox cterm=bold ctermfg=255 ctermbg=default
highlight CmpMismatch cterm=bold ctermfg=255 ctermbg=9
highlight AuxWin cterm=bold,reverse ctermfg=default ctermbg=default

6
.vifm/scripts/README Normal file
View File

@@ -0,0 +1,6 @@
This directory is dedicated for user-supplied scripts/executables.
vifm modifies its PATH environment variable to let user run those
scripts without specifying full path. All subdirectories are added
as well. File in a subdirectory overrules file with the same name
in parent directories. Restart might be needed to recognize files
in newly created or renamed subdirectories.

176
.vifm/vifmrc Normal file
View File

@@ -0,0 +1,176 @@
" {{{ General config
" This is the actual command used to start vi. The default is vim.
" If you would like to use another vi clone such as Elvis or Vile
" you will need to change this setting.
set vicmd=nvim
" This makes vifm perform file operations on its own instead of relying on
" standard utilities like `cp`. While using `cp` and alike is a more universal
" solution, it's also much slower when processing large amounts of files and
" doesn't support progress measuring.
set syscalls
" Open with preview window
view
" Trash Directory
" The default is to move files that are deleted with dd or :d to
" the trash directory. If you change this you will not be able to move
" files by deleting them and then using p to put the file in the new location.
" I recommend not changing this until you are familiar with vifm.
" This probably shouldn't be an option.
set trash
" This is how many directories to store in the directory history.
set history=1000
" Automatically resolve symbolic links on l or Enter.
set nofollowlinks
" Natural sort of (version) numbers within text.
set sortnumbers
" Maximum number of changes that can be undone.
set undolevels=100
" If you would like to run an executable file when you
" press return on the file name set this.
set norunexec
" Selected color scheme
colorscheme minimal
" Format for displaying time in file list. For example:
" TIME_STAMP_FORMAT=%m/%d-%H:%M
" See man date or man strftime for details.
set timefmt=%m/%d\ %H:%M
" Show list of matches on tab completion in command-line mode
set wildmenu
" Display completions in a form of popup with descriptions of the matches
set wildstyle=popup
" Display suggestions in normal, visual and view modes for keys, marks and
" registers (at most 5 files). In other view, when available.
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
" Ignore case in search patterns unless it contains at least one uppercase
" letter
set ignorecase
set smartcase
" Don't highlight search results automatically
set nohlsearch
" Use increment searching (search while typing)
set incsearch
" Try to leave some space from cursor to upper/lower border in lists
set scrolloff=4
" Don't do too many requests to slow file systems
if !has('win')
set slowfs=curlftpfs
endif
" Things that should be stored in vifminfo
set vifminfo=dhistory,chistory,state,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks
" Dont show delete confirmation
set confirm-=delete
" Empty the ruler. By default, it shows the number of directories+files.
set rulerformat=
" }}}
fileviewer *.pdf
\ vifmimg pdfpreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.epub
\ vifmimg epubpreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\ vifmimg videopreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
\ vifmimg draw %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.gif
\ vifmimg gifpreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.ico
\ vifmimg magickpreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer <audio/*>
\ vifmimg audio %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer <font/*>
\ vifmimg font %px %py %pw %ph %c
\ %pc
\ vifmimg clear
fileviewer *.py,*.tf,*.txt,*.md,*.go,*.rs,*.tfvars,*.sh,Dockerfile,Makefile,Jenkinsfile
\ env -uCOLORTERM bat --color always --wrap never --pager never %c -p
filetype * xdg-open %c
fileviewer * file -b %c
" Use comma to enter command mode
nnoremap , :
" Go to the file that is right before "../" for going to the top most file
nnoremap gg ggj
" Quick shortcuts to some dirs
nnoremap dls :cd ~/downloads<cr>
nnoremap cd :cd<cr>
" Start shell in current directory
nnoremap s :shell<cr>
" Display sorting dialog
nnoremap S :sort<cr>
" Toggle visibility of preview window
nnoremap w :view<cr>
vnoremap w :view<cr>gv
" Open file in nvim
nnoremap o :!nvim %f<cr>
" Make a new directory
nnoremap mkd :mkdir<space>
" file types
set classify=' :dir:/, :exe:, :reg:, :link:'
" various file names
set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::'
" archives
set classify+=' ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::'
" images
set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::'
" audio
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
" media
set classify+=' ::*.avi,,*.ts,,*.axv,,*.divx,,*.m2v,,*.m4p,,*.m4v,,.mka,,*.mkv,,*.mov,,*.mp4,,*.flv,,*.mp4v,,*.mpeg,,*.mpg,,*.nuv,,*.ogv,,*.pbm,,*.pgm,,*.qt,,*.vob,,*.wmv,,*.xvid::'
" office files
set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.ppt::'

26
.vim/coc-settings.json Normal file
View File

@@ -0,0 +1,26 @@
{
"languageserver": {
"golang": {
"command": "gopls",
"filetypes": [
"go"
],
"rootPatterns": [
"go.mod",
".vim/",
".git/",
".hg/"
]
},
"terraform": {
"command": "terraform-lsp",
"filetypes": [
"tf"
],
"rootPatterns": [
".vim/",
".git/"
]
}
}
}

120
.vim/colors/xoria256.vim Normal file
View File

@@ -0,0 +1,120 @@
" Vim color file
"
" Name: xoria256.vim
" Version: 1.5
" Maintainer: Dmitriy Y. Zotikov (xio) <xio@ungrund.org>
"
" Should work in recent 256 color terminals. 88-color terms like urxvt are
" NOT supported.
"
" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or
" similar value.
"
" Color numbers (0-255) see:
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
"
" For a specific filetype highlighting rules issue :syntax list when a file of
" that type is opened.
" Initialization {{{
if &t_Co != 256 && ! has("gui_running")
echomsg ""
echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)"
echomsg ""
finish
endif
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "xoria256"
"}}}
" Colours {{{1
"" General {{{2
hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none
hi Cursor ctermbg=214 guibg=#ffaf00
hi CursorColumn ctermbg=238 guibg=#444444
hi CursorLine ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi FoldColumn ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none
hi LineNr ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold
hi Pmenu ctermfg=0 guifg=#000000 ctermbg=250 guibg=#bcbcbc
hi PmenuSel ctermfg=255 guifg=#eeeeee ctermbg=243 guibg=#767676
hi PmenuSbar ctermbg=252 guibg=#d0d0d0
hi PmenuThumb ctermfg=243 guifg=#767676
hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f
hi SignColumn ctermfg=248 guifg=#a8a8a8
hi SpecialKey ctermfg=77 guifg=#5fdf5f
hi SpellBad ctermfg=160 guifg=fg ctermbg=bg cterm=underline guisp=#df0000
hi SpellCap ctermfg=189 guifg=#dfdfff ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellRare ctermfg=168 guifg=#df5f87 ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellLocal ctermfg=98 guifg=#875fdf ctermbg=bg guibg=bg cterm=underline gui=underline
hi StatusLine ctermfg=15 guifg=#ffffff ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold
hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=none gui=none
hi TabLineFill ctermfg=fg guifg=fg ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Title ctermfg=225 guifg=#ffdfff
hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00
hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline
hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Visual ctermfg=255 guifg=#eeeeee ctermbg=96 guibg=#875f87
hi VisualNOS ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi WildMenu ctermfg=0 guifg=#000000 ctermbg=150 guibg=#afdf87 cterm=bold gui=bold
"" Syntax highlighting {{{2
hi Comment guifg=#787882 ctermfg=243 guibg=NONE ctermbg=NONE gui=Italic cterm=Italic
hi Constant ctermfg=229 guifg=#ffffaf
hi Identifier ctermfg=182 guifg=#dfafdf cterm=none
hi Ignore ctermfg=238 guifg=#444444
hi Number ctermfg=180 guifg=#dfaf87
hi PreProc ctermfg=150 guifg=#afdf87
hi Special ctermfg=174 guifg=#df8787
hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none
hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none
"" Special {{{2
""" .diff {{{3
hi diffAdded ctermfg=150 guifg=#afdf87
hi diffRemoved ctermfg=174 guifg=#df8787
""" vimdiff {{{3
hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf
"hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none
hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none
hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf
hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none
""" HTML {{{3
" hi htmlTag ctermfg=146 guifg=#afafdf
" hi htmlEndTag ctermfg=146 guifg=#afafdf
hi htmlTag ctermfg=244
hi htmlEndTag ctermfg=244
hi htmlArg ctermfg=182 guifg=#dfafdf
hi htmlValue ctermfg=187 guifg=#dfdfaf
hi htmlTitle ctermfg=254 ctermbg=95
" hi htmlArg ctermfg=146
" hi htmlTagName ctermfg=146
" hi htmlString ctermfg=187
""" django {{{3
hi djangoVarBlock ctermfg=180
hi djangoTagBlock ctermfg=150
hi djangoStatement ctermfg=146
hi djangoFilter ctermfg=174
""" python {{{3
hi pythonExceptions ctermfg=174
""" NERDTree {{{3
hi Directory ctermfg=110 guifg=#87afdf
hi treeCWD ctermfg=180 guifg=#dfaf87
hi treeClosable ctermfg=174 guifg=#df8787
hi treeOpenable ctermfg=150 guifg=#afdf87
hi treePart ctermfg=244 guifg=#808080
hi treeDirSlash ctermfg=244 guifg=#808080
hi treeLink ctermfg=182 guifg=#dfafdf

133
.vimrc Normal file
View File

@@ -0,0 +1,133 @@
set nocompatible
filetype off
set noswapfile
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Specify a directory for plugins
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'psf/black'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-fugitive'
" Initialize plugin system
call plug#end()
filetype plugin indent on
" Security
set modelines=0
" Show line numbers
set number
" Show file stats
set ruler
" Highlight current line
set cursorline
" Encoding
set encoding=utf-8
" ignore case when searching
set ignorecase
" Status bar
set laststatus=2
" Last line
set showmode
set showcmd
" Mouse
set mouse=a
" Fix for alacritty
set ttymouse=sgr
" FINDING FILES
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" Display all matching files when we tab complete
set wildmenu
set tabstop=4
set shiftwidth=4
set expandtab
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
" replace visually selected
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left>
" Custom Commands
command JsonFormat execute "::%!jq '.'"
" Shortcuts
map <Leader>r :Rg<CR>
map <Leader>f :FZF<CR>
map <Leader>n :NERDTree<CR>
noremap <Leader>y "*y
noremap <Leader>p "*p
noremap <Leader>Y "+y
noremap <Leader>P "+p
set pastetoggle=<F3>
" Python indentation
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
let python_highlight_all=1
syntax on
set t_Co=256
colorscheme xoria256
" Transparency
hi Normal guibg=NONE ctermbg=NONE
" highlight red lines
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
" groovy syntax
au BufNewFile,BufRead Jenkinsfile setf groovy
au BufNewFile,BufRead Jenkinsfile set tabstop=2 shiftwidth=2 expandtab
" vim-go
let g:go_auto_sameids = 1
let g:go_fmt_command = "goimports"
let g:go_fmt_experimental = 1
let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_format_strings = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_functions = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_operators = 1
let g:go_highlight_space_tab_error = 1
let g:go_highlight_string_spellcheck = 1
let g:go_highlight_trailing_whitespace_error = 0
let g:go_highlight_types = 1
let g:go_highlight_variable_assignments = 1
let g:go_highlight_variable_declarations = 1
let g:go_metalinter_autosave=1
let g:go_metalinter_autosave_enabled=['golint', 'govet']

60
.zshrc Normal file
View File

@@ -0,0 +1,60 @@
# oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
plugins=(fzf git zsh-syntax-highlighting last-working-dir)
# case-sensitive completion
CASE_SENSITIVE="true"
# Aliases
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
alias grep='grep --color=auto --line-buffered'
alias vi='nvim'
alias vim='nvim'
# Disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
HISTSIZE=1000000
SAVEHIST=1000000
source $ZSH/oh-my-zsh.sh
export LANG=en_US.UTF-8
export EDITOR='vim'
export PATH=$PATH:$HOME/.local/bin
export GPG_TTY=$(tty)
setopt noincappendhistory
# golang
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# rust
export PATH=$PATH:$HOME/.cargo/bin
# jvm
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
export PATH=$PATH:$HOME/.local/groovy-3.0.1/bin
# nodejs
export PATH=$PATH:$HOME/.local/node-v13.8.0-linux-x64/bin
export PATH=$HOME/.npm-global/bin:$PATH
# fzf
[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh
# rfd
eval "$(_RFD_COMPLETE=source_zsh rfd)"
# broot
source $HOME/.config/broot/launcher/bash/br
# zoxide
eval "$(zoxide init zsh)"
# starship
eval "$(starship init zsh)"

16
README.md Normal file
View File

@@ -0,0 +1,16 @@
# dotfiles
![screenshot](https://user-images.githubusercontent.com/4519234/77236166-52fe0d80-6b92-11ea-8b78-cb94b29c4265.png)
## use
```shell
git clone --bare git@github.com:davegallant/dotfiles.git $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' # add alias to a .bashrc or .zshrc
source ~/.zshrc || source ~/.bashrc
config config --local status.showUntrackedFiles no
# override all config files
config checkout -f
```
See: https://www.atlassian.com/git/tutorials/dotfiles