add i3, nvim, polybar, and xdg junk
This commit is contained in:
parent
aeaf670010
commit
969fda1ddc
8 changed files with 541 additions and 0 deletions
102
_config/i3/config
Normal file
102
_config/i3/config
Normal file
|
@ -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
|
6
_config/nvim/.netrwhist
Normal file
6
_config/nvim/.netrwhist
Normal file
|
@ -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'
|
168
_config/nvim/init.vim
Normal file
168
_config/nvim/init.vim
Normal file
|
@ -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 <leader>c <Plug>Commentary
|
||||
xmap <leader>c <Plug>Commentary
|
||||
omap <leader>c <Plug>Commentary
|
||||
nmap <leader>cc <Plug>CommentaryLine
|
||||
"}}}
|
||||
Plug 'tpope/vim-fugitive', "{{{
|
||||
map \b :Gblame<CR>
|
||||
map \l :Glog<CR>
|
||||
map \gs :Gstatus<CR>
|
||||
"}}}
|
||||
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 <Leader><Leader> <Plug>(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 <C-n> :bnext<CR>
|
||||
map <C-p> :bprev<CR>
|
||||
nmap <C-j> <C-W>j " faster window movement
|
||||
nmap <C-k> <C-W>k
|
||||
nmap <C-h> <C-W>h
|
||||
nmap <C-l> <C-W>l
|
||||
vmap <C-o> :sort<CR> " sort lines in visual mode with ctrl-o
|
||||
map <F7> mzgg=G`z<CR> " autoformat document
|
||||
nmap <leader>n :set invnumber<CR> " toggle line numbers
|
||||
vnoremap < <gv " stay in visual mode when shifting
|
||||
vnoremap > >gv
|
||||
nnoremap <leader>pu :PlugUpdate<CR> " vim-plug actions
|
||||
nnoremap <leader>pi :PlugInstall<CR>
|
||||
nnoremap <leader>pc :PlugClean<CR>
|
||||
nnoremap <leader>o :jumps<CR> " show jumps list
|
||||
nnoremap zn ]s " next misspelling
|
||||
nnoremap zp [s " prev misspelling
|
||||
nnoremap zf <Esc>1z= " replace misspelling with first suggestion
|
||||
nnoremap z! :set local spell!<CR> " toggle spellcheck
|
||||
nnoremap <leader>ve :e $MYVIMRC<CR> " 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!<CR>
|
||||
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 <buffer> \e :bd<CR>
|
||||
endfunction
|
||||
|
||||
" read .vimlocal if available
|
||||
if filereadable(expand('~/.vimlocal'))
|
||||
source ~/.vimlocal
|
||||
endif
|
10
_config/polybar/bars.ini
Normal file
10
_config/polybar/bars.ini
Normal file
|
@ -0,0 +1,10 @@
|
|||
[module/volume]
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
label-volume = %percentage%%
|
||||
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-3 =
|
||||
ramp-volume-4 =
|
222
_config/polybar/config
Normal file
222
_config/polybar/config
Normal file
|
@ -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 = <label-state> <label-mode>
|
||||
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 = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = ${colors.foreground}
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
||||
[module/wired-network]
|
||||
type = internal/network
|
||||
interface = enp0s25
|
||||
|
||||
label-connected = %downspeed:8% %upspeed:8%
|
||||
label-disconnected = "X"
|
||||
|
||||
bar-signal-format = %fill%%indicator%%empty%
|
||||
bar-signal-width = 5
|
||||
bar-signal-indicator = |
|
||||
bar-signal-fill = .
|
||||
bar-signal-empty = ' '
|
||||
animation-packetloss-0 = ⚠
|
||||
animation-packetloss-0-foreground = #ffa64c
|
||||
animation-packetloss-1 = 📶
|
||||
animation-packetloss-1-foreground = #000000
|
||||
; Framerate in milliseconds
|
||||
animation-packetloss-framerate = 500
|
||||
|
||||
format-packetloss = <animation-packetloss> <label-connected>
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <label>
|
||||
;format-prefix = " "
|
||||
format-prefix =
|
||||
label = " %gb_used% (%percentage_used%% of %gb_total%)"
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
format-volume = <bar-volume>
|
||||
interval = 5
|
||||
; ramp-volume-0 =
|
||||
; ramp-volume-1 =
|
||||
; ramp-volume-2 =
|
||||
ramp-volume-foreground = #f0f
|
||||
label-muted =
|
||||
|
||||
bar-volume-format=%fill%%indicator%%empty%
|
||||
bar-volume-width = 20
|
||||
bar-volume-foreground-0 = ${colors.foreground}
|
||||
bar-volume-foreground-1 = ${colors.alert}
|
||||
bar-volume-gradient = true
|
||||
|
||||
bar-volume-fill = -
|
||||
bar-volume-indicator = |
|
||||
bar-volume-empty = -
|
||||
|
||||
bar-volume-indicator-color = #0f0
|
||||
;bar-volume-indicator = |
|
||||
;bar-volume-indicator-font = 2
|
||||
;bar-volume-fill = ─
|
||||
;bar-volume-fill-font = 2
|
||||
;bar-volume-empty = ─
|
||||
;bar-volume-empty-font = 2
|
||||
;bar-volume-empty-foreground = ${colors.foreground}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = "%a %Y/%m/%d"
|
||||
;date-alt = "%a, %b %e"
|
||||
;date-alt = " %Y-%m-%d"
|
||||
time = %r
|
||||
label = " %date% %time%"
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
|
||||
interval = 10
|
||||
fixed-values = true
|
||||
spacing = 4
|
||||
|
||||
label-unmounted =
|
||||
label-mounted = %mountpoint% %used% (%percentage_used%% of %total%)
|
||||
|
||||
; vim:ft=cfg:
|
17
_config/polybar/launch.sh
Executable file
17
_config/polybar/launch.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
POLYBAR_CONFIG=/home/mark/dotfiles-refresh/.config/polybar/config
|
||||
|
||||
# kill polybar and wait for shutdown
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# display 'primary' bar on primary display and 'secondary' bar on all other displays
|
||||
for display in $(xrandr --listactivemonitors | tail -n +2 | awk '{ print$2 }'); do
|
||||
display=${display:1} # discard leading '+'
|
||||
isprimary=$(expr match ${display} '^\*') # is this the primary display?
|
||||
if [[ $isprimary -eq 1 ]]; then
|
||||
MONITOR="${display:1}" polybar primary -r --config-file=${POLYBAR_CONFIG} &
|
||||
else
|
||||
MONITOR="$display" polybar secondary -r --config-file=${POLYBAR_CONFIG} &
|
||||
fi
|
||||
done
|
15
_config/user-dirs.dirs
Normal file
15
_config/user-dirs.dirs
Normal file
|
@ -0,0 +1,15 @@
|
|||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_DESKTOP_DIR="$HOME/desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/pub"
|
||||
XDG_DOCUMENTS_DIR="$HOME/docs"
|
||||
XDG_MUSIC_DIR="$HOME/media/music"
|
||||
XDG_PICTURES_DIR="$HOME/media/pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/media/videos"
|
1
_config/user-dirs.locale
Normal file
1
_config/user-dirs.locale
Normal file
|
@ -0,0 +1 @@
|
|||
en_US
|
Loading…
Add table
Add a link
Reference in a new issue