Skip to content

Instantly share code, notes, and snippets.

@onlurking
Last active August 8, 2018 01:02
Show Gist options
  • Save onlurking/18acc30efea24a58df2d6bf1240bafb3 to your computer and use it in GitHub Desktop.
Save onlurking/18acc30efea24a58df2d6bf1240bafb3 to your computer and use it in GitHub Desktop.
Dotfiles
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec kitty -T=Terminal
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec source $HOME/.profile && rofi -show
bindsym $mod+Shift+d exec thunar
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent | redshift-gtk
exec --no-startup-id unclutter
exec --no-startup-id nm-applet
exec --no-startup-id compton
exec --no-startup-id feh --bg-scale $HOME/Pictures/wallpaper.png
exec --no-startup-id xinput set-prop 16 293 1
exec --no-startup-id setxkbmap -model abnt2 -layout br
for_window [class="^.*"] border pixel 1
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 5
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 5
bindsym XF86AudioMute exec --no-startup-id pamixer -t
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
colors {
background #1d1d1d
separator #515151
statusline #aaaaaa
focused_workspace #515151 #2d2d2d #515151
active_workspace #393939 #2d2d2d #999999
inactive_workspace #393939 #2d2d2d #999999
# urgent_workspace #393939 #2d2d2d #999999
urgent_workspace #aa0000 #990000 #ffffff
}
}
# name #top #border #text
client.focused #2d2d2d #666666 #111111 #2d2d2d
client.unfocused #2d2d2d #2d2d2d #999999 #2d2d2d
client.focused_inactive #2d2d2d #2d2d2d #999999 #2d2d2d
client.urgent #2d2d2d #2d2d2d #999999 #2d2d2d
foreground #d3d0c8
background #2d2d2d
background_opacity 0.8
dynamic_background_opacity no
color0 #2d2d2d
color8 #969896
color1 #f2777a
color9 #f2777a
color2 #99cc99
color10 #99cc99
color3 #ffcc66
color11 #ffcc66
color4 #6699cc
color12 #6699cc
color5 #cc99cc
color13 #cc99cc
color6 #66cccc
color14 #66cccc
color7 #d3d0c8
color15 #f2f0ec
font_family DejaVu Sans Mono Book
bold_font auto
italic_font auto
bold_italic_font auto
font_size 10.0
cursor_shape block
cursor #cccccc
cursor_blink_interval 0.5
cursor_stop_blinking_after 15.0
scrollback_lines 2000
scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
url_color #0087BD
url_style curly
selection_foreground #515151
selection_background #999999
rofi.modi: run,drun,window
rofi.color-enabled: true
! Property Name BG Border Separator
rofi.color-window: #393939, #2F343F, #2d2d2d
! Property Name BG FG BG-alt Head-BG Head-FG
rofi.color-normal: #393939, #cccccc, #393939, #393939, #ffffff
rofi.color-active: #393939, #6699cc, #393939, #393939, #6699cc
rofi.color-urgent: #393939, #f2777a, #393939, #393939, #f2777a
rofi.modi: run,drun,window
rofi.separator-style: none
rofi.fullscreen: false
rofi.padding: 30
rofi.hide-scrollbar: true
rofi.line-margin: 10
rofi.fake-transparency: true
rofi.yoffset: -20
rofi.xoffset: 0
rofi.width: 50
rofi.show-icons: true
rofi.drun-icon-theme: /usr/share/icons/Numix-Square
rofi.lines: 10
rofi.terminal: st
rofi.font: Hack 12
rofi.fuzzy: true
rofi.run-command: zsh -c "{cmd}"
rofi.opacity: 80
"
" ███████████████████████████
" ███████▀▀▀░░░░░░░▀▀▀███████
" ████▀░░░░░░░░░░░░░░░░░▀████
" ███│░░░░░░░░░░░░░░░░░░░│███
" ██▌│░░░░░░░░░░░░░░░░░░░│▐██
" ██░└┐░░░░░░░░░░░░░░░░░┌┘░██
" ██░░└┐░░░░░░░░░░░░░░░┌┘░░██
" ██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██
" ██▌░│██████▌░░░▐██████│░▐██
" ███░│▐███▀▀░░▄░░▀▀███▌│░███
" ██▀─┘░░░░░░░▐█▌░░░░░░░└─▀██
" ██▄░░░▄▄▄▓░░▀█▀░░▓▄▄▄░░░▄██
" ████▄─┘██▌░░░░░░░▐██└─▄████
" █████░░▐█─┬┬┬┬┬┬┬─█▌░░█████
" ████▌░░░▀┬┼┼┼┼┼┼┼┬▀░░░▐████
" █████▄░░░└┴┴┴┴┴┴┴┘░░░▄█████
" ███████▄░░░░░░░░░░░▄███████
" ██████████▄▄▄▄▄▄▄██████████
" ███████████████████████████
"
" You are about to experience a potent
" dosage of Vim. Watch your steps.
"
" ╔══════════════════════════════════════════╗
" ║ HERE BE VIMPIRES ║
" ╚══════════════════════════════════════════╝
syntax on
filetype plugin on
colorscheme Tomorrow-Night-Eighties
set expandtab
set shiftwidth=2
set laststatus=0
set tabstop=2
set shortmess+=afilmnrxoOtT
set hidden
imap jj <Esc>
set number
let mapleader=","
set listchars=eol:¬,tab:»\ ,trail:~,extends:»,precedes:«
hi Normal ctermbg=none
call plug#begin('~/.local/share/nvim/plugged')
" Autocomplete
Plug 'ervandew/supertab'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
if executable('python')
Plug 'zchee/deoplete-jedi'
endif
" Snippets
Plug 'Shougo/neosnippet.vim' | Plug 'Shougo/neosnippet-snippets'
Plug 'honza/vim-snippets'
if isdirectory('/usr/local/opt/fzf')
Plug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim'
else
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
endif
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'bronson/vim-trailing-whitespace'
Plug 'majutsushi/tagbar'
Plug 'Yggdroot/indentLine'
" Plug 'w0rp/ale'
Plug 'scrooloose/nerdcommenter'
Plug 'editorconfig/editorconfig-vim'
Plug 'ntpeters/vim-better-whitespace'
" Distraction Free
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'jiangmiao/auto-pairs'
" Syntax Highlight
Plug 'sheerun/vim-polyglot'
Plug 'vimwiki/vimwiki'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
function! BuildComposer(info)
if a:info.status != 'unchanged' || a:info.force
if has('nvim')
!cargo build --release
else
!cargo build --release --no-default-features --features json-rpc
endif
endif
endfunction
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }
Plug 'sindresorhus/github-markdown-css', { 'branch': 'gh-pages', 'as': 'github-css' }
Plug 'plasticboy/vim-markdown'
call plug#end()
" Neosnippet
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <expr><TAB> neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
if has('conceal')
set conceallevel=2 concealcursor=niv
endif
let g:markdown_composer_custom_css=['file:///home/onlurking/.local/share/nvim/plugged/github-css/github-markdown.css']
let g:markdown_composer_browser = $BROWSER
let g:neosnippet#enable_snipmate_compatibility = 1
let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets'
" Deoplete
let g:deoplete#enable_at_startup = 1
" Disable python 2
let g:loaded_python_provider = 1
let g:vimwiki_list=[{'path': '~/.wiki', 'syntax': 'markdown', 'ext': '.md'}]
" vimwiki with markdown support
let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
"" fzf.vim
set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let $FZF_DEFAULT_COMMAND = "find * -path '*/\.*' -prune -o -path 'node_modules/**' -prune -o -path 'target/**' -prune -o -path 'dist/**' -prune -o -type f -print -o -type l -print 2> /dev/null"
let g:fzf_layout = { 'down': '~40%' }
nnoremap <leader>t :Files<CR>
nnoremap <leader>b :Buffers<CR>
nnoremap <leader>p :History<CR>
" [Tags] Command to generate tags file
let g:fzf_tags_command = 'ctags -R'
" The Silver Searcher
if executable('ag')
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""'
set grepprg=ag\ --nogroup\ --nocolor
endif
" ripgrep
if executable('rg')
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
set grepprg=rg\ --vimgrep
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
endif
cnoremap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
nnoremap <silent> <leader>b :Buffers<CR>
nnoremap <silent> <leader>e :FZF -m<CR>
"" Git
noremap <Leader>ga :Gwrite<CR>
noremap <Leader>gc :Gcommit<CR>
noremap <Leader>gsh :Gpush<CR>
noremap <Leader>gll :Gpull<CR>
noremap <Leader>gs :Gstatus<CR>
noremap <Leader>gb :Gblame<CR>
noremap <Leader>gd :Gvdiff<CR>
noremap <Leader>gr :Gremove<CR>
"" Set working directory
nnoremap <leader>. :lcd %:p:h<CR>
" Tagbar
nmap <silent> <F2> :TagbarToggle<CR>
let g:tagbar_autofocus = 1
"" Copy/Paste/Cut
if has('unnamedplus')
set clipboard=unnamed,unnamedplus
endif
" NERDTree
" Autoclose vim if NERDTree is only open window
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" /NERDTree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment