diff --git a/.config/coc/extensions/package.json b/.config/coc/extensions/package.json index 0146e3c6..df0716ea 100755 --- a/.config/coc/extensions/package.json +++ b/.config/coc/extensions/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "coc-css": ">=1.2.4", "coc-git": ">=1.7.13", "coc-go": ">=0.7.0", "coc-java": ">=1.4.11", diff --git a/.gitconfig b/.gitconfig index d5ad66bf..85000293 100644 --- a/.gitconfig +++ b/.gitconfig @@ -6,8 +6,9 @@ [core] ;editor = vim excludesfile = /home/operator/.gitignore_global + attributesfile = ~/.gitattributes [color] - ui = auto + ui = true [pager] diff = diff-so-fancy | less --tabs=4 -RFX show = diff-so-fancy | less --tabs=4 -RFX @@ -43,3 +44,19 @@ insteadOf = https://bitbucket.org/ [http] cookiefile = /home/operator/.gitcookies +[color "diff-highlight"] + oldNormal = red bold + oldHighlight = white bold 52 + newNormal = green bold + newHighlight = red bold 22 +[color "diff"] + meta = 11 + frag = magenta bold + commit = yellow bold + old = red bold + new = white bold 22 + whitespace = red reverse +[alias] + diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f" +[diff "image"] + command = /home/operator/dotfiles/git-diff-image/git_diff_image diff --git a/.gitmodules b/.gitmodules index 16ec57d1..72ac71c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,3 +3,6 @@ url = git@github.com:reconquest/rex branch = master ignore = all +[submodule "git-diff-image"] + path = git-diff-image + url = https://github.com/ewanmellor/git-diff-image diff --git a/.xbindkeysrc b/.xbindkeysrc index 5383f91c..5c08e422 100755 --- a/.xbindkeysrc +++ b/.xbindkeysrc @@ -1,8 +1,11 @@ "REPO=~/reconquest/secrets carcosa-new-password" Mod3 + 6 -"carcosa-new-password" - Mod3 + 5 +"baton-volume down 5" + Mod3 + j + +"baton-volume up 5" + Mod3 + k "music pause" Mod3 + p @@ -13,10 +16,10 @@ "music prev" Mod3 + h -"music like" +"music save" Mod3 + m -"music dislike" +"music remove" Mod3 + n "music status" @@ -25,5 +28,5 @@ "with-lock kuake-bottom" Mod3 + t -"screen-lock" +"xsecurelock" Mod3 + g diff --git a/bin/music b/bin/music index e65d1ac9..87310709 100755 --- a/bin/music +++ b/bin/music @@ -1,93 +1,40 @@ #!/bin/bash -get_status() { - for window in $(windows); do - title=$(xdotool getwindowname $window) - echo 🎵 $title - done +get-status() { + status=$(baton status) + artist=$(grep -P "^Artist:" <<< "$status" | cut -d: -f2-) + track=$(grep -P "^Track" <<< "$status" | cut -d: -f2-) + echo 🎵 $artist — $track } -_get_windows() { - for window in $(xdotool search --class youtube-music-desktop-app); do - title=$(xdotool getwindowname $window) - if [[ "$title" == "youtube-music-desktop-app" ]]; then - continue - fi - - echo $window - done -} - -windows() { - if [[ ! "$_windows" ]]; then - _windows=$(_get_windows) - fi - echo "$_windows" -} - -send() { - local key=$1 - active=$(xdotool getactivewindow) - for window in $(windows); do - xdotool windowactivate --sync $window - xdotool key --clearmodifiers --window $window $key - done - xdotool windowactivate $active -} - -status=$(get_status) - icon="" case "$1" in -next) - icon="⏭️" - send j - ;; - -prev) - icon="⏮️" - send k - ;; + next) + icon="⏭️" + ;; -pause) - icon="⏯️" - send space - ;; + prev) + icon="⏮️" + ;; -like) - icon="⭐" - send plus - ;; + pause) + icon="⏯️" + ;; -dislike) - icon="⭐" - send underscore - ;; + save) + icon="⭐" + ;; -*) - icon="${1}" - ;; + *) + icon="${1}" + ;; esac if [[ "$1" == "status" ]]; then - notify-replace music "" "$status" + notify music "" "$(get-status)" exit fi -i=0 -while :; do - i=$((i + 1)) - if [[ "$i" == "10" ]]; then - break - fi - - new_status=$(get_status) - if [[ "$status" != "$new_status" ]]; then - status="$new_status" - break - fi - sleep 0.1 -done - notify-replace music "" "${icon}" -notify-replace music "" "$status" +baton "${@}" +notify-replace music "" "$(get-status)" diff --git a/bin/wrap b/bin/wrap new file mode 120000 index 00000000..5eaaa54d --- /dev/null +++ b/bin/wrap @@ -0,0 +1 @@ +/home/operator/sources/gitlab.com/reconquest/wrap/wrap \ No newline at end of file diff --git a/git-diff-image b/git-diff-image new file mode 160000 index 00000000..dee6a1de --- /dev/null +++ b/git-diff-image @@ -0,0 +1 @@ +Subproject commit dee6a1def150432caa28dc8a06450b637f95f6e1 diff --git a/vim.d/01-plugins.vim b/vim.d/01-plugins.vim index 80c9c36c..5d41e0d3 100644 --- a/vim.d/01-plugins.vim +++ b/vim.d/01-plugins.vim @@ -91,6 +91,8 @@ Plug 'ddrscott/vim-side-search' Plug 'matze/vim-move' Plug 'kovetskiy/neovim-move', { 'do' : ':UpdateRemotePlugins' } +Plug 'rhysd/vim-grammarous' + if $BACKGROUND == "dark" Plug 'reconquest/vim-colorscheme' func! _setup_colorscheme() @@ -126,4 +128,5 @@ if $BACKGROUND == "light" endfunc! endif + call plug#end() diff --git a/vim.d/41-lexical.vim b/vim.d/41-lexical.vim index f53c2533..be1ffec7 100644 --- a/vim.d/41-lexical.vim +++ b/vim.d/41-lexical.vim @@ -1,37 +1,6 @@ -augroup lexical - autocmd! - "autocmd FileType markdown,md call _lexical_init() -augroup END - -if empty(glob('~/.vim/thesaurus/mthesaur.txt')) - silent !mkdir -p ~/.vim/thesaurus/ - silent !curl -fLo ~/.vim/thesaurus/mthesaur.txt - \ https://raw.githubusercontent.com/zeke/moby/master/words.txt - autocmd VimEnter * PlugInstall -endif - -func! _lexical_init() - if expand('%:p') =~ 'coc:' - return - endif - - call lexical#init() - let b:_lexical = '1' -endfunc! - -func! _lexical_toggle() - if !exists('b:_lexical') || b:_lexical == '0' - :call _lexical_init() - else - setlocal spelllang= - setlocal spellfile= - setlocal nospell - setlocal thesaurus= - setlocal dictionary= - let b:_lexical = '0' - endif -endfunc! - -let g:lexical#spell_key = 's' - -nmap el :call _lexical_toggle() +nmap gn (grammarous-move-to-next-error) +nmap gp (grammarous-move-to-previous-error) +nmap gf (grammarous-fixit) +nmap go (grammarous-open-info-window) +nmap gc (grammarous-close-info-window) +nmap gg :GrammarousCheck --preview diff --git a/vim.d/45-visual-multi.vim b/vim.d/45-visual-multi.vim index bbfd0f1c..e018e3d8 100644 --- a/vim.d/45-visual-multi.vim +++ b/vim.d/45-visual-multi.vim @@ -2,7 +2,8 @@ let g:VM_custom_remaps = {'': '[', '': 'q'} let g:VM_no_meta_mappings = 1 let g:VM_maps = { \ 'Select All': '', -\ } + \ "Add Cursor At Pos": '' + \ } let g:VM_leader = "\\"