dotfiles

:)
git clone https://git.sr.ht/~ashymad/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit bd4ed9bbe106512fe0f1acc2e4825f23281167d6
parent fe51058546f07ff401e456ae7440fa1b1f027c99
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Tue, 17 Mar 2020 22:47:17 +0100

Merge branch 'master' into notwobug

Diffstat:
Mastroid/.config/astroid/get_pass.py | 11++++++-----
Mastroid/.config/astroid/saveto.sh | 2+-
Mcava/.config/cava/config | 8++++----
Afeh/.fehbg | 9+++++++++
Mfish/.config/fish/functions/aur-cleanup.fish | 40+++++++++++++++++++++++-----------------
Afish/.config/fish/functions/aur-vercmp-devel.sh | 27+++++++++++++++++++++++++++
Mfish/.config/fish/functions/aur.fish | 12+++++++-----
Afish/.config/fish/functions/rollback.fish | 14++++++++++++++
Mi3/.i3/config | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
Mnvim/.config/nvim/ginit.vim | 2+-
Mnvim/.config/nvim/init.vim | 110+++++++++++++++++++++++++++----------------------------------------------------
Mpolybar/.config/polybar/config | 3++-
Mpolybar/.config/polybar/launch.sh | 4++--
Arofi/.config/rofi/config | 1+
Mst/.st/config.h | 33+++++++++++++--------------------
15 files changed, 219 insertions(+), 133 deletions(-)

diff --git a/astroid/.config/astroid/get_pass.py b/astroid/.config/astroid/get_pass.py @@ -4,15 +4,16 @@ from os import path import configparser import sys -import kpxcnm from nacl.public import PrivateKey +import kpxcnm -config = configparser.ConfigParser() -config.read(path.expanduser("~/.config/astroid/keys.ini")); +CONFIG = configparser.ConfigParser() +CONFIG.read(path.expanduser("~/.config/astroid/keys.ini")) -k = kpxcnm.Kpxcnm(PrivateKey(kpxcnm.Kpxcnm._from_b64_str(config['DEFAULT']['privkey'])), - config['DEFAULT']['dbid']) +k = kpxcnm.Kpxcnm(PrivateKey(kpxcnm.Kpxcnm._from_b64_str(CONFIG['DEFAULT']['privkey'])), + CONFIG['DEFAULT']['dbid']) k.change_public_keys() if k.test_associate(True): print(k.get_logins(sys.argv[1])[0]['password']) + diff --git a/astroid/.config/astroid/saveto.sh b/astroid/.config/astroid/saveto.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash FILENAME="$(basename "$1" | sed -n 's/-/&\n/;s/.*\n//p')" -DIRECTORY="$(yad --file-selection --directory)" +DIRECTORY="$(yad --file --directory)" if [[ ! -z $DIRECTORY ]]; then cp "$1" "$DIRECTORY/$FILENAME" diff --git a/cava/.config/cava/config b/cava/.config/cava/config @@ -23,7 +23,7 @@ autosens = 1 # Bars' width and space between bars in number of characters. # These options DO NOT apply if you're using 'sdl' or 'x' modes. ; bars = 20 -bar_width = 4 +bar_width = 1 ; bar_spacing = 1 # Lower and higher cutoff frequencies for lowest and highest bars @@ -39,7 +39,7 @@ bar_width = 4 # Bars' width and space between bars in pixels. # Doesn't apply to terminal or serial modes. -bar_width = 31 +; bar_width = 31 ; bar_spacing = 4 # Window width and height @@ -106,10 +106,10 @@ source = auto # 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. # 'sdl' is for a graphical window using OpenGL # 'x' is for a graphical window using XRender (usually faster, unsupported in wayland however) -method = x +method = ncurses # Additionally with Xlib, you can enable OpenGL mode to make full use of your hardware. -opengl = 1 +l opengl = 1 # Visual channels. Can be 'stereo' or 'mono'. # 'stereo' mirrors both channels with low frequencies in center. diff --git a/feh/.fehbg b/feh/.fehbg @@ -0,0 +1,9 @@ +#!/bin/bash +WP=$(find Pictures/Desktopography/2014/ -type f | shuf -n 1) +convert -resize 1920x1080 $WP ~/.i3/BG.png & + +if [[ "$1" == "Sway" ]]; then + swaymsg "output * background $WP fill" +else + feh --no-fehbg --bg-fill $WP +fi diff --git a/fish/.config/fish/functions/aur-cleanup.fish b/fish/.config/fish/functions/aur-cleanup.fish @@ -1,23 +1,29 @@ function aur-cleanup - source ~/.config/fish/utils/pacmsg.fish - msg1 "Cleaning pacman cache..." - sudo pacman -Sc --noconfirm - msg1 "Rebuilding custom repositories..." - for repo in /var/cache/pacman/*custom* - cd $repo + source ~/.config/fish/utils/pacmsg.fish + msg1 "Cleaning pacman cache..." + sudo pacman -Sc --noconfirm + msg1 "Rebuilding custom repositories..." + for repo in /var/cache/pacman/*custom* + cd $repo set reponame (basename $repo) rm $reponame.db* repo-add -n $reponame.db.tar *.pkg.tar.xz - end - sudo pacman -Sy - msg1 "Cleaning aur sync cache..." - cd ~/.cache/aurutils/sync - for dir in * - set pkgname (bash -c "source $dir/PKGBUILD;"'echo $pkgname') - if not pacman -Qi $pkgname >/dev/null 2>/dev/null - echo "Removing $dir..." - rm -rf -- $dir - end - end + end + sudo pacman -Sy + msg1 "Cleaning aur sync cache..." + cd ~/.cache/aurutils/sync + for dir in * + set pkgname (bash -c "source $dir/PKGBUILD;"'echo $pkgname') + if not pacman -Qi $pkgname >/dev/null 2>/dev/null + echo "Removing $dir..." + rm -rf -- $dir + else + set reponame (pacman -Ss '^'(string escape --style=regex $pkgname)'$' | head -1 | sed 's@/.*$@@g') + if not string match -q 'custom*' $reponame + echo "Removing $dir..." + rm -rf -- $dir + end + end + end end diff --git a/fish/.config/fish/functions/aur-vercmp-devel.sh b/fish/.config/fish/functions/aur-vercmp-devel.sh @@ -0,0 +1,27 @@ +#!/bin/bash +XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} +AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/sync} +AURVCS=${AURVCS:-.*-(cvs|svn|git|hg|bzr|darcs)$} + +filter_vcs() { + awk -v "mask=$AURVCS" '$1 ~ mask {print $1}' "$@" +} + +# Note that valid PKGBUILDs cannot contain \n in pkgname. +get_latest_revision() { + grep -Fxf - <(printf '%s\n' *) | xargs -r aur srcver +} + +db_tmp=$(mktemp) +trap 'rm -rf "$db_tmp"' EXIT + +# Retrieve a list of the local repository contents. The repository +# can be specified with the usual aur-repo arguments. +aur repo --list "$@" >"$db_tmp" + +# Find VCS packages that are outdated according to aur-srcver. +# This checks out the latest revision for existing source directories, +# assuming the PKGBUILD has been viewed priorly. +if cd "$AURDEST"; then + aur vercmp -p <(filter_vcs "$db_tmp" | get_latest_revision) <"$db_tmp" +fi diff --git a/fish/.config/fish/functions/aur.fish b/fish/.config/fish/functions/aur.fish @@ -1,9 +1,11 @@ #!/usr/bin/env fish function aur - if test -f "$HOME/.config/fish/functions/aur-$argv[1].fish" - eval "aur-$argv[1]" $argv[2..-1] - else - /usr/bin/aur $argv - end + if test -f "$HOME/.config/fish/functions/aur-$argv[1].fish" + eval "aur-$argv[1]" $argv[2..-1] + else if test -f "$HOME/.config/fish/functions/aur-$argv[1].sh" + bash "$HOME/.config/fish/functions/aur-$argv[1].sh" + else + /usr/bin/aur $argv + end end diff --git a/fish/.config/fish/functions/rollback.fish b/fish/.config/fish/functions/rollback.fish @@ -0,0 +1,14 @@ +function rollback + set Y (date --date "$argv" +%Y) + set m (date --date "$argv" +%m) + set d (date --date "$argv" +%d) + sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bkp + echo "Server=https://archive.archlinux.org/repos/$Y/$m/$d/"'$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist + sudo timedatectl set-ntp false + sudo timedatectl set-time "$Y-$m-$d" + sudo pacman -Syyuu + sudo timedatectl set-ntp true + sudo hwclock --systohc + sudo mv /etc/pacman.d/mirrorlist.bkp /etc/pacman.d/mirrorlist +end + diff --git a/i3/.i3/config b/i3/.i3/config @@ -5,10 +5,79 @@ font pango:Terminus 11px floating_modifier $mod bindsym $mod+Return exec alacritty +bindsym $mod+d exec rofi -modi drun -show drun -bindsym $mod+Shift+q kill +bindsym $mod+Shift+d exec xhost + 192.168.0.227; mode "remote" +mode "remote" { + bindsym $mod+d exec ssh mikulicz@192.168.0.227 env DISPLAY=192.168.0.10:0 rofi -modi drun -show drun + bindsym $mod+Return exec alacritty -e ssh -t mikulicz@192.168.0.227 env DISPLAY=192.168.0.10:0 '$SHELL' -bindsym $mod+d exec rofi -modi drun -show drun + bindsym $mod+Shift+d mode "default" + + bindsym $mod+Shift+q kill + + bindsym $mod+h focus left + bindsym $mod+j focus down + bindsym $mod+k focus up + bindsym $mod+l focus right + + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + bindsym $mod+Shift+h move left + bindsym $mod+Shift+j move down + bindsym $mod+Shift+k move up + bindsym $mod+Shift+l move right + + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right + + bindsym $mod+g split h + + bindsym $mod+v split v + + bindsym $mod+f fullscreen toggle + + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + bindsym $mod+Shift+space floating toggle + + bindsym $mod+space focus mode_toggle + + bindsym $mod+a focus parent + + #bindsym $mod+d focus child + + 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 + + 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 +} + +bindsym $mod+Shift+q kill bindsym $mod+h focus left bindsym $mod+j focus down @@ -166,8 +235,7 @@ for_window [instance="^octave\-gui$"] floating enable for_window [instance="^matplotlib$"] floating enable for_window [instance="^gnuplot_qt$"] floating enable -exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent exec --no-startup-id redshift-gtk -exec --no-startup-id xss-lock -- i3lock -n -i ~/.i3/BG.png +exec --no-startup-id xss-lock -l -- i3lock -n -i ~/.i3/BG.png exec --no-startup-id feh --no-fehbg --bg-fill ~/.i3/BG.png exec_always --no-startup-id ~/.config/polybar/launch.sh diff --git a/nvim/.config/nvim/ginit.vim b/nvim/.config/nvim/ginit.vim @@ -1,5 +1,5 @@ if exists('g:GtkGuiLoaded') call rpcnotify(1, 'Gui', 'Font', 'Fira Code 13') elseif exists('g:GuiLoaded') - Guifont Fira Code:h13 + Guifont Fira Mono:h10 endif diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim @@ -22,13 +22,12 @@ Plug 'Vimjas/vim-python-pep8-indent' Plug 'JuliaEditorSupport/julia-vim' Plug 'lervag/vimtex' +Plug 'PietroPate/vim-tex-conceal' Plug 'rust-lang/rust.vim' Plug 'dag/vim-fish' -Plug 'OmniSharp/omnisharp-vim' - Plug 'jalvesaq/Nvim-R' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } @@ -36,34 +35,17 @@ Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/neosnippet.vim' Plug 'Shougo/neosnippet-snippets' -Plug 'natebosch/vim-lsc' - Plug 'paretje/deoplete-notmuch', {'for': 'mail'} Plug 'tpope/vim-fugitive' Plug 'chaoren/vim-wordmotion' -Plug 'vimwiki/vimwiki', { 'branch': 'dev' } - -call plug#end() +Plug 'neovim/nvim-lsp' -" Deoplete -inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>" -inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>" +Plug 'Shougo/deoplete-lsp' -function! s:check_back_space() abort "{{{ - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction"}}} -imap <silent><expr> <TAB> - \ pumvisible() ? "\<C-n>" : - \ <SID>check_back_space() ? "\<TAB>" : - \ neosnippet#expandable_or_jumpable() ? - \ "\<Plug>(neosnippet_expand_or_jump)" : - \ deoplete#manual_complete() - -let g:deoplete#enable_at_startup = 1 +call plug#end() " Neosnipet " Note: It must be "imap" and "smap". It uses <Plug> mappings. @@ -73,7 +55,8 @@ xmap <C-j> <Plug>(neosnippet_expand_target) " For conceal markers. if has('conceal') - set conceallevel=2 concealcursor=niv + set conceallevel=2 + let g:tex_conceal="abdgms" endif " lightline @@ -84,63 +67,42 @@ let g:lightline = { " vimtex let g:vimtex_view_method = 'zathura' let g:vimtex_compiler_progname = 'nvr' +let g:vimtex_quickfix_enabled = 0 -if !exists('g:deoplete#omni#input_patterns') - let g:deoplete#omni#input_patterns = {} -endif -let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete - -" eclim -let g:EclimCompletionMethod = 'omnifunc' -let g:deoplete#omni#input_patterns.java = '[^. *\t]\.\w*' +" nvim-lsp +lua require'nvim_lsp'.rust_analyzer.setup{} +lua require'nvim_lsp'.texlab.setup{} - -" Nvim-R -call deoplete#custom#option('omni_patterns', { - \ 'r': ['[^. *\t]\.\w*', '\h\w*::\w*', '\h\w*\$\w*'], - \}) - -" let R_latexcmd = ['latexmk','-pdf','-pdflatex="lualatex -synctex=1 -interaction=nonstopmode"'] - -" OmniSharp -call deoplete#custom#option('sources', { - \ 'cs': ['omnisharp'], - \ }) +autocmd Filetype rust setlocal omnifunc=v:lua.vim.lsp.omnifunc "NERDTree map <C-k> :NERDTreeToggle<CR> -" vim-lsc - -let g:lsc_server_commands = { - \ 'javascript': ['javascript-typescript-stdio'], - \ 'javascript.jsx': ['javascript-typescript-stdio'], - \ 'python': ['pyls'], - \ 'julia': ['julia', '--startup-file=no', '--history-file=no', '-e', ' - \ using LanguageServer; - \ using Pkg; - \ import StaticLint; - \ import SymbolServer; - \ env_path = dirname(Pkg.Types.Context().env.project_file); - \ debug = false; - \ - \ server = LanguageServer.LanguageServerInstance(stdin, stdout, debug, env_path, "", Dict()); - \ server.runlinter = true; - \ run(server); - \ '], - \ 'c': ['ccls', '--log-file=/tmp/cc.log'], - \ 'cpp': ['ccls', '--log-file=/tmp/cc.log'], - \ 'cuda': ['ccls', '--log-file=/tmp/cc.log'], - \ 'objc': ['ccls', '--log-file=/tmp/cc.log'], - \ 'rust': ['rls'], - \ } +" Deoplete +inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>" +inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>" + +function! s:check_back_space() abort "{{{ + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction"}}} +imap <silent><expr> <TAB> + \ pumvisible() ? "\<C-n>" : + \ <SID>check_back_space() ? "\<TAB>" : + \ neosnippet#expandable_or_jumpable() ? + \ "\<Plug>(neosnippet_expand_or_jump)" : + \ deoplete#manual_complete() -let g:lsc_auto_map = v:true -autocmd CompleteDone * silent! pclose +call deoplete#custom#option('omni_patterns', { + \ 'tex': g:vimtex#re#deoplete, + \ 'r': ['[^. *\t]\.\w*', '\h\w*::\w*', '\h\w*\$\w*'], + \}) + +call deoplete#custom#option('sources', { + \ 'notmuch': ['notmuch', 'address', '--format=json', '--deduplicate=address', '*'], + \}) -" vimwiki -" Workaround for https://github.com/lervag/vimtex/issues/1354 -let g:vimtex_syntax_enabled = 1 +let g:deoplete#enable_at_startup = 1 " vim settings @@ -179,5 +141,7 @@ function SetTeXOptions() setlocal sw=2 setlocal textwidth=79 setlocal iskeyword+=: - setlocal spell! spelllang=pl + setlocal spell! spelllang=en endfunction + +autocmd BufNewFile,BufRead *.none set filetype=mail diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config @@ -20,6 +20,7 @@ alert = #bd2c40 [bar/example] ;monitor = HDMI-0 +;monitor = ${env:MONITOR:fallback-value} width = 100% height = 20 ;offset-x = 1% @@ -45,7 +46,7 @@ module-margin-right = 2 font-0 = fixed:pixelsize=10;1 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = "Wuncon Siji:pixelsize=10;1" +font-2 = "Siji:pixelsize=10;1" modules-left = i3 modules-center = cmus diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh @@ -1,3 +1,4 @@ #!/bin/sh killall polybar -polybar example -\ No newline at end of file +#env MONITOR=$(polybar -m|head -1|sed -e 's/:.*$//g') +polybar example diff --git a/rofi/.config/rofi/config b/rofi/.config/rofi/config @@ -0,0 +1 @@ +rofi.theme: /usr/share/rofi/themes/glue_pro_blue.rasi diff --git a/st/.st/config.h b/st/.st/config.h @@ -151,19 +151,23 @@ static unsigned int mousebg = 0; static unsigned int defaultattr = 11; /* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; + +/* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_NO_MOD, "\031" }, - { Button5, XK_NO_MOD, "\005" }, -}; - -MouseKey mkeys[] = { - /* button mask function argument */ - { Button4, XK_NO_MOD, kscrollup, {.i = 5} }, - { Button5, XK_NO_MOD, kscrolldown, {.i = 5} }, + /* mask button function argument release */ + { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 }, + { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ @@ -203,10 +207,6 @@ static Shortcut shortcuts[] = { * * 0: no value * * > 0: cursor application mode enabled * * < 0: cursor application mode disabled - * crlf value - * * 0: no value - * * > 0: crlf mode is enabled - * * < 0: crlf mode is disabled * * Be careful with the order of the definitions because st searches in * this table sequentially, so any XK_ANY_MOD must be in the last @@ -226,13 +226,6 @@ static KeySym mappedkeys[] = { -1 }; static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; /* - * Override mouse-select while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forceselmod = ShiftMask; - -/* * This is the huge key array which defines all compatibility to the Linux * world. Please decide about changes wisely. */