dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit e7387ca0c76193235730ab7479129e066cc6f884
parent 6984306ab3efb00f28f32aa37778e7f2f6b3928a
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Wed, 14 Oct 2020 05:13:13 -0400

Merge https://git.sr.ht/~jbauer/dotfiles into master

Diffstat:
M.bashrc | 1-
M.config/lynx/lynx.cfg | 4++--
M.config/newsboat/urls | 93+------------------------------------------------------------------------------
D.config/nvim/bundle/goyo.vim/autoload/goyo.vim | 447-------------------------------------------------------------------------------
D.config/nvim/bundle/goyo.vim/doc/goyo.txt | 170-------------------------------------------------------------------------------
D.config/nvim/bundle/goyo.vim/plugin/goyo.vim | 24------------------------
M.config/nvim/init.vim | 6------
M.config/tmux/tmux.conf | 4++--
A.config/user-dirs.dirs | 8++++++++
A.local/bin/tmux-battery.sh | 3+++
M.profile | 2+-
11 files changed, 17 insertions(+), 745 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -62,7 +62,6 @@ alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc' alias lpr='lpr -o fit-to-page -o two-sided-long-edge' alias config='git --git-dir="$HOME"/docs/proj/dotfiles --work-tree="$HOME"' alias units='units --history "$XDG_CACHE_HOME"/units_history' -alias cal='ncal -bM3' alias poweroff='yay -Syyu && doas poweroff' alias reboot='yay -Syyu && doas reboot' diff --git a/.config/lynx/lynx.cfg b/.config/lynx/lynx.cfg @@ -114,7 +114,7 @@ # the user's home directory: .ex #STARTFILE:file://localhost/~/ -STARTFILE:file://localhost/usr/share/doc/lynx/lynx_help/about_lynx.html.gz +STARTFILE:file://localhost/usr/share/doc/lynx/lynx_help/about_lynx.html # # Your choice of STARTFILE should reflect your site's needs, and be a URL that # you can connect to reliably. Otherwise users will become confused and think @@ -136,7 +136,7 @@ STARTFILE:file://localhost/usr/share/doc/lynx/lynx_help/about_lynx.html.gz #HELPFILE:https://lynx.invisible-island.net/lynx_help/lynx_help_main.html .ex ##HELPFILE:file://localhost/PATH_TO/lynx_help/lynx_help_main.html -HELPFILE:file://localhost/usr/share/doc/lynx-common/lynx_help/lynx_help_main.html.gz +HELPFILE:file://localhost/usr/share/doc/lynx/lynx_help/lynx_help_main.html .h2 DEFAULT_INDEX_FILE # DEFAULT_INDEX_FILE is the default file retrieved when the diff --git a/.config/newsboat/urls b/.config/newsboat/urls @@ -1,6 +1,3 @@ -### Unread Meta Feed ### -"query:Unread:unread = \"yes\"" meta - ### SOFTWARE ### https://pleroma.social/announcements/feed.xml Software @@ -17,129 +14,41 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCerEIdrEW-IqwvlH8lTQUJQ You https://www.youtube.com/feeds/videos.xml?channel_id=UCS0N5baNlQWJCUrhCEo8WlA Youtube "~YOUTUBE: Ben Eater" https://www.youtube.com/feeds/videos.xml?channel_id=UChIs72whgZI9w6d6FhwGGHA Youtube "~YOUTUBE: Gamer's Nexus" https://www.youtube.com/feeds/videos.xml?channel_id=UCMb0O2CdPBNi-QqPk5T3gsQ Youtube "~YOUTUBE: James Hoffmann" -https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw Youtube "~YOUTUBE: LinusTechTips" https://www.youtube.com/feeds/videos.xml?channel_id=UCFhXFikryT4aFcLkLw2LBLA Youtube "~YOUTUBE: Nile Red" https://www.youtube.com/feeds/videos.xml?channel_id=UC6107grRI4m0o2-emgoDnAA Youtube "~YOUTUBE: SmarterEveryDay" https://www.youtube.com/feeds/videos.xml?channel_id=UCmtyQOKKmrMVaKuRXz02jbQ Youtube "~YOUTUBE: Sebastian Lague" https://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q Youtube "~YOUTUBE: Technology Connections" https://www.youtube.com/feeds/videos.xml?channel_id=UCBa659QWEk1AI4Tg--mrJ2A Youtube "~YOUTUBE: Tom Scott" -### PODCASTS ### -https://2.5admins.com/feed/podcast Podcast -http://feed.jupiter.zone/allshows Podcast -https://www.codingblocks.net/podcast-feed.xml Podcast -https://feeds.pacific-content.com/commandlineheroes Podcast -https://feeds.megaphone.fm/darknetdiaries Podcast -https://feeds.hackablepodcast.com/hackable Podcast -https://latenightlinux.com/feed/mp3 Podcast -https://thenew.show/feed/podcast Podcast -http://feeds.soundcloud.com/users/soundcloud:users:261098918/sounds.rss Podcast -https://feeds.fireside.fm/bsdnow/rss Podcast -https://www.badvoltage.org/feed/ogg/ Podcast -https://opensourcesecuritypodcast.libsyn.com/rss Podcast - ### BLOGS ### -https://geekgonecrazy.com/feed.xml Blog -https://brandelune.github.io/adventuresintechland.xml Blog https://secluded.site/posts/index.xml Blog -https://fasterthanli.me/index.xml Blog -https://hankchizljaw.com/feed/all.xml Blog -https://anildash.com/rss/ Blog -http://ayekat.ch/atom.xml Blog -https://ar.al/index.xml Blog -https://beyermatthias.de/index.xml Blog -https://bn4t.me/posts/index.xml Blog -https://bnolet.me/posts/index.xml Blog -https://cancookrice.com/rss.xml Blog -https://www.acdw.net/atom.xml Blog https://chriswiegman.com/index.xml Blog https://christine.website/blog.rss Blog -https://chriswere.uk/design.rss.txt Blog -https://www.codesections.com/rss.xml Blog http://decafbad.net/feed Blog https://feed.ctrl.blog/latest.atom Blog -https://www.danielplayfaircal.com/feed.xml Blog https://dannyvankooten.com/feed.xml Blog -https://write.privacytools.io/darylsun/feed/ Blog -https://www.davd.io/index.xml Blog https://desmondrivet.com/feeds/blog.rss Blog https://drewdevault.com/feed.xml Blog https://dusty.phillips.codes/index.xml Blog -https://blog.eleos.space/rss.xml Blog https://write.privacytools.io/freddy/feed/ Blog https://fribbledom.com/posts/index.xml Blog https://blog.marcg.pizza/marcg//feed/ Blog -https://garrettdimon.com/feed.xml Blog -https://gerritniezen.com/feed/ Blog -https://www.gkbrk.com/feed.xml Blog -https://gregoryhammond.ca/feed/ Blog -https://humaidq.ae/blog/index.xml Blog -https://humbug.pw/feed.xml Blog http://jakob.space/feed.xml Blog -https://write.as/jeffjessie/feed/ Blog https://jlelse.blog/index.xml Blog https://jolek78.writeas.com/feed/ Blog -https://jborichevskiy.com/posts/index.xml Blog -http://blogtastic.blog/index.xml Blog -https://www.justinvollmer.com/feed/ Blog https://kevq.uk/feed Blog -https://pensinspace.net/kindly/feed/ Blog -https://krsc.amk.land/feed.xml Blog -https://www.kylepiira.com/feed Blog -https://laurakalbag.com/index.xml Blog http://linuxforpoets.com/feed.xml Blog https://qua.name/lopeztel/feed/ Blog -https://lukasrosenstock.net/feed.xml Blog -https://write.as/matt/feed/ Blog -https://matthiasott.com/rss Blog -https://matthias.thym.at/blog/index.xml Blog -https://mikestone.me/feed/ Blog -https://blog.nelhage.com/atom.xml Blog -https://nixing.mx/feed.xml Blog -https://nullbuffer.com/feed.xml Blog -https://parasurv.neocities.org/rss.xml Blog "~parasurv's webspace" https://ambrevar.xyz/atom.xml Blog -https://rahulchowdhury.co/feed.xml Blog -https://blog.jessfraz.com/index.xml Blog -https://randomgeekery.org/post/index.xml Blog -https://nolanlawson.com/feed Blog -https://remysharp.com/feed.xml Blog -https://rocketnine.space/post/index.xml Blog https://www.romanzolotarev.com/rss.xml Blog -https://write.as/write-as-roscoes-notebook/feed/ Blog https://blog.sasach.work/feed Blog -https://www.seanbehan.dev/index.xml Blog -https://seths.blog/rss Blog -https://simbly.me/feed/ Blog -https://sugarfreegamer.com/rss.xml Blog -https://blog.sulairris.com/feed/ Blog -https://buttondown.email/surya/rss Blog -https://ttmd.grayw.co.uk/rss/ Blog -https://todddavies.co.uk/blog/rss.xml Blog http://tonsky.me/blog/atom.xml Blog -https://trivial.observer/index.xml Blog -https://degruchy.org/feed Blog -https://yarmo.eu/rss/all Blog -https://baez.link/feed/ Blog -https://emanuelpina.pt/index.xml Blog https://randomthoughts.dk/index.xml Blog https://mxb.dev/feed.xml Blog -https://kevingal.com/feed.xml Blog -https://pista36.es/wordpress/index.php/feed/ Blog -https://www.thewkblog.com/?feed=rss2 Blog -https://ramblings.fred.moe/rss.xml Blog https://fnux.ch/atom.xml Blog -https://zerokspot.com/index.xml Blog -https://jrswab.com/blog.atom Blog "~J.R. Swab's Blog" -https://jnduli.co.ke/feeds/all.atom.xml Blog -https://blog.samwhited.com/atom.xml Blog -https://goel.io/feed.xml Blog https://nora.codes/index.xml Blog -https://blog.gemnoc.ca/feed/ Blog https://solar.lowtechmagazine.com/feeds/all-en.atom.xml Blog -https://rusingh.com/feed.xml Blog -https://cassidyjames.com/feed.xml Blog -https://protesilaos.com/codelog.xml Blog +https://blog.knightsofthelambdacalcul.us/index.xml Blog ### MY SITE ### https://www.paritybit.ca/feeds/sitewide-feed.xml diff --git a/.config/nvim/bundle/goyo.vim/autoload/goyo.vim b/.config/nvim/bundle/goyo.vim/autoload/goyo.vim @@ -1,447 +0,0 @@ -" Copyright (c) 2015 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -let s:cpo_save = &cpo -set cpo&vim - -function! s:const(val, min, max) - return min([max([a:val, a:min]), a:max]) -endfunction - -function! s:get_color(group, attr) - return synIDattr(synIDtrans(hlID(a:group)), a:attr) -endfunction - -function! s:set_color(group, attr, color) - let gui = has('gui_running') || has('termguicolors') && &termguicolors - execute printf('hi %s %s%s=%s', a:group, gui ? 'gui' : 'cterm', a:attr, a:color) -endfunction - -function! s:blank(repel) - if bufwinnr(t:goyo_pads.r) <= bufwinnr(t:goyo_pads.l) + 1 - \ || bufwinnr(t:goyo_pads.b) <= bufwinnr(t:goyo_pads.t) + 3 - call s:goyo_off() - endif - execute 'wincmd' a:repel -endfunction - -function! s:init_pad(command) - execute a:command - - setlocal buftype=nofile bufhidden=wipe nomodifiable nobuflisted noswapfile - \ nonu nocursorline nocursorcolumn winfixwidth winfixheight statusline=\ - if exists('&rnu') - setlocal nornu - endif - if exists('&colorcolumn') - setlocal colorcolumn= - endif - let bufnr = winbufnr(0) - - execute winnr('#') . 'wincmd w' - return bufnr -endfunction - -function! s:setup_pad(bufnr, vert, size, repel) - let win = bufwinnr(a:bufnr) - execute win . 'wincmd w' - execute (a:vert ? 'vertical ' : '') . 'resize ' . max([0, a:size]) - augroup goyop - execute 'autocmd WinEnter,CursorMoved <buffer> nested call s:blank("'.a:repel.'")' - autocmd WinLeave <buffer> call s:hide_statusline() - augroup END - - " To hide scrollbars of pad windows in GVim - let diff = winheight(0) - line('$') - (has('gui_running') ? 2 : 0) - if diff > 0 - setlocal modifiable - call append(0, map(range(1, diff), '""')) - normal! gg - setlocal nomodifiable - endif - execute winnr('#') . 'wincmd w' -endfunction - -function! s:resize_pads() - augroup goyop - autocmd! - augroup END - - let t:goyo_dim.width = s:const(t:goyo_dim.width, 2, &columns) - let t:goyo_dim.height = s:const(t:goyo_dim.height, 2, &lines) - - let vmargin = max([0, (&lines - t:goyo_dim.height) / 2 - 1]) - let yoff = s:const(t:goyo_dim.yoff, - vmargin, vmargin) - let top = vmargin + yoff - let bot = vmargin - yoff - 1 - call s:setup_pad(t:goyo_pads.t, 0, top, 'j') - call s:setup_pad(t:goyo_pads.b, 0, bot, 'k') - - let nwidth = max([len(string(line('$'))) + 1, &numberwidth]) - let width = t:goyo_dim.width + (&number ? nwidth : 0) - let hmargin = max([0, (&columns - width) / 2 - 1]) - let xoff = s:const(t:goyo_dim.xoff, - hmargin, hmargin) - call s:setup_pad(t:goyo_pads.l, 1, hmargin + xoff, 'l') - call s:setup_pad(t:goyo_pads.r, 1, hmargin - xoff, 'h') -endfunction - -function! s:tranquilize() - let bg = s:get_color('Normal', 'bg#') - for grp in ['NonText', 'FoldColumn', 'ColorColumn', 'VertSplit', - \ 'StatusLine', 'StatusLineNC', 'SignColumn'] - " -1 on Vim / '' on GVim - if bg == -1 || empty(bg) - call s:set_color(grp, 'fg', get(g:, 'goyo_bg', 'black')) - call s:set_color(grp, 'bg', 'NONE') - else - call s:set_color(grp, 'fg', bg) - call s:set_color(grp, 'bg', bg) - endif - call s:set_color(grp, '', 'NONE') - endfor -endfunction - -function! s:hide_statusline() - setlocal statusline=\ -endfunction - -function! s:hide_linenr() - if !get(g:, 'goyo_linenr', 0) - setlocal nonu - if exists('&rnu') - setlocal nornu - endif - endif - if exists('&colorcolumn') - setlocal colorcolumn= - endif -endfunction - -function! s:maps_nop() - let mapped = filter(['R', 'H', 'J', 'K', 'L', '|', '_'], - \ "empty(maparg(\"\<c-w>\".v:val, 'n'))") - for c in mapped - execute 'nnoremap <c-w>'.escape(c, '|').' <nop>' - endfor - return mapped -endfunction - -function! s:maps_resize() - let commands = { - \ '=': ':<c-u>let t:goyo_dim = <sid>parse_arg(t:goyo_dim_expr) <bar> call <sid>resize_pads()<cr>', - \ '>': ':<c-u>let t:goyo_dim.width = winwidth(0) + 2 * v:count1 <bar> call <sid>resize_pads()<cr>', - \ '<': ':<c-u>let t:goyo_dim.width = winwidth(0) - 2 * v:count1 <bar> call <sid>resize_pads()<cr>', - \ '+': ':<c-u>let t:goyo_dim.height += 2 * v:count1 <bar> call <sid>resize_pads()<cr>', - \ '-': ':<c-u>let t:goyo_dim.height -= 2 * v:count1 <bar> call <sid>resize_pads()<cr>' - \ } - let mapped = filter(keys(commands), "empty(maparg(\"\<c-w>\".v:val, 'n'))") - for c in mapped - execute 'nnoremap <silent> <c-w>'.c.' '.commands[c] - endfor - return mapped -endfunction - -nnoremap <silent> <plug>(goyo-resize) :<c-u>call <sid>resize_pads()<cr> - -function! s:goyo_on(dim) - let dim = s:parse_arg(a:dim) - if empty(dim) - return - endif - - let s:orig_tab = tabpagenr() - let settings = - \ { 'laststatus': &laststatus, - \ 'showtabline': &showtabline, - \ 'fillchars': &fillchars, - \ 'winminwidth': &winminwidth, - \ 'winwidth': &winwidth, - \ 'winminheight': &winminheight, - \ 'winheight': &winheight, - \ 'ruler': &ruler, - \ 'sidescroll': &sidescroll, - \ 'sidescrolloff': &sidescrolloff - \ } - - " New tab - tab split - - let t:goyo_master = winbufnr(0) - let t:goyo_dim = dim - let t:goyo_dim_expr = a:dim - let t:goyo_pads = {} - let t:goyo_revert = settings - let t:goyo_maps = extend(s:maps_nop(), s:maps_resize()) - if has('gui_running') - let t:goyo_revert.guioptions = &guioptions - endif - - " vim-gitgutter - let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0) - if t:goyo_disabled_gitgutter - silent! GitGutterDisable - endif - - " vim-signify - let t:goyo_disabled_signify = exists('b:sy') && b:sy.active - if t:goyo_disabled_signify - SignifyToggle - endif - - " vim-airline - let t:goyo_disabled_airline = exists('#airline') - if t:goyo_disabled_airline - AirlineToggle - endif - - " vim-powerline - let t:goyo_disabled_powerline = exists('#PowerlineMain') - if t:goyo_disabled_powerline - augroup PowerlineMain - autocmd! - augroup END - augroup! PowerlineMain - endif - - " lightline.vim - let t:goyo_disabled_lightline = exists('#lightline') - if t:goyo_disabled_lightline - silent! call lightline#disable() - endif - - call s:hide_linenr() - " Global options - let &winheight = max([&winminheight, 1]) - set winminheight=1 - set winheight=1 - set winminwidth=1 winwidth=1 - set laststatus=0 - set showtabline=0 - set noruler - set fillchars+=vert:\ - set fillchars+=stl:\ - set fillchars+=stlnc:\ - set sidescroll=1 - set sidescrolloff=0 - - " Hide left-hand scrollbars - if has('gui_running') - set guioptions-=l - set guioptions-=L - endif - - let t:goyo_pads.l = s:init_pad('vertical topleft new') - let t:goyo_pads.r = s:init_pad('vertical botright new') - let t:goyo_pads.t = s:init_pad('topleft new') - let t:goyo_pads.b = s:init_pad('botright new') - - call s:resize_pads() - call s:tranquilize() - - augroup goyo - autocmd! - autocmd TabLeave * nested call s:goyo_off() - autocmd VimResized * call s:resize_pads() - autocmd ColorScheme * call s:tranquilize() - autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline() - autocmd WinEnter,WinLeave * call s:hide_statusline() - if has('nvim') - autocmd TermClose * call feedkeys("\<plug>(goyo-resize)") - endif - augroup END - - call s:hide_statusline() - if exists('g:goyo_callbacks[0]') - call g:goyo_callbacks[0]() - endif - if exists('#User#GoyoEnter') - doautocmd User GoyoEnter - endif -endfunction - -function! s:goyo_off() - if !exists('#goyo') - return - endif - - " Oops, not this tab - if !exists('t:goyo_revert') - return - endif - - " Clear auto commands - augroup goyo - autocmd! - augroup END - augroup! goyo - augroup goyop - autocmd! - augroup END - augroup! goyop - - for c in t:goyo_maps - execute 'nunmap <c-w>'.escape(c, '|') - endfor - - let goyo_revert = t:goyo_revert - let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter - let goyo_disabled_signify = t:goyo_disabled_signify - let goyo_disabled_airline = t:goyo_disabled_airline - let goyo_disabled_powerline = t:goyo_disabled_powerline - let goyo_disabled_lightline = t:goyo_disabled_lightline - let goyo_orig_buffer = t:goyo_master - let [line, col] = [line('.'), col('.')] - - if tabpagenr() == 1 - tabnew - normal! gt - bd - endif - tabclose - execute 'normal! '.s:orig_tab.'gt' - if winbufnr(0) == goyo_orig_buffer - " Doesn't work if window closed with `q` - execute printf('normal! %dG%d|', line, col) - endif - - let wmw = remove(goyo_revert, 'winminwidth') - let ww = remove(goyo_revert, 'winwidth') - let &winwidth = ww - let &winminwidth = wmw - let wmh = remove(goyo_revert, 'winminheight') - let wh = remove(goyo_revert, 'winheight') - let &winheight = max([wmh, 1]) - let &winminheight = wmh - let &winheight = wh - - for [k, v] in items(goyo_revert) - execute printf('let &%s = %s', k, string(v)) - endfor - execute 'colo '. get(g:, 'colors_name', 'default') - - if goyo_disabled_gitgutter - silent! GitGutterEnable - endif - - if goyo_disabled_signify - silent! if !b:sy.active - SignifyToggle - endif - endif - - if goyo_disabled_airline && !exists('#airline') - AirlineToggle - " For some reason, Airline requires two refreshes to avoid display - " artifacts - silent! AirlineRefresh - silent! AirlineRefresh - endif - - if goyo_disabled_powerline && !exists('#PowerlineMain') - doautocmd PowerlineStartup VimEnter - silent! PowerlineReloadColorscheme - endif - - if goyo_disabled_lightline - silent! call lightline#enable() - endif - - if exists('#Powerline') - doautocmd Powerline ColorScheme - endif - - if exists('g:goyo_callbacks[1]') - call g:goyo_callbacks[1]() - endif - if exists('#User#GoyoLeave') - doautocmd User GoyoLeave - endif -endfunction - -function! s:relsz(expr, limit) - if a:expr !~ '%$' - return str2nr(a:expr) - endif - return a:limit * str2nr(a:expr[:-2]) / 100 -endfunction - -function! s:parse_arg(arg) - if exists('g:goyo_height') || !exists('g:goyo_margin_top') && !exists('g:goyo_margin_bottom') - let height = s:relsz(get(g:, 'goyo_height', '85%'), &lines) - let yoff = 0 - else - let top = max([0, s:relsz(get(g:, 'goyo_margin_top', 4), &lines)]) - let bot = max([0, s:relsz(get(g:, 'goyo_margin_bottom', 4), &lines)]) - let height = &lines - top - bot - let yoff = top - bot - endif - - let dim = { 'width': s:relsz(get(g:, 'goyo_width', 80), &columns), - \ 'height': height, - \ 'xoff': 0, - \ 'yoff': yoff } - if empty(a:arg) - return dim - endif - let parts = matchlist(a:arg, '^\s*\([0-9]\+%\?\)\?\([+-][0-9]\+%\?\)\?\%(x\([0-9]\+%\?\)\?\([+-][0-9]\+%\?\)\?\)\?\s*$') - if empty(parts) - echohl WarningMsg - echo 'Invalid dimension expression: '.a:arg - echohl None - return {} - endif - if !empty(parts[1]) | let dim.width = s:relsz(parts[1], &columns) | endif - if !empty(parts[2]) | let dim.xoff = s:relsz(parts[2], &columns) | endif - if !empty(parts[3]) | let dim.height = s:relsz(parts[3], &lines) | endif - if !empty(parts[4]) | let dim.yoff = s:relsz(parts[4], &lines) | endif - return dim -endfunction - -function! goyo#execute(bang, dim) - if a:bang - if exists('#goyo') - call s:goyo_off() - endif - else - if exists('#goyo') == 0 - call s:goyo_on(a:dim) - elseif !empty(a:dim) - if winnr('$') < 5 - call s:goyo_off() - return goyo#execute(a:bang, a:dim) - endif - let dim = s:parse_arg(a:dim) - if !empty(dim) - let t:goyo_dim = dim - let t:goyo_dim_expr = a:dim - call s:resize_pads() - endif - else - call s:goyo_off() - end - end -endfunction - -let &cpo = s:cpo_save -unlet s:cpo_save - diff --git a/.config/nvim/bundle/goyo.vim/doc/goyo.txt b/.config/nvim/bundle/goyo.vim/doc/goyo.txt @@ -1,170 +0,0 @@ -*goyo.txt* goyo Last change: April 2 2017 -GOYO - TABLE OF CONTENTS *goyo* *goyo-toc* -============================================================================== - - goyo.vim (고요) - Installation - Usage - Dimension expression - Configuration - Callbacks - Inspiration - Pros. - License - -GOYO.VIM (고요) *goyo-vim* -============================================================================== - -Distraction-free writing in Vim. - -https://raw.github.com/junegunn/i/master/goyo.png - -(Color scheme: {seoul256}{1}) - -Best served with {limelight.vim}{2}. - - {1} https://github.com/junegunn/seoul256.vim - {2} https://github.com/junegunn/limelight.vim - - -INSTALLATION *goyo-installation* -============================================================================== - -Use your favorite plugin manager. - - *:PlugInstall* - - - {vim-plug}{3} - 1. Add `Plug 'junegunn/goyo.vim'` to .vimrc - 2. Run `:PlugInstall` - - {3} https://github.com/junegunn/vim-plug - - -USAGE *goyo-usage* -============================================================================== - - *:Goyo* - - - `:Goyo` - - Toggle Goyo - - `:Goyo [dimension]` - - Turn on or resize Goyo - - `:Goyo!` - - Turn Goyo off - -The window can be resized with the usual [count]`CTRL-W` + `>`, `<`, `+`, `-` keys, -and `CTRL-W` + `=` will resize it back to the initial size. - - -< Dimension expression >______________________________________________________~ - *goyo-dimension-expression* - -The expected format of a dimension expression is -`[WIDTH][XOFFSET][x[HEIGHT][YOFFSET]]`. `XOFFSET` and `YOFFSET` should be -prefixed by `+` or `-`. Each component can be given in percentage. -> - " Width - Goyo 120 - - " Height - Goyo x30 - - " Both - Goyo 120x30 - - " In percentage - Goyo 120x50% - - " With offsets - Goyo 50%+25%x50%-25% -< - -CONFIGURATION *goyo-configuration* -============================================================================== - - *g:goyo_width* *g:goyo_height* *g:goyo_linenr* - - - `g:goyo_width` (default: 80) - - `g:goyo_height` (default: 85%) - - `g:goyo_linenr` (default: 0) - - -< Callbacks >_________________________________________________________________~ - *goyo-callbacks* - -By default, {vim-airline}{4}, {vim-powerline}{5}, {powerline}{6}, -{lightline.vim}{7}, {vim-signify}{8}, and {vim-gitgutter}{9} are temporarily -disabled while in Goyo mode. - -If you have other plugins that you want to disable/enable, or if you want to -change the default settings of Goyo window, you can set up custom routines to -be triggered on `GoyoEnter` and `GoyoLeave` events. -> - function! s:goyo_enter() - silent !tmux set status off - silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z - set noshowmode - set noshowcmd - set scrolloff=999 - Limelight - " ... - endfunction - - function! s:goyo_leave() - silent !tmux set status on - silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z - set showmode - set showcmd - set scrolloff=5 - Limelight! - " ... - endfunction - - autocmd! User GoyoEnter nested call <SID>goyo_enter() - autocmd! User GoyoLeave nested call <SID>goyo_leave() -< -More examples can be found here: {Customization}{10} - - {4} https://github.com/bling/vim-airline - {5} https://github.com/Lokaltog/vim-powerline - {6} https://github.com/Lokaltog/powerline - {7} https://github.com/itchyny/lightline.vim - {8} https://github.com/mhinz/vim-signify - {9} https://github.com/airblade/vim-gitgutter - {10} https://github.com/junegunn/goyo.vim/wiki/Customization - - -INSPIRATION *goyo-inspiration* -============================================================================== - - - {LiteDFM}{11} - - {VimRoom}{12} - - {11} https://github.com/bilalq/lite-dfm - {12} http://projects.mikewest.org/vimroom/ - - -PROS. *goyo-pros* -============================================================================== - - 1. Works well with splits. Doesn't mess up with the current window arrangement - 2. Works well with popular statusline plugins - 3. Prevents accessing the empty windows around the central buffer - 4. Can be closed with any of `:q[uit]`, `:clo[se]`, `:tabc[lose]`, or `:Goyo` - 5. Can dynamically change the width of the window - 6. Adjusts its colors when color scheme is changed - 7. Realigns the window when the terminal (or window) is resized or when the size - of the font is changed - 8. Correctly hides colorcolumns and Emojis in statusline - 9. Highly customizable with callbacks - - -LICENSE *goyo-license* -============================================================================== - -MIT - - -============================================================================== -vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: diff --git a/.config/nvim/bundle/goyo.vim/plugin/goyo.vim b/.config/nvim/bundle/goyo.vim/plugin/goyo.vim @@ -1,24 +0,0 @@ -" Copyright (c) 2015 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -command! -nargs=? -bar -bang Goyo call goyo#execute(<bang>0, <q-args>) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -17,12 +17,6 @@ source ~/.config/nvim/autoload/spell.vim execute pathogen#infect() runtime macros/matchit.vim " Match HTML tags - " Goyo {{{ - map <leader>g :Goyo<CR> - let g:goyo_width = 85 - let g:goyo_height = 95 - " }}} - " Polyglot Language Settings {{{ let g:LatexBox_latexmk_preview_continuously = 1 let g:LatexBox_build_dir = 'latex-build' diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -65,9 +65,9 @@ set -g status-position bottom set -g status-bg colour236 set -g status-fg colour3 set -g status-left '' -set -g status-right '#[fg=colour233,bg=colour241,bold] %Y-%m-%d #[fg=colour233,bg=colour245,bold] %H:%M:%S ' +set -g status-right 'Batt: #(tmux-battery.sh) #[fg=colour233,bg=colour241,bold] %Y-%m-%d #[fg=colour233,bg=colour245,bold] %H:%M ' set -g status-right-length 50 set -g status-left-length 20 -set -g status-interval 1 +set -g status-interval 5 # }}} diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DESKTOP_DIR="$HOME/.local/Desktop" +XDG_DOCUMENTS_DIR="$HOME/docs" +XDG_DOWNLOAD_DIR="$HOME/temp" +XDG_MUSIC_DIR="$HOME/media/audio" +XDG_PICTURES_DIR="$HOME/media/pics" +XDG_VIDEOS_DIR="$HOME/media/vids" +XDG_PUBLICSHARE_DIR="$HOME/.local/Public" +XDG_TEMPLATES_DIR="$HOME/.local/Templates" diff --git a/.local/bin/tmux-battery.sh b/.local/bin/tmux-battery.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +acpi | head -1 | awk '{print $4}' | tr -d ',' diff --git a/.profile b/.profile @@ -49,7 +49,7 @@ export HISTFILE="$XDG_CACHE_HOME/bash_history" export LYNX_CFG="$HOME/.config/lynx/lynx.cfg" export LYNX_LSS="$HOME/.config/lynx/lynx.lss" # Removes ~/.gnupg -export GNUPGHOME="/media/jbauer/keys/gpg" +export GNUPGHOME="/run/media/jbauer/keys/gpg" # Removes ~/.inputrc export INPUTRC="$XDG_CONFIG_HOME/inputrc"