diff --git a/_config/i3/config b/_config/i3/config new file mode 100644 index 0000000..afda8da --- /dev/null +++ b/_config/i3/config @@ -0,0 +1,102 @@ +# use windows key for mod +set $mod Mod4 + +# quick-launch +bindsym $mod+Return exec alacritty +bindsym $mod+Home exec thunar +bindsym $mod+c exec chromium + +# i3 actions +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart + +# window bindings and behavior +floating_modifier $mod +focus_follows_mouse no + +# kill focused window +bindsym $mod+Shift+q kill + +# move window focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# move window focus (with arrow keys) +bindsym $mod+Shift+Left focus left +bindsym $mod+Shift+Down focus down +bindsym $mod+Shift+Up focus up +bindsym $mod+Shift+Right focus right + +# splits +bindsym $mod+u split h +bindsym $mod+i split v + +# fullscreen +bindsym $mod+f fullscreen + +# toggle tiling/floating +bindsym $mod+Shift+space floating toggle + +# toggle focus between tiling/floating +bindsym $mod+space focus mode_toggle + +# focus parent container +bindsym $mod+a focus parent + +# switch to specific workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# move focus to adjacent output +bindsym $mod+bracketleft focus output left +bindsym $mod+bracketright focus output right + +# jump to workspace on same output +bindsym $mod+Shift+bracketleft workspace prev_on_output +bindsym $mod+Shift+bracketright workspace next_on_output + + +# appearance +#font xft:artwiz lime 7 +new_window pixel 2 +font xft:Roboto 13 +gaps inner 8 +gaps outer 0 + +set_from_resource $fg i3wm.color7 +set_from_resource $bg i3wm.color2 +set_from_resource $bgalt i3wm.color8 + +# class brdr bg txt indic childbdr +client.focused $bg $bg $fg $bg $bg +# client.focused_inactive $bg $bg $fg $bg $bg +client.unfocused $bgalt $bgalt $fg $bg $bgalt +# client.urgent $bg $bg $fg $bg $bg +# client.placeholder $bg $bg $fg $bg $bg +# client.background $bg + +# autostart +exec_always --no-startup-id wal -q -t -i ~/wallpaper +exec_always --no-startup-id ~/.config/polybar/launch.sh diff --git a/_config/nvim/.netrwhist b/_config/nvim/.netrwhist new file mode 100644 index 0000000..be7177d --- /dev/null +++ b/_config/nvim/.netrwhist @@ -0,0 +1,6 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =4 +let g:netrw_dirhist_1='/home/mark/dotfiles-refresh' +let g:netrw_dirhist_2='/home/mark/dotfiles-refresh/.config' +let g:netrw_dirhist_3='/home/mark/dotfiles-refresh/.config/polybar' +let g:netrw_dirhist_4='/home/mark/dotfiles-refresh' diff --git a/_config/nvim/init.vim b/_config/nvim/init.vim new file mode 100644 index 0000000..9164228 --- /dev/null +++ b/_config/nvim/init.vim @@ -0,0 +1,168 @@ +" Mark's super duper _ +" _ __ ___ _____ _(_)_ __ ___ +"| '_ \ / _ \/ _ \ \ / / | '_ ` _ \ +"| | | | __/ (_) \ V /| | | | | | | +"|_| |_|\___|\___/ \_/ |_|_| |_| |_| + +set title +set history=700 +set background=dark + +filetype plugin on +filetype indent on +syntax enable + +let mapleader=" " +let maplocalleader=" " + +set autoread " automatically reload changed files +set wildmenu " handy auto complete menu + +set list +set listchars=tab:·\ ,trail:▂,extends:»,precedes:« +set infercase " completion recognizes capitalization +set smartcase +set ignorecase +set incsearch " search as you type +set hidden " sometimes I don't want to save a buffer before switching away from it + +set completeopt-=preview +set matchtime=1 +set modeline +set modelines=5 +set noswapfile +set scrolloff=8 +set shiftwidth=4 +set softtabstop=4 +set spell +set tabstop=4 + +" install vim-plug +if !filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim')) + silent !echo "Installing vim-plug..." + silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +endif +call plug#begin('~/.local/share/nvim/plugged') + +" color schemes +Plug 'dylanaraps/wal.vim' + +" syntax +Plug 'calviken/vim-gdscript3' +Plug 'ianks/vim-tsx' +Plug 'cakebaker/scss-syntax.vim' +Plug 'posva/vim-vue' +Plug 'lepture/vim-jinja' + +" functionality +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-abolish' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-dispatch' +Plug 'tpope/vim-vinegar' +Plug 'tpope/vim-commentary', "{{{ + nmap c Commentary + xmap c Commentary + omap c Commentary + nmap cc CommentaryLine +"}}} +Plug 'tpope/vim-fugitive', "{{{ + map \b :Gblame + map \l :Glog + map \gs :Gstatus +"}}} +Plug 'carlitux/deoplete-ternjs', {'do': 'npm install -g tern'} +Plug 'w0rp/ale', "{{{ + let g:ale_linters = { + \ 'c': ['clang'], + \ 'cpp': ['clangx'], + \ 'php': ['phpcs'], + \ 'javascript': ['eslint'], + \} + let g:ale_python_pylint_options = '--load-plugins pylint_django' + let g:ale_sign_error = '⬤' +"}}} +Plug 'vim-airline/vim-airline-themes' +Plug 'vim-airline/vim-airline', "{{{ + let g:airline_symbols = {} + let g:airline_symbols.branch = '⭠' + let g:airline_symbols.readonly = '⭤' + let g:airline_symbols.linenr = '⭡' + let g:airline#extensions#tabline#enabled = 1 + let g:airline_theme = 'wal' +"}}} +Plug 'mattn/webapi-vim' +Plug 'mattn/gist-vim' +Plug 'easymotion/vim-easymotion', "{{{ + map (easymotion-prefix) +"}}} +if has('nvim') + Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'} +else + Plug 'Shougo/deoplete.nvim' + Plug 'roxma/nvim-yarp' + Plug 'roxma/vim-hug-neovim-rpc' +endif +let g:deoplete#enable_at_startup = 1 +let g:deoplete#enable_smart_case = 1 +let g:deoplete#sources#syntax#min_keyword_length = 2 +Plug 'Shougo/neosnippet-snippets' +Plug 'Shougo/neosnippet.vim', "{{{ + let g:neosnippet#snippets_directory = '~/.vim/bundle/'.expand(fnamemodify($MYVIMRC, ':p:h').'/snippets/') + let g:neosnippet#enable_snipmate_compatibility = 1 +"}}} +Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'} +Plug 'junegunn/fzf.vim', "{{{ +"}}} +call plug#end() + +" key bindings +map :bnext +map :bprev +nmap j " faster window movement +nmap k +nmap h +nmap l +vmap :sort " sort lines in visual mode with ctrl-o +map mzgg=G`z " autoformat document +nmap n :set invnumber " toggle line numbers +vnoremap < >gv +nnoremap pu :PlugUpdate " vim-plug actions +nnoremap pi :PlugInstall +nnoremap pc :PlugClean +nnoremap o :jumps " show jumps list +nnoremap zn ]s " next misspelling +nnoremap zp [s " prev misspelling +nnoremap zf 1z= " replace misspelling with first suggestion +nnoremap z! :set local spell! " toggle spellcheck +nnoremap ve :e $MYVIMRC " quick open this file +if executable('rg') + set grepprg='rg\ --vimgrep' " use ripgrep if available +endif + +" theme / visual +colorscheme wal +hi clear SpellBad " italicize misspellings +hi SpellBad gui=underline cterm=italic + +" netrw +nnoremap \e :Lexplore! +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_altv = 1 +let g:netrw_winsize = 25 +let g:netrw_browse_split = 4 +augroup netrw_mapping + autocmd! + autocmd filetype netrw call NetrwMapping() +augroup END +function! NetrwMapping() + noremap \e :bd +endfunction + +" read .vimlocal if available +if filereadable(expand('~/.vimlocal')) + source ~/.vimlocal +endif diff --git a/_config/polybar/bars.ini b/_config/polybar/bars.ini new file mode 100644 index 0000000..aaec7cf --- /dev/null +++ b/_config/polybar/bars.ini @@ -0,0 +1,10 @@ +[module/volume] + format-volume = + format-muted = + label-volume = %percentage%% + + ramp-volume-0 =  + ramp-volume-1 =  + ramp-volume-2 =  + ramp-volume-3 =  + ramp-volume-4 =  diff --git a/_config/polybar/config b/_config/polybar/config new file mode 100644 index 0000000..2159d04 --- /dev/null +++ b/_config/polybar/config @@ -0,0 +1,222 @@ + +[colors] + background = ${xrdb:color0:#333} + foreground = ${xrdb:color5:#aaa} + foreground-alt = ${xrdb:color6:#fff} + alert = ${xrdb:color3:#f00} + +[global/wm] + margin-top = 0 + margin-bottom = 0 + +[settings] + throttle-output = 5 + throttle-output-for = 10 + throttle-input-for = 30 + compositing-background = source + screenchange-reload = true + + + +[bar/base] + monitor = ${env:MONITOR} + override-redirect = false + dpi = 92 + width = 100% + height = 24 + top = true + + background = ${colors.background} + foreground = ${colors.foreground} + border-bottom-size = 2 + border-color = ${xrdb:color2:#333} + + padding = 1 + module-margin = 2 + + line-color = $f00 + fixed-center = true + + font-0 = Roboto:style=Black:size=10;1 + font-1 = Material\-Icons:style=Regular:size=12;2 + font-2 = Unifont:style=Regular:size=14;0 + + scroll-up = i3wm-wsnext + scroll-down = i3wm-wsprev + + cursor-click = pointer + +[bar/primary] + inherit = bar/base + modules-left = i3 + modules-right = wired-network filesystem memory date pulseaudio + + tray-position = right + tray-background: ${bar.background} + tray-maxsize = 24444 + +[bar/secondary] + inherit = bar/base + + top = true + modules-left = i3 + ;modules-center = window + + font-0 = Roboto:style=Black:size=10;1 + font-1 = Material\-Design\-Iconic\-Font:style=Design-Iconic-Font:size=18;2 + font-2 = Unifont:style=Regular:size=14;0 + background = ${colors.background} + foreground = ${colors.foreground} + border-bottom-size = 2 + border-color = ${xrdb:color2:#333} + + +[module/window] + type = internal/xwindow + label = %title:0:200:...% + + +[module/xkeyboard] + type = internal/xkeyboard + + +[module/i3] + type = internal/i3 + format = + index-sort = true + wrapping-scroll = false + + ; Only show workspaces on the same output as the bar + pin-workspaces = true + + label-mode-padding = 2 + label-mode-foreground = ${colors.foreground} + label-mode-background = ${colors.background} + + ; focused = Active workspace on focused monitor + label-focused = %name% + label-focused-foreground = ${self.label-mode-background} + label-focused-background = ${self.label-mode-foreground} + label-focused-padding = ${self.label-mode-padding} + + ; unfocused = Inactive workspace on any monitor + label-unfocused = %name% + label-unfocused-foreground = ${self.label-mode-foreground} + label-unfocused-padding = ${self.label-mode-padding} + + ; visible = Active workspace on unfocused monitor + label-visible = %name% + label-visible-foreground = ${colors.foreground-alt} + label-visible-background = ${self.label-mode-background} + label-visible-padding = ${self.label-mode-padding} + label-visible-underline = 2 + + ; urgent = Workspace with urgency hint set + label-urgent = %name% + label-urgent-background = ${colors.background} + label-urgent-foreground = ${colors.alert} + label-urgent-padding = 2 + + ; Separator in between workspaces + label-separator = + + +[module/xbacklight] + type = internal/xbacklight + + format =