diff options
-rw-r--r-- | .config/BetterDiscord/data/stable/settings.json | 4 | ||||
-rw-r--r-- | .config/clangd/config.yaml | 9 | ||||
-rw-r--r-- | .config/coc/extensions/package.json | 2 | ||||
-rw-r--r-- | .config/fcitx5/conf/imselector.conf | 8 | ||||
l---------[-rw-r--r--] | .config/fzmp/conf | 4 | ||||
-rw-r--r-- | .config/mpcplus/fzmp.conf | 3 | ||||
-rw-r--r-- | .config/nvim/init.vim | 29 | ||||
-rwxr-xr-x | .local/share/bin/nginx-dev | 4 | ||||
-rwxr-xr-x | .local/share/bin/preview | 4 | ||||
-rwxr-xr-x | .local/share/bin/set-default | 32 | ||||
-rwxr-xr-x | .local/share/mode/switch.d/vim | 2 | ||||
-rwxr-xr-x | .local/share/pass-extensions/duplicates.bash | 13 | ||||
-rwxr-xr-x | .local/share/pass-extensions/g.bash | 2 |
13 files changed, 94 insertions, 22 deletions
diff --git a/.config/BetterDiscord/data/stable/settings.json b/.config/BetterDiscord/data/stable/settings.json index e50172b..eb9ab27 100644 --- a/.config/BetterDiscord/data/stable/settings.json +++ b/.config/BetterDiscord/data/stable/settings.json @@ -8,7 +8,9 @@ }, "addons": { "addonErrors": true, - "editAction": "detached" + "editAction": "detached", + "checkForUpdates": true, + "updateInterval": 4 }, "store": { "bdAddonStore": true, diff --git a/.config/clangd/config.yaml b/.config/clangd/config.yaml new file mode 100644 index 0000000..f4fa3e0 --- /dev/null +++ b/.config/clangd/config.yaml @@ -0,0 +1,9 @@ +CompileFlags: + Add: + # ignore unknown (gcc) compiler flags + - -Wno-unknown-warning-option + - -Wno-gnu-folding-constant + Remove: + - -m* + - -f* + diff --git a/.config/coc/extensions/package.json b/.config/coc/extensions/package.json index 457c31b..d540984 100644 --- a/.config/coc/extensions/package.json +++ b/.config/coc/extensions/package.json @@ -17,5 +17,5 @@ }, "disabled": [], "locked": [], - "lastUpdate": 1738787299688 + "lastUpdate": 1743837108306 }
\ No newline at end of file diff --git a/.config/fcitx5/conf/imselector.conf b/.config/fcitx5/conf/imselector.conf index 1f2ef16..de02872 100644 --- a/.config/fcitx5/conf/imselector.conf +++ b/.config/fcitx5/conf/imselector.conf @@ -1,11 +1,13 @@ +# 現在の入力コンテキストのみのトリガーキー TriggerKeyLocal= +# 現在の入力コンテキストのみをN番目の入力メソッドに切り替えるホットキー SwitchKeyLocal= [TriggerKey] 0=Super+Z [SwitchKey] -0=Launch5 # f14 -> us -1=Launch6 # f15 -> us-intl -2=Launch7 # f16 -> ja +0=Launch5 +1=Launch6 +2=Launch7 diff --git a/.config/fzmp/conf b/.config/fzmp/conf index 22439c3..a51f36d 100644..120000 --- a/.config/fzmp/conf +++ b/.config/fzmp/conf @@ -1,3 +1 @@ -default_view songs -full_song_format [[[%artist% - %album% / ][%title%]]|%file%] -fzf_options --ignore-case +../mpcplus/fzmp.conf
\ No newline at end of file diff --git a/.config/mpcplus/fzmp.conf b/.config/mpcplus/fzmp.conf new file mode 100644 index 0000000..22439c3 --- /dev/null +++ b/.config/mpcplus/fzmp.conf @@ -0,0 +1,3 @@ +default_view songs +full_song_format [[[%artist% - %album% / ][%title%]]|%file%] +fzf_options --ignore-case diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index dac1f01..d702226 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -19,6 +19,7 @@ set linebreak " set wrap but don't wrap inside words set viminfo+='1000,n~/.local/nvim/viminfo set guifont=JetBrainsMono\ Nerd\ Font:h9:#e-subpixelantialias:#h-slight set linespace=5 +set tabpagemax=999 let g:sneak#label = 1 let g:which_key_map = {} let g:airline_powerline_fonts = 1 @@ -26,6 +27,7 @@ let g:minimap_highlight='Visual' let g:python3_host_prog='/usr/bin/python3' let g:vimtex_quickfix_open_on_warning = 0 let g:vimtex_imaps_enabled = 0 +let g:DiffColors = 0 if exists("g:neovide") nmap <silent> <C-=> :lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR> @@ -63,6 +65,7 @@ Plug 'wellle/targets.vim' Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } Plug 'dkarter/bullets.vim' Plug 'editorconfig/editorconfig-vim' +Plug 'rickhowe/diffunitsyntax' " language plugins Plug 'lervag/vimtex' @@ -88,16 +91,17 @@ Plug 'arzg/vim-colors-xcode' Plug 'romgrk/github-light.vim' Plug 'vv9k/vim-github-dark' Plug 'rose-pine/neovim' + +Plug '~/.config/nvim/local/coc-markdown-links' call plug#end() " keybinds tnoremap <Esc> <C-\><C-n> nnoremap tt :tabnew<CR> - -nmap <CR> o<Esc> -nmap <leader>qf <Plug>(coc-fix-current) - +nnoremap <CR> o<Esc> +nnoremap <leader>qf <Plug>(coc-fix-current) +nnoremap <silent> * yiw:let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR> nnoremap <silent> <A-j> :m +1<CR> nnoremap <silent> <A-k> :m -2<CR> @@ -187,10 +191,20 @@ let g:which_key_map['.'] = { map <silent> <leader>u :UndotreeToggle<cr> let g:which_key_map.u = 'toggle undo tree' +nnoremap <silent> <leader>e 0f!xC<c-r>=system(@-)<cr><esc>dd +let g:which_key_map.e = 'read and execute after !' + " cmd maps cnoreabbrev W w cnoreabbrev sudow w !sudo tee % +" emacs bindings in vim command-line +cnoremap <A-b> <S-Left> +cnoremap <A-f> <S-Right> +cnoremap <C-a> <Home> +cnoremap <C-e> <End> +cnoremap <A-backspace> <C-w> + " hexokinase let g:Hexokinase_termDisabled = 1 let g:Hexokinase_optOutPatterns = [ 'colour_names' ] @@ -348,6 +362,13 @@ augroup Binary au BufWritePost *.bin set noeol augroup END +" highlight Zephyr .overlay files as devicetree source (dts) +augroup devicetree_ft + au! + au BufRead,BufNewFile *.overlay set syntax=dts + au BufRead,BufNewFile *.dtsi set syntax=dts +augroup END + " sneak let g:sneak#use_ic_scs = 0 diff --git a/.local/share/bin/nginx-dev b/.local/share/bin/nginx-dev index 10987fd..40e73ad 100755 --- a/.local/share/bin/nginx-dev +++ b/.local/share/bin/nginx-dev @@ -4,6 +4,8 @@ port=8080 try_files='/$uri /$uri.html /$uri/index.html =404' access_log='/dev/stdout' cache_control=' + proxy_store off; + proxy_cache off; add_header Last-Modified $date_gmt; add_header Cache-Control "private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; if_modified_since off; @@ -35,7 +37,7 @@ while getopts hvp:Ct:qx OPT; do p) port="$OPTARG" ;; t) try_files="$OPTARG" ;; v) print_config=1 ;; - C) cache_control="" ;; + C) cache_control='' ;; q) access_log="/dev/null" ;; x) open_browser=1 ;; \?|*) usage 1 ;; diff --git a/.local/share/bin/preview b/.local/share/bin/preview index 2fe9c4d..141d03c 100755 --- a/.local/share/bin/preview +++ b/.local/share/bin/preview @@ -12,6 +12,7 @@ MIMETYPE="$(file --mime-type -Lb "$FILE")" EXT="${FILE#*.}" [ "$EXT" = "md" ] && [ "$MIMETYPE" = "text/plain" ] && MIMETYPE="application/markdown" +[ "$MIMETYPE" = "application/javascript" ] && MIMETYPE="text/javascript" render_manpage() { exec groff -T utf8 -m man -rcR=1 -rIN=0 -rLL="${WIDTH}n" << EOF @@ -49,6 +50,9 @@ case "$MIMETYPE" in application/markdown) pandoc --from=gfm --to=man "$FILE" | render_manpage ;; + application/json) + jq --color-output . "$FILE" + ;; *) echo "$MIMETYPE" file -b "$FILE" | fold --width="$WIDTH" --spaces diff --git a/.local/share/bin/set-default b/.local/share/bin/set-default new file mode 100755 index 0000000..d93f65c --- /dev/null +++ b/.local/share/bin/set-default @@ -0,0 +1,32 @@ +#!/bin/sh +SCRIPT_NAME="$(basename "$0")" + +usage() { + code=0 + if [ -z "$1" ] ; then + cat << EOF +Set desktop entry ENTRY as default application for opening files with the same +type as FILE + +EOF + else + echo "error: $1" >&2 + code=1 + fi + cat << EOF +usage: + $SCRIPT_NAME ENTRY FILE [FILE] +EOF + exit $code +} + +[ $# -eq 0 ] && usage +DESKTOP_ENTRY="$1"; shift +[ -z "$DESKTOP_ENTRY" ] && usage "no desktop entry" +[ $# -lt 1 ] && usage "no reference file(s)" + +for file in "$@" ; do + mimetype="$(xdg-mime query filetype "$file")" + xdg-mime default "$DESKTOP_ENTRY" "$mimetype" +done + diff --git a/.local/share/mode/switch.d/vim b/.local/share/mode/switch.d/vim index 7c2bbf6..cb5a651 100755 --- a/.local/share/mode/switch.d/vim +++ b/.local/share/mode/switch.d/vim @@ -13,7 +13,7 @@ let s:test = [ '#ff00ff', 'NONE' ] let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} let s:p.normal.left = [ [ s:fg, s:mode ], [ s:faint, s:bg ] ] let s:p.normal.right = [ [ s:faint, s:bg ] ] -let s:p.normal.middle = [ [ s:none, s:none ] ] +let s:p.normal.middle = [ [ s:bg, s:bg ] ] let s:p.normal.error = [ [ s:test, s:test ] ] let s:p.normal.warning = [ [ s:test, s:test ] ] let s:p.inactive.left = copy(s:p.normal.left) diff --git a/.local/share/pass-extensions/duplicates.bash b/.local/share/pass-extensions/duplicates.bash index cb1cbbc..3ba47aa 100755 --- a/.local/share/pass-extensions/duplicates.bash +++ b/.local/share/pass-extensions/duplicates.bash @@ -5,21 +5,18 @@ pass_names="$(pass names -l)" [ $? -ne 0 ] && exit 1 pass_count="$(echo "$pass_names" | wc -l)" -if [ "$pass_count" -gt 10 ] ; then - cat << EOF >&2 -pass-duplicates needs to decrypt all your passwords one-by-one to cross-match -them. This is all done in-memory, and nothing is saved to disk. You appear to -have $pass_count passwords, so this may take some time... - -EOF -fi +pass_index=1 while read pass_name ; do hash="$(pass show "$pass_name" | head -n1 | sha1sum | cut -c1-40)" dupe_map["$pass_name"]="$hash" dupe_tally["$hash"]=$(( ${dupe_tally["$hash"]} + 1 )) + + printf '\rhashing... (%d/%d)' "$pass_index" "$pass_count" >&2 + pass_index=$(( $pass_index + 1 )) done < <(echo "$pass_names") +printf '\r\e[2K' >&2 unique_duplicates=0 total_shared=0 diff --git a/.local/share/pass-extensions/g.bash b/.local/share/pass-extensions/g.bash new file mode 100755 index 0000000..4ab3ace --- /dev/null +++ b/.local/share/pass-extensions/g.bash @@ -0,0 +1,2 @@ +#!/bin/bash +exec pass git "$@" |