diff options
90 files changed, 708 insertions, 192 deletions
diff --git a/.config/BetterDiscord/data/stable/themes.json b/.config/BetterDiscord/data/stable/themes.json index 3afcd03..419725e 100644 --- a/.config/BetterDiscord/data/stable/themes.json +++ b/.config/BetterDiscord/data/stable/themes.json @@ -1,5 +1,5 @@ { "Horizontal Server List": true, - "flat": true, - "mode": true + "flat": false, + "mode": false }
\ No newline at end of file diff --git a/.config/BetterDiscord/themes/HorizontalServerList.theme.css b/.config/BetterDiscord/themes/HorizontalServerList.theme.css deleted file mode 100644 index 5b82210..0000000 --- a/.config/BetterDiscord/themes/HorizontalServerList.theme.css +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @name Horizontal Server List - * @author Gibbu#1211 - * @version 2.1.0 - * @invite ZHthyCw - * @description Moves the server list from the left to the top of Discord. Compatible with Server Folders and most basic transparent themes - * @source https://github.com/DiscordStyles/HorizontalServerList - * @website https://www.gibbu.me -*/ - -@import url("https://discordstyles.github.io/HorizontalServerList/dist/HorizontalServerList.css"); - -/* Bottom HorizontalServerList. Simply remove the comments surrounding the @import to enable it. */ -/* @import url("https://discordstyles.github.io/Addons/bottomhsl.css"); */ - -:root { - --HSL-server-icon-size: 40px; /* Size of the server icons | DEFAULT: 40px */ - --HSL-server-spacing: 10px; /* Spacing between each server icon | DEFAULT: 10px */ - --HSL-server-direction: column; /* Direct of the server list. | Options: column, column-reverse | DEFAULT: column */ -} diff --git a/.config/coc/extensions/package.json b/.config/coc/extensions/package.json index d540984..fc6acf7 100644 --- a/.config/coc/extensions/package.json +++ b/.config/coc/extensions/package.json @@ -4,18 +4,18 @@ "coc-emmet": ">=1.1.6", "coc-go": ">=1.3.35", "coc-html": ">=1.8.0", - "coc-java": ">=1.15.2", - "coc-json": ">=1.9.2", - "coc-python": ">=1.2.13", - "coc-rust-analyzer": ">=0.80.2", - "coc-tsserver": ">=2.2.0", + "coc-java": ">=1.26.1", + "coc-json": ">=1.9.3", + "coc-rust-analyzer": ">=0.85.0", + "coc-tsserver": ">=2.3.1", "coc-vimtex": ">=1.1.5", "coc-lua": ">=2.0.6", "coc-deno": ">=3.15.0", "coc-sh": ">=1.2.4", - "coc-solargraph": ">=1.2.4" + "coc-solargraph": ">=1.2.4", + "coc-pyright": ">=1.1.405" }, "disabled": [], "locked": [], - "lastUpdate": 1743837108306 + "lastUpdate": 1756725613973 }
\ No newline at end of file diff --git a/.config/fcitx5/conf/clipboard.conf b/.config/fcitx5/conf/clipboard.conf new file mode 100644 index 0000000..6a38473 --- /dev/null +++ b/.config/fcitx5/conf/clipboard.conf @@ -0,0 +1,8 @@ +# Paste Primary +PastePrimaryKey= +# Number of entries +Number of entries=30 + +[TriggerKey] +0=Control+semicolon + diff --git a/.config/fcitx5/conf/quickphrase.conf b/.config/fcitx5/conf/quickphrase.conf new file mode 100644 index 0000000..9e49067 --- /dev/null +++ b/.config/fcitx5/conf/quickphrase.conf @@ -0,0 +1,10 @@ +# キーモディファイアーを選択 +Choose Modifier=None +# スペルチェックを有効にする +Spell=True +# フォールバック時のスペルチェック言語 +FallbackSpellLanguage=en + +[TriggerKey] +0=Super+semicolon + diff --git a/.config/fcitx5/conf/xcb.conf b/.config/fcitx5/conf/xcb.conf new file mode 100644 index 0000000..642bc03 --- /dev/null +++ b/.config/fcitx5/conf/xcb.conf @@ -0,0 +1,5 @@ +# Allow Overriding System XKB Settings +Allow Overriding System XKB Settings=True +# Always set layout to be only group layout +AlwaysSetToGroupLayout=True + diff --git a/.config/fcitx5/conf/xim.conf b/.config/fcitx5/conf/xim.conf new file mode 100644 index 0000000..57abf4b --- /dev/null +++ b/.config/fcitx5/conf/xim.conf @@ -0,0 +1,3 @@ +# XIM で On The Spot スタイルを使う(再起動が必要) +UseOnTheSpot=True + diff --git a/.config/fcitx5/config b/.config/fcitx5/config index 3ae8195..12e7a48 100644 --- a/.config/fcitx5/config +++ b/.config/fcitx5/config @@ -25,6 +25,8 @@ PrevPage= NextPage= # 埋め込みプリエディットの切り替え TogglePreedit= +# 修飾キーのショートカットをトリガーするための時間制限(ミリ秒) +ModifierOnlyKeyTimeout=250 [Hotkey/PrevCandidate] 0=Shift+Tab diff --git a/.config/firefox/chrome/userChrome.css b/.config/firefox/chrome/userChrome.css index 233a1ba..330b18e 100644 --- a/.config/firefox/chrome/userChrome.css +++ b/.config/firefox/chrome/userChrome.css @@ -3,7 +3,10 @@ #appMenu-fxa-status2, #appMenu-fxa-separator, #fullscreen-warning, -.findbar-highlight +.findbar-highlight, +#urlbar-searchmode-switcher, +#translations-button, +#reader-mode-button { display: none !important; } /* undo shit */ @@ -13,9 +16,12 @@ /* make shit compact */ body { font-size: 10pt; } -.tab-background { - min-height: unset !important; - margin-block: 0 !important; +.tab-background { margin-block: 0 !important; } +#TabsToolbar { --toolbarbutton-inner-padding: 8px; } +:root { --tab-min-height: 24px !important; } +.tab-label-container { + height: unset !important; + margin-right: var(--toolbarbutton-inner-padding); } .tabbrowser-tab @@ -29,3 +35,5 @@ body { font-size: 10pt; } #navigator-toolbox { border: none !important; } +#urlbar-input +{ padding: 0px 8px !important; } diff --git a/.config/firefox/user.js b/.config/firefox/user.js index 778631e..a18c1e9 100644 --- a/.config/firefox/user.js +++ b/.config/firefox/user.js @@ -2,9 +2,18 @@ user_pref("browser.toolbars.bookmarks.visibility", "never"); user_pref("browser.quitShortcut.disabled", true); user_pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false); -user_pref("intl.regional_prefs.use_os_locales", true); user_pref("layout.spellcheckDefault", 0); +user_pref("findbar.highlightAll", true); + +// i know what i'm doing user_pref("browser.safebrowsing.downloads.enabled", false); +user_pref("browser.safebrowsing.malware.enabled", false); +user_pref("browser.safebrowsing.phishing.enabled", false); + +// i18n +user_pref("intl.regional_prefs.use_os_locales", true); +user_pref("layout.spellcheckDefault", 0); +user_pref("browser.translations.automaticallyPopup", false); // privacy user_pref("signon.rememberSignons", false); @@ -31,3 +40,21 @@ user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); user_pref("devtools.chrome.enabled", true); user_pref("devtools.debugger.remote-enabled", true); +// no first time ux +user_pref("trailhead.firstrun.didSeeAboutWelcome", true); +user_pref("app.normandy.first_run", false); +user_pref("browser.aboutConfig.showWarning", false); +user_pref("browser.aboutwelcome.didSeeFinalScreen", true); +user_pref("browser.bookmarks.addedImportButton", true); +user_pref("browser.bookmarks.restore_default_bookmarks", false); + +// no new tab page +user_pref("browser.newtabpage.enabled", false); +user_pref("browser.startup.homepage", "chrome://browser/content/blanktab.html"); + +// fonts +user_pref("font.default.x-western", "sans-serif"); +user_pref("font.name.monospace.x-western", "monospace"); +user_pref("font.name.sans-serif.x-western", "sans-serif"); +user_pref("font.name.serif.x-western", "serif"); + diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index b3897e9..955c797 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -12,7 +12,7 @@ </alias> <alias binding="strong"> <family>monospace</family> - <prefer><family>JetBrainsMono Nerd Font</family></prefer> + <prefer><family>JetBrains Mono</family></prefer> </alias> <alias binding="strong"> <family>system-ui</family> diff --git a/.config/gdb/gdbinit b/.config/gdb/gdbinit index 7e59573..919b13a 100644 --- a/.config/gdb/gdbinit +++ b/.config/gdb/gdbinit @@ -1,2 +1,9 @@ -set disassembly-flavor intel -set debuginfod enabled off +python +import sys, os +sys.path.append(os.path.join(os.environ["XDG_CONFIG_HOME"], "gdb")) +import gdbinit +end + +alias mk = !mk +alias reset = monitor reset + diff --git a/.config/gdb/gdbinit.py b/.config/gdb/gdbinit.py new file mode 100644 index 0000000..a6ebfea --- /dev/null +++ b/.config/gdb/gdbinit.py @@ -0,0 +1,14 @@ +import gdb + +def try_execute(*args): + try: + gdb.execute(*args) + except gdb.error: + pass + +# x86 only +try_execute("set disassembly-flavor intel") + +gdb.execute("set debuginfod enabled off") +gdb.execute("set confirm off") + diff --git a/.config/git/config##template b/.config/git/config##template index edae109..0a3418a 100644 --- a/.config/git/config##template +++ b/.config/git/config##template @@ -33,3 +33,11 @@ l = log d = diff cloc = !git ls-files -z | xargs -0 cloc + conflict = !git diff --name-only --diff-filter=U --relative + ec = !git conflict -z | xargs -0 -- $EDITOR + ours = !git conflict -z | xargs -0 -- git checkout --ours + theirs = !git conflict -z | xargs -0 -- git checkout --theirs +[pager] + log = diff-highlight | less + show = diff-highlight | less + diff = diff-highlight | less diff --git a/.config/gtk-4.0/env b/.config/gtk-4.0/env index 42b34f5..2eac735 100644 --- a/.config/gtk-4.0/env +++ b/.config/gtk-4.0/env @@ -1,5 +1,6 @@ #!/bin/sh export GTK_THEME="adw-gtk3" -. "$XDG_CACHE_HOME/mode/state/theme" +mode_state="$XDG_CACHE_HOME/mode/state/theme" +[ -e "$mode_state" ] && . "$mode_state" [ "$mode" = "dark" ] && GTK_THEME="$GTK_THEME:dark" export GTK_THEME diff --git a/.config/i3/autostart##template b/.config/i3/autostart index 3c61922..70b7616 100755 --- a/.config/i3/autostart##template +++ b/.config/i3/autostart @@ -1,7 +1,7 @@ #!/bin/sh . "$HOME/.profile" xrdb -override < "$XDG_CONFIG_HOME/X11/base" -mode --no-reload restore +mode --no-reload --no-cfggen restore /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & polybar & @@ -11,13 +11,13 @@ dunst & autocutsel -selection CLIPBOARD & fcitx5 & xbindkeys --nodaemon & -{% if yadm.hostname == "thoncc" %} xdimmer -t 45 -p 3 & -{% else %} redshift -l 52:6 & nicotine --hidden & desktop2mqtt --config "$XDG_CONFIG_HOME/desktop2mqtt/config.yml" & -{% endif %} +light-locker --late-locking --lock-after-screensaver=0 --no-lock-on-suspend --no-lock-on-lid & +systembus-notify & +nmpassd & # auto start lazy script after everything else [ -x "$HOME/do.sh" ] && "$HOME/do.sh" & diff --git a/.config/i3/config##template b/.config/i3/config##template index 66874a0..fec43f9 100644 --- a/.config/i3/config##template +++ b/.config/i3/config##template @@ -7,13 +7,7 @@ set $outer_gaps 0 gaps inner $inner_gaps gaps outer $outer_gaps -# border color -client.focused #262427 #262427 #fdf9f7 #262427 #262427 -client.focused_inactive #121213 #121213 #fdf9f7 #121213 #121213 -client.unfocused #121213 #121213 #fdf9f7 #121213 #121213 -client.urgent #121213 #de9dac #fdf9f7 #de9dac #de9dac -client.placeholder #000000 #0c0c0c #fdf9f7 #121213 #121213 -client.background #f9ece8 +include color.conf # Replace window decorations with a border for_window [class=".*"] border pixel 0 @@ -85,7 +79,7 @@ for_window [class="steam"] floating enable for_window [class="RAIL"] floating enable for_window [class="Conky"] floating enable for_window [title="Farge"] floating enable -for_window [title="^\[floating\].*"] floating enable +for_window [title="^\[floating\].*" tiling_from=auto] floating enable for_window [window_type=notification] floating enable for_window [title="JidePopup"] floating enable diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf deleted file mode 100644 index b3af114..0000000 --- a/.config/kitty/kitty.conf +++ /dev/null @@ -1,14 +0,0 @@ -font_size 7.5 -disable_ligatures never -window_padding_width 10 -placement_strategy top-left -cursor_shape block - -modify_font cell_width 95% -modify_font cell_height 120% -modify_font baseline -1 - -copy_on_select yes - -include color.conf - diff --git a/.config/kwalletrc b/.config/kwalletrc new file mode 100644 index 0000000..6f0a8f5 --- /dev/null +++ b/.config/kwalletrc @@ -0,0 +1,4 @@ +[Wallet] +Default Wallet=Default keyring +Enabled=false +First Use=false diff --git a/.config/latexmk/latexmkrc b/.config/latexmk/latexmkrc index ad6c178..6d6ec09 100644 --- a/.config/latexmk/latexmkrc +++ b/.config/latexmk/latexmkrc @@ -1,4 +1 @@ -$pdflatex = "xelatex %O %S"; -$pdf_mode = 1; -$dvi_mode = 0; -$postscript_mode = 0; +$pdf_previewer = "fork xdg-open %O %S"; diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 3134b11..295077d 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -5,6 +5,7 @@ set filesep "\n" set scrolloff 10 set info size set dircounts +set mouse true set previewer preview cmd open $open $fx diff --git a/.config/mozc/config1.db b/.config/mozc/config1.db Binary files differnew file mode 100644 index 0000000..e116637 --- /dev/null +++ b/.config/mozc/config1.db diff --git a/.config/mozc/user_dictionary.db b/.config/mozc/user_dictionary.db Binary files differindex 644c695..9147808 100644 --- a/.config/mozc/user_dictionary.db +++ b/.config/mozc/user_dictionary.db diff --git a/.config/mpd/mpd.conf##default b/.config/mpd/mpd.conf##default index a374418..f999a2b 100644 --- a/.config/mpd/mpd.conf##default +++ b/.config/mpd/mpd.conf##default @@ -4,7 +4,7 @@ playlist_directory "/mnt/mpd/playlists" pid_file "/mnt/mpd/mpd.pid" state_file "/mnt/mpd/mpdstate" -bind_to_address "*" +bind_to_address "0.0.0.0" port "6600" restore_paused "yes" diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index 150b696..711242e 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -1,3 +1,4 @@ ALT+c script-message-to copy_subs copy ALT+SHIFT+c script-message-to copy_subs auto +CTRL+z set sub-delay 0 diff --git a/.config/ncmpcpp/config##template b/.config/ncmpcpp/config##template index e38258f..8059509 100644 --- a/.config/ncmpcpp/config##template +++ b/.config/ncmpcpp/config##template @@ -1,9 +1,9 @@ -mpd_host = "127.0.0.1" +mpd_host = "0.0.0.0" mpd_port = "6600" #mpd_host = "/mnt/e/mpd/socket" mpd_music_dir = "/mnt/e/mpd/music" -mpd_connection_timeout = "5" -mpd_crossfade_time = "1" +mpd_connection_timeout = 1 +mpd_crossfade_time = 1 external_editor = "{{ env.EDITOR }}" ncmpcpp_directory = "{{ env.XDG_CONFIG_HOME }}/ncmpcpp" @@ -12,10 +12,12 @@ lyrics_directory = "{{ env.XDG_CACHE_HOME }}/lyrics" progressbar_look = "───" progressbar_color = black progressbar_elapsed_color = default +visualizer_color = default playlist_display_mode = classic autocenter_mode = yes centered_cursor = yes -user_interface = alternative +user_interface = classic +connected_message_on_startup = no header_visibility = no statusbar_visibility = no @@ -25,11 +27,11 @@ state_flags_color = black:b main_window_color = white current_item_prefix = "$r" song_columns_list_format = "(20)[]{a} (6f)[blue]{NE} (50)[default]{t|f:Title} (20)[blue]{} (7f)[magenta]{l}" -song_list_format = " {{%a - %t}|{%f}}{$R%l} " +song_list_format = " {{%a - %t}|{%f}}$R{ %l} " window_border_color = default -alternative_header_first_line_format = "{{%a $8-$0 $b%t$/b}|{%f}}" -alternative_header_second_line_format = "$8{{%b}{ (%y)}}|{%D}" +alternative_header_first_line_format = "{{%a $8-$0 %t}|{%f}}" +alternative_header_second_line_format = "$8{{%b}|{%D}}" now_playing_prefix = "$b$0" now_playing_suffix = "$/b" diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc index 1e5bd13..af63b3f 100644 --- a/.config/neomutt/neomuttrc +++ b/.config/neomutt/neomuttrc @@ -20,7 +20,7 @@ set ssl_force_tls = yes # automatically refresh incoming mail set mail_check = 60 -unset wait_key +set wait_key = no push "<shell-escape> systemctl --user start mbsync & <enter>" # mailboxes diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d702226..25ac6de 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -6,7 +6,7 @@ set noexpandtab set tabstop=2 set shiftwidth=2 set termguicolors -set shortmess=I +set shortmess+=It set splitbelow splitright set noshowmode set ignorecase @@ -17,17 +17,21 @@ set mouse=a set cino=N-s,E-s,l1,g-1,j1 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 guifont=monospace:h9:#e-subpixelantialias:#h-slight set linespace=5 set tabpagemax=999 +set breakindent +set breakindentopt=shift:2 +set formatoptions+=mM +set tags^=build/tags let g:sneak#label = 1 let g:which_key_map = {} let g:airline_powerline_fonts = 1 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 +let g:AutoPairsMultilineClose = 0 +filetype plugin on if exists("g:neovide") nmap <silent> <C-=> :lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR> @@ -39,18 +43,22 @@ if exists("g:neovide") let g:neovide_floating_shadow = v:false let g:neovide_cursor_animation_length = 0.06 let g:neovide_cursor_trail_size = 0.0 - let g:neovide_padding_top=16 - let g:neovide_padding_left=16 - let g:neovide_padding_right=16 - let g:neovide_padding_bottom=16 + let g:neovide_padding_top=10 + let g:neovide_padding_left=10 + let g:neovide_padding_right=10 + let g:neovide_padding_bottom=10 endif " plugged call plug#begin('~/.config/nvim/plugged') -" quality of life -Plug 'jiangmiao/auto-pairs' +" tim <3 Plug 'tpope/vim-surround' Plug 'tpope/vim-speeddating' +Plug 'tpope/vim-eunuch' +Plug 'tpope/vim-commentary' + +" quality of life +Plug 'jiangmiao/auto-pairs' Plug 'itchyny/lightline.vim' Plug 'terryma/vim-multiple-cursors' Plug 'liuchengxu/vim-which-key' @@ -66,6 +74,7 @@ Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } Plug 'dkarter/bullets.vim' Plug 'editorconfig/editorconfig-vim' Plug 'rickhowe/diffunitsyntax' +Plug 'lervag/file-line' " language plugins Plug 'lervag/vimtex' @@ -85,19 +94,19 @@ Plug 'aklt/plantuml-syntax' Plug 'fymyte/rasi.vim' Plug 'habamax/vim-asciidoctor' Plug 'lonkaars/coc-khard' +Plug 'sile-typesetter/vim-sile' " themes Plug 'arzg/vim-colors-xcode' Plug 'romgrk/github-light.vim' Plug 'vv9k/vim-github-dark' -Plug 'rose-pine/neovim' +Plug 'rose-pine/neovim', {'as': 'rose-pine'} Plug '~/.config/nvim/local/coc-markdown-links' call plug#end() " keybinds tnoremap <Esc> <C-\><C-n> - nnoremap tt :tabnew<CR> nnoremap <CR> o<Esc> nnoremap <leader>qf <Plug>(coc-fix-current) @@ -191,9 +200,12 @@ 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 +nnoremap <silent> <leader>e 0f!xC<c-r>=system(@-)<cr><esc>ddk$ let g:which_key_map.e = 'read and execute after !' +nnoremap <leader>] <c-w>v<c-]>zt +let g:which_key_map[']'] = 'open tag in split' + " cmd maps cnoreabbrev W w cnoreabbrev sudow w !sudo tee % @@ -248,27 +260,15 @@ call lightline#init() " vimtex config let g:tex_flavor = 'latex' -let g:vimtex_compiler_latexmk = { - \ 'backend' : 'nvim', - \ 'background' : 1, - \ 'build_dir' : '', - \ 'callback' : 1, - \ 'continuous' : 1, - \ 'executable' : 'latexmk', - \ 'engine' : 'xelatex', - \ 'hooks' : [], - \ 'options' : [ - \ '-xelatex', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ ], - \} +let g:vimtex_quickfix_open_on_warning = 0 +let g:vimtex_imaps_enabled = 0 +let g:vimtex_compiler_method = 'latexmk' +let g:vimtex_compiler_latexmk_engines = { '_': '' } " TeX quotes autocmd FileType tex let b:surround_{char2nr("q")} = "`\r'" autocmd FileType tex let b:surround_{char2nr('Q')} = "``\r''" -autocmd FileType tex let b:AutoPairs = AutoPairsDefine({'(':')', '[':']', '{':'}', "``":"''", "`":"'", '$':'$', '"':'"'}) +autocmd FileType tex let b:AutoPairs = {'(':')', '[':']', '{':'}', "``":"''", "`":"'", '$':'$', '"':'"'} " AutoPairs for plantuml autocmd FileType plantuml let b:AutoPairs = {'(':')', '[':']', '{':'}', '`':'`'} @@ -369,6 +369,12 @@ augroup devicetree_ft au BufRead,BufNewFile *.dtsi set syntax=dts augroup END +augroup BibLaTeX + " add allowed characters in biblatex labels to word delimiters + autocmd! + autocmd FileType bib setlocal iskeyword+=:,- +augroup END + " sneak let g:sneak#use_ic_scs = 0 @@ -379,3 +385,9 @@ autocmd InsertLeave * call system("fcitx5-temp-off &") " colorscheme source $XDG_CONFIG_HOME/nvim/mode.vim +" use .exrc files +set exrc +set secure + +" file-line +let g:file_line_crosshairs = v:false diff --git a/.config/picom.conf b/.config/picom.conf index 111ad71..0f59fde 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -53,12 +53,30 @@ rules = ( match = "window_type *= 'dock'"; shadow = false; corner-radius = 0; + animations = ( + { + triggers = [ "open" ]; + preset = "slide-in"; + direction = "up"; + duration = 0.175; + }, + { + triggers = [ "close" ]; + preset = "slide-out"; + direction = "up"; + duration = 0.175; + }, + ); }, { match = "window_type *= 'combo'"; shadow = true; corner-radius = 10; }, + { + match = "class_i *= 'RAIL'"; + corner-radius = 0; + }, ) animations = ( diff --git a/.config/pipewire/pipewire.conf.d/50-bitrate.conf b/.config/pipewire/pipewire.conf.d/50-bitrate.conf index f7c4a93..bbf2c92 100644 --- a/.config/pipewire/pipewire.conf.d/50-bitrate.conf +++ b/.config/pipewire/pipewire.conf.d/50-bitrate.conf @@ -1,6 +1,5 @@ context.properties = { - default.clock.rate = 44100 - default.clock.allowed-rates = [ 44100, 48000, 96000 ] - default.clock.min-quantum = 16 + default.clock.rate = 96000 + default.clock.allowed-rates = [ 96000 ] } diff --git a/.config/poke/pokerc.conf b/.config/poke/pokerc.conf new file mode 100644 index 0000000..90a320f --- /dev/null +++ b/.config/poke/pokerc.conf @@ -0,0 +1,7 @@ +.set obase 16 +.set omode tree +.set pretty-print yes +.set oacutoff 32 + +pk_dump_cluster_by = 4 + diff --git a/.config/polybar/config.ini##template b/.config/polybar/config.ini##template index 4581b90..2521ce4 100644 --- a/.config/polybar/config.ini##template +++ b/.config/polybar/config.ini##template @@ -42,6 +42,7 @@ font-1 = "sans-serif:pixelsize=8:weight=bold:size=0;2" font-2 = "Hiragino Kaku Gothic ProN W3:pixelsize=8:weight=medium:size=0;1" font-3 = "Hiragino Kaku Gothic ProN W6:pixelsize=8:weight=medium:size=0;1" font-4 = "Noto Sans KR:pixelsize=8:weight=medium:size=0;2" +font-5 = "Noto Sans CJK SC:pixelsize=8:weight=medium:size=0;2" modules-left = time date {% if yadm.hostname == "thoncc" %} @@ -124,7 +125,7 @@ type = internal/mpd format-online = <label-song> format-offline = format-stopped = -label-song = %artist% - %{T2}%title%%{T-} +label-song = %artist% - %title% label-song-maxlen = 50 label-song-ellipsis = true diff --git a/.config/rofi/config.rasi##template b/.config/rofi/config.rasi##template index c6bf9c4..bb09bdf 100644 --- a/.config/rofi/config.rasi##template +++ b/.config/rofi/config.rasi##template @@ -57,7 +57,7 @@ listview { element { margin: -2px 0px; - padding: 6px 10px 3px 10px; + padding: 6px 10px 2px 10px; background-color: transparent; text-color: ${fg}; } diff --git a/.config/winapps/winapps.conf b/.config/winapps/winapps.conf new file mode 100644 index 0000000..2ef2dae --- /dev/null +++ b/.config/winapps/winapps.conf @@ -0,0 +1,15 @@ +RDP_USER="$(id -un)" +RDP_PASS="$(pass etc/rdpwin)" +VM_NAME="rdpwin" +WAFLAVOR="libvirt" +RDP_SCALE="100" +REMOVABLE_MEDIA="/mnt" +RDP_FLAGS="/cert:tofu /sound /microphone +home-drive -decorations +span /kbd:remap:0x3a=0x1d" +DEBUG="true" +AUTOPAUSE="off" +AUTOPAUSE_TIME="300" +PORT_TIMEOUT="5" +RDP_TIMEOUT="30" +APP_SCAN_TIMEOUT="30" +BOOT_TIMEOUT="0" +HIDEF="off" diff --git a/.config/wireplumber/wireplumber.conf.d/50-bluez.conf b/.config/wireplumber/wireplumber.conf.d/50-bluez.conf new file mode 100644 index 0000000..c957f73 --- /dev/null +++ b/.config/wireplumber/wireplumber.conf.d/50-bluez.conf @@ -0,0 +1,5 @@ +monitor.bluez.properties = { + bluez5.enable-msbc = false + bluez5.enable-cvsd = false + bluez5.default.rate = 96000 +} diff --git a/.config/wireplumber/wireplumber.conf.d/50-disable-suspend.conf b/.config/wireplumber/wireplumber.conf.d/50-disable-suspend.conf index d4eebbf..212afe6 100644 --- a/.config/wireplumber/wireplumber.conf.d/50-disable-suspend.conf +++ b/.config/wireplumber/wireplumber.conf.d/50-disable-suspend.conf @@ -1,28 +1,30 @@ monitor.alsa.rules = [ - { - matches = [ - { node.name = "~alsa_input.*" } - { node.name = "~alsa_output.*" } - ] - actions = { - update-props = { - session.suspend-timeout-seconds = 0 - } - } - } + { + matches = [ + { node.name = "~alsa_input.*" } + { node.name = "~alsa_output.*" } + ] + actions = { + update-props = { + session.suspend-timeout-seconds = 0 + } + } + } ] monitor.bluez.rules = [ - { - matches = [ - { node.name = "~bluez_input.*" } - { node.name = "~bluez_output.*" } - ] - actions = { - update-props = { - session.suspend-timeout-seconds = 0 - } - } - } + { + matches = [ + { node.name = "~bluez_input.*" } + { node.name = "~bluez_output.*" } + ] + actions = { + update-props = { + audio.format = "S24_3LE" + audio.rate = 96000 + session.suspend-timeout-seconds = 0 + } + } + } ] diff --git a/.config/xbindkeys/main b/.config/xbindkeys/main index fb64a20..47a89f6 100644 --- a/.config/xbindkeys/main +++ b/.config/xbindkeys/main @@ -91,6 +91,15 @@ "i3-msg move right" Mod4 + Shift + l +"i3-msg move workspace to output left" + Mod1 + Mod4 + Shift + h +"i3-msg move workspace to output down" + Mod1 + Mod4 + Shift + j +"i3-msg move workspace to output up" + Mod1 + Mod4 + Shift + k +"i3-msg move workspace to output right" + Mod1 + Mod4 + Shift + l + "i3-msg resize grow width 10 px" Mod4 + period "i3-msg resize shrink width 10 px" @@ -115,3 +124,5 @@ "fcitx5-remote -s mozc" XF86Launch7 + Release +"autorandr --change" + XF86Display diff --git a/.config/xsettingsd/xsettingsd.conf b/.config/xsettingsd/xsettingsd.conf new file mode 100644 index 0000000..46d4730 --- /dev/null +++ b/.config/xsettingsd/xsettingsd.conf @@ -0,0 +1,4 @@ +Xft/Hinting 1 +Xft/HintStyle "hintslight" +Xft/Antialias 1 +Xft/RGBA "rgb" diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index f1e3267..372735d 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -1,8 +1,14 @@ #!/bin/sh + cd "$(dirname "$0")" . "$HOME/.profile" . ./lib/bootstrap +# never use custom locale in TTY/logs +export LANG=C + +alias s=silent + # ensure required packages are installed begintask "installing packages" "$XDG_CONFIG_HOME/yadm/install-arch" > pkgs.log 2>&1 @@ -43,13 +49,13 @@ endtask begintask "building st (terminal) from source" mkdir -p ~/.local cd ~/.local - s git clone --depth 1 https://git.pipeframe.xyz/lonkaars/st + s git clone --depth 1 https://git.pipeframe.xyz/fork/st cd st s make -j endtask ) -[ "$(find ~/.ssh -name 'id*' | wc -l)" -eq 0 ] && ( +[ "$(find ~/.ssh -name 'id*' 2>/dev/null | wc -l)" -eq 0 ] && ( begintask "generating ssh keys" s ssh-keygen -q -N "" < /dev/zero endtask diff --git a/.config/yadm/install-arch b/.config/yadm/install-arch index 94721c3..a2ed199 100755 --- a/.config/yadm/install-arch +++ b/.config/yadm/install-arch @@ -8,6 +8,5 @@ cd "$(dirname "$0")" # filter comments and pipe package name list to yay -sed -e 's/#.*//g' -e 's/ //g' -e '/^$/d' packages-arch |\ - yay --noprogressbar --quiet --noconfirm --needed -Sy - +sed -e 's/#.*//g' -e 's/ //g' -e '/^$/d' packages-arch | yay --needed -Sy - diff --git a/.config/yadm/lib/bootstrap b/.config/yadm/lib/bootstrap index e367320..5dafb62 100644 --- a/.config/yadm/lib/bootstrap +++ b/.config/yadm/lib/bootstrap @@ -1,17 +1,17 @@ #!/bin/sh -unset LANG # never use custom locale in TTY/logs - TIMESTART="$(date +%s)" begintask() { printf '%s ...' "$1" } + endtask() { EXIT_CODE=$? [ $EXIT_CODE -eq 0 ] && echo ' OK' || echo ' ERROR' return $EXIT_CODE } -s() { # s for silent + +silent() { "$@" 1> /dev/null 2> /dev/null } diff --git a/.config/yadm/packages-arch b/.config/yadm/packages-arch index e35a5db..b9b9781 100644 --- a/.config/yadm/packages-arch +++ b/.config/yadm/packages-arch @@ -14,7 +14,9 @@ xorg-xrdb xorg-xset # directly used in scripts / startup +augeas autocutsel +bat dbus dunst fcitx5 @@ -23,9 +25,11 @@ imagemagick jq libpulse # for pactl maim +moreutils mpd neovim-remote nicotine+ +nodejs pastel picom pipewire @@ -34,6 +38,7 @@ polkit-gnome polybar python python-pip +python-pipx redshift rofi xbanish @@ -52,10 +57,7 @@ openssh openssl sshfs usb_modeswitch # required for android usb tethering - -# network stuff (TODO) -# NetworkManager # currently only used on laptop... -dhcpcd # i am unsure if i need this +networkmanager # applications anki-bin @@ -78,6 +80,7 @@ pass pass-otp pavucontrol pinentry +qt5-tools ranger restic rofi-pass-git @@ -86,6 +89,7 @@ scrot slock sudo sxiv +unarchiver unzip vdirsyncer vim-plug diff --git a/.config/yadm/root/bootstrap b/.config/yadm/root/bootstrap index b244471..f8b59fb 100755 --- a/.config/yadm/root/bootstrap +++ b/.config/yadm/root/bootstrap @@ -2,6 +2,12 @@ cd "$(dirname "$0")" . ../lib/bootstrap +# never use custom locale in TTY/logs +export LANG=C + +alias s=silent + + wrong_call() { cat << EOF run this script as root and with the username of your user account @@ -25,7 +31,7 @@ s getent passwd "$SETUP_USER" || wrong_call [ $(id -u "$SETUP_USER") -eq 0 ] && wrong_call begintask "copy system config files" -s cp -r etc/. /etc +s cp -r --preserve=mode,timestamps etc/. /etc endtask PINENTRY="pinentry-gnome3" @@ -72,6 +78,10 @@ s grep '^#\s*\<Color\>' /etc/pacman.conf && ( endtask ) +begintask "set autorandr to run at lightdm display startup" +s augtool set '/files/etc/lightdm/lightdm.conf/Seat:*/display-setup-script' '/etc/lightdm/autorandr-change' +endtask + [ "$(getent passwd "$SETUP_USER" | cut -d: -f7 | xargs basename)" != "zsh" ] && ( begintask "set user shell to zsh" s chsh -s "$(command -v zsh)" "$SETUP_USER" diff --git a/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh b/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh new file mode 100755 index 0000000..4680626 --- /dev/null +++ b/.config/yadm/root/etc/NetworkManager/dispatcher.d/70-auto-wifi.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +export LANG=C + +interface="$1" +action="$2" + +connectivity="$(nmcli networking connectivity)" +interface_type="$(nmcli -g GENERAL.TYPE device show "$interface")" +interface_state="$(nmcli -g GENERAL.STATE device show "$interface" | grep -o '^[0-9]\+')" + +if [ "$action" = "down" ] && [ "$connectivity" = "none" ]; then + nmcli radio wifi on + exit +fi + +if [ "$action" = "up" ] && [ "$interface_type" == "ethernet" ] && [ "$interface_state" = "100" ]; then + nmcli radio wifi off + exit +fi + diff --git a/.config/yadm/root/etc/X11/xorg.conf.d/00-keyboard.conf b/.config/yadm/root/etc/X11/xorg.conf.d/00-keyboard.conf index 6c7cfad..d4f95ff 100644 --- a/.config/yadm/root/etc/X11/xorg.conf.d/00-keyboard.conf +++ b/.config/yadm/root/etc/X11/xorg.conf.d/00-keyboard.conf @@ -1,6 +1,9 @@ Section "InputClass" - Identifier "default keyboard repeat speed" + Identifier "system-keyboard" MatchIsKeyboard "on" + Option "XkbLayout" "us" + Option "XkbModel" "pc105" + Option "XkbOptions" "ctrl:nocaps" Option "AutoRepeat" "250 40" EndSection diff --git a/.config/yadm/root/etc/X11/xorg.conf.d/40-trackpad.conf b/.config/yadm/root/etc/X11/xorg.conf.d/40-trackpad.conf new file mode 100644 index 0000000..f390b93 --- /dev/null +++ b/.config/yadm/root/etc/X11/xorg.conf.d/40-trackpad.conf @@ -0,0 +1,9 @@ +Section "InputClass" + Identifier "Trackpad preferences" + MatchIsTouchpad "on" + Driver "libinput" + Option "NaturalScrolling" "1" + Option "Tapping" "1" + Option "ScrollPixelDistance" "40" +EndSection + diff --git a/.config/yadm/root/etc/X11/xorg.conf.d/90-libinput-logitech.conf b/.config/yadm/root/etc/X11/xorg.conf.d/90-libinput-logitech.conf new file mode 100644 index 0000000..a1071b0 --- /dev/null +++ b/.config/yadm/root/etc/X11/xorg.conf.d/90-libinput-logitech.conf @@ -0,0 +1,8 @@ +Section "InputClass" + Identifier "Logitech MX Master 3S High res scrolling" + MatchUSBID "046d:c548" + MatchDevicePath "/dev/input/event*" + Driver "libinput" + Option "HighResolutionWheelScrolling" "false" +EndSection + diff --git a/.config/yadm/root/etc/containers/nodocker b/.config/yadm/root/etc/containers/nodocker new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.config/yadm/root/etc/containers/nodocker diff --git a/.config/yadm/root/etc/default/earlyoom b/.config/yadm/root/etc/default/earlyoom new file mode 100644 index 0000000..53ddf8b --- /dev/null +++ b/.config/yadm/root/etc/default/earlyoom @@ -0,0 +1 @@ +EARLYOOM_ARGS="-M 102400 -r 3600 -n --avoid '(^|/)(init|systemd|Xorg|sshd)$'" diff --git a/.config/yadm/root/etc/kernel/cmdline b/.config/yadm/root/etc/kernel/cmdline new file mode 100644 index 0000000..2448b2c --- /dev/null +++ b/.config/yadm/root/etc/kernel/cmdline @@ -0,0 +1 @@ +quiet diff --git a/.config/yadm/root/etc/libinput/local-overrides.quirks b/.config/yadm/root/etc/libinput/local-overrides.quirks new file mode 100644 index 0000000..9a897c2 --- /dev/null +++ b/.config/yadm/root/etc/libinput/local-overrides.quirks @@ -0,0 +1,4 @@ +[Logitech MX Master 3S] +MatchVendor=0x046D +MatchProduct=0xC548 +AttrEventCode=-REL_WHEEL_HI_RES;-REL_HWHEEL_HI_RES; diff --git a/.config/yadm/root/etc/lightdm/autorandr-change b/.config/yadm/root/etc/lightdm/autorandr-change new file mode 100755 index 0000000..f181fe8 --- /dev/null +++ b/.config/yadm/root/etc/lightdm/autorandr-change @@ -0,0 +1,5 @@ +#!/bin/sh +autorandr --change + +# make sure this script exits happily +exit 0 diff --git a/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf b/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf index 8dae65c..7ba729d 100644 --- a/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf +++ b/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf @@ -1,3 +1,8 @@ [greeter] -theme-name=Skeuos-Blue-Dark -indicators=~session;~power +font-name = Inter 9 +theme-name = adw-gtk3-dark +indicators = ~clock;~spacer;~power +hide-user-image = true +screensaver-timeout = 15 +default-session = xinitrc +clock-format = %t%H:%M diff --git a/.config/yadm/root/etc/logid.cfg b/.config/yadm/root/etc/logid.cfg new file mode 100644 index 0000000..e98e048 --- /dev/null +++ b/.config/yadm/root/etc/logid.cfg @@ -0,0 +1,13 @@ +devices: ({ + name: "MX Master 3S"; + smartshift: { + on: true; + threshold: 255; + torque: 255; + }; + hiresscroll: { + hires: false; + invert: false; + target: false; + }; +}); diff --git a/.config/yadm/root/etc/systemd/logind.conf.d/10-laptop-lid.conf b/.config/yadm/root/etc/systemd/logind.conf.d/10-laptop-lid.conf new file mode 100644 index 0000000..c289779 --- /dev/null +++ b/.config/yadm/root/etc/systemd/logind.conf.d/10-laptop-lid.conf @@ -0,0 +1,4 @@ +[Login] +HandleLidSwitch=suspend +HandleLidSwitchExternalPower=ignore +HandleLidSwitchDocked=ignore diff --git a/.config/yadm/root/etc/udev/hwdb.d/71-logitech-mx3.hwdb b/.config/yadm/root/etc/udev/hwdb.d/71-logitech-mx3.hwdb new file mode 100644 index 0000000..3ccaa11 --- /dev/null +++ b/.config/yadm/root/etc/udev/hwdb.d/71-logitech-mx3.hwdb @@ -0,0 +1,3 @@ +mouse:usb:v046dpc548:name:Logitech USB Receiver Mouse:* + MOUSE_WHEEL_CLICK_ANGLE=1 + MOUSE_WHEEL_CLICK_COUNT=360 diff --git a/.config/yadm/root/etc/udev/rules.d/90-backlight.rules b/.config/yadm/root/etc/udev/rules.d/90-backlight.rules new file mode 100644 index 0000000..23eedf8 --- /dev/null +++ b/.config/yadm/root/etc/udev/rules.d/90-backlight.rules @@ -0,0 +1 @@ +SUBSYSTEM=="backlight", ACTION=="add", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness" diff --git a/.config/yadm/root/etc/xdg/nvim/init.vim b/.config/yadm/root/etc/xdg/nvim/init.vim new file mode 100644 index 0000000..f238fc6 --- /dev/null +++ b/.config/yadm/root/etc/xdg/nvim/init.vim @@ -0,0 +1,2 @@ +set notermguicolors +colorscheme vim diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index ff927ca..89ae535 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -1,15 +1,16 @@ -set scroll-page-aware "true" +set scroll-page-aware true set scroll-full-overlap 0.01 set scroll-step 100 set selection-clipboard clipboard # recolor (dark mode) map <C-i> recolor -set recolor "true" +set recolor true -set recolor-reverse-video "true" -set recolor-keephue "true" +set recolor-reverse-video true +set recolor-keephue true set guioptions "" +set show-recent false include ./colors diff --git a/.local/share/Anki2/gldriver6 b/.local/share/Anki2/gldriver6 new file mode 100644 index 0000000..865faf1 --- /dev/null +++ b/.local/share/Anki2/gldriver6 @@ -0,0 +1 @@ +auto diff --git a/.local/share/applications/mozc-dictionary.desktop b/.local/share/applications/mozc-dictionary.desktop new file mode 100644 index 0000000..c4f6193 --- /dev/null +++ b/.local/share/applications/mozc-dictionary.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Mozc dictionary tool +Name[ja]=Mozc 辞書ツール +Name[nl]=Mozc woordenboekhulpprogramma +GenericName[ja]=日本語入力の辞書ツール +GenericName[nl]=Hulpprogramma voor woordenboek van Japanse invoer +GenericName=Japanese input method dictionary tool +Exec=/usr/lib/mozc/mozc_tool --mode=dictionary_tool +Icon=mozc +Type=Application +Categories=Settings; diff --git a/.local/share/applications/mozc-settings.desktop b/.local/share/applications/mozc-settings.desktop new file mode 100644 index 0000000..bcfde2d --- /dev/null +++ b/.local/share/applications/mozc-settings.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Mozc settings +Name[ja]=Mozc プロパティ +Name[nl]=Mozc instellingen +GenericName[ja]=日本語入力の設定 +GenericName[nl]=Instellingen voor Japanse invoermethode +GenericName=Japanese IME configuration +Exec=/usr/lib/mozc/mozc_tool --mode=config_dialog +Icon=mozc +Type=Application +Categories=Settings; diff --git a/.local/share/bin/= b/.local/share/bin/= index 59b9b45..8f3345d 100755 --- a/.local/share/bin/= +++ b/.local/share/bin/= @@ -1,2 +1,42 @@ -#!/bin/sh -python3 -c "from math import *; deg = pi / 180; print($*)" +#!/bin/python3 -- +from sys import argv as _argv +from os import environ as _environ, path as _path +from math import * + +_ans_path = _path.join(_environ["XDG_CACHE_HOME"], "calc_ans") +try: + _ans_file = open(_ans_path, "r+") +except: + _ans_file = open(_ans_path, "w+") +_exit_code = 0 + +ans = 0 +try: + _ans_str = _ans_file.read() + if "." in _ans_str: + ans = float(_ans_str) + else: + ans = int(_ans_str) +except: + pass + +deg = pi / 180 + +MIN = min +MAX = max +BIT = lambda n: 1 << n +GENMASK = lambda h, l: (BIT(MAX(h, l) + 1) - 1) ^ (BIT(MIN(h, l)) - 1) + +try: + ans = eval(" ".join(_argv[1:])) + print(ans) +except: + pass + +_ans_file.truncate(0) +_ans_file.seek(0) +_ans_file.write(str(ans)) +_ans_file.close() + +exit(_exit_code) + diff --git a/.local/share/bin/brave b/.local/share/bin/brave index 1dea360..5089377 100755 --- a/.local/share/bin/brave +++ b/.local/share/bin/brave @@ -1,8 +1,7 @@ #!/bin/sh -# the remote debugging is so brave can be hooked into by -# ~/.local/share/mode/reload.d/brave. this is probaby bad for security if -# you're not the only user on the system -# --remote-debugging-port=9222 \ +# - make brave automatically load the `mode` theme +# - don't use kwallet (i don't save passwords in chrome anyways) /usr/bin/brave \ --load-extension="$XDG_CACHE_HOME/mode/chromium" \ + --password-store=basic \ "$@" diff --git a/.local/share/bin/dbg b/.local/share/bin/dbg new file mode 100755 index 0000000..424110b --- /dev/null +++ b/.local/share/bin/dbg @@ -0,0 +1,40 @@ +#!/bin/sh +progname="$(basename "$(readlink -f "$0")")" +die() { + ec="$1" + shift + echo "$@" + exit "$ec" +} + +GDB="arm-none-eabi-gdb" + +[ $# -lt 1 ] && die 1 "usage: $progname DEVICE [gdb args...]" +DEVICE="$1" +shift + +if [ $# -eq 0 ] ; then + # automatically add --se flag if executable can be found + exec="$(find . -maxdepth 3 -name '*.elf' | head -n1)" + [ -n "$exec" ] && set -- --se="$exec" +fi + +[ -n "$(echo "$*" | grep -i zephyr)" ] && GDB="arm-zephyr-eabi-gdb" + +fork JLinkGDBServerCLExe \ + -device "$DEVICE" \ + -select USB \ + -endian little \ + -if SWD \ + -speed auto \ + -singlerun \ + -noir \ + -nologtofile \ + -silent + +# append startup attach command to args +set -- --eval-command="target extended-remote :2331" "$@" + +# launch gdb and forward any other args to it +exec "$GDB" "$@" + diff --git a/.local/share/bin/dox-open b/.local/share/bin/dox-open new file mode 100755 index 0000000..493c435 --- /dev/null +++ b/.local/share/bin/dox-open @@ -0,0 +1,31 @@ +#!/bin/node + +import { glob, readFile } from 'node:fs/promises'; +import { spawn } from 'node:child_process'; +import { argv, chdir, cwd } from 'node:process'; +import { join } from 'node:path'; + +argv.shift(); +argv.shift(); +chdir("search"); + +var symbols = {}; +for await (const chunk of glob('all_*.js')) { + const contents = await readFile(chunk); + const searchData = eval(`${contents}; searchData`); + const here = cwd(); + + for (const [ _id, [ symbol, ...entry ] ] of searchData) { + symbols[symbol] = entry.map(e => `file://${join(here, e[0])}`); + } +} + +for (const symbol of argv) { + if (!(symbol in symbols)) { + console.error(`No doxygen index for symbol \`${symbol}\``); + continue; + } + const urls = symbols[symbol]; + spawn('xdg-open', [ urls[0], ]); +} + diff --git a/.local/share/bin/editor b/.local/share/bin/editor new file mode 100755 index 0000000..d4bf664 --- /dev/null +++ b/.local/share/bin/editor @@ -0,0 +1,2 @@ +#!/bin/sh +exec nvim -p "$@" diff --git a/.local/share/bin/fontfix b/.local/share/bin/fontfix new file mode 100755 index 0000000..1c9beaf --- /dev/null +++ b/.local/share/bin/fontfix @@ -0,0 +1,39 @@ +#!/bin/python3 + +import os +import sys +from pathlib import Path + +from fontTools import ttLib + +PROPID_FAMILY = 1 +PROPID_SUBFAMILY = 2 +PROPID_FULLNAME = 4 +PROPID_PSNAME = 6 + +PLATFORM_MS = 1 +PLATFORM_MAC = 3 + +# see +# https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html +# for magic numbers + +for folder in Path(".").iterdir(): + print(f"{folder}/") + family_name = str(folder.stem) + for file in folder.glob("*.ttf"): + subfamily_name = file.stem.removeprefix(family_name).strip() + with ttLib.TTFont(file) as ttf: + nametable = ttf["name"] + full_name = f"{family_name} {subfamily_name}" + postscript_name = f"{family_name}-{subfamily_name}".replace(" ", "") + nametable.setName(family_name, PROPID_FAMILY, PLATFORM_MS, 0, 0) + nametable.setName(family_name, PROPID_FAMILY, PLATFORM_MAC, 1, 1033) + nametable.setName(subfamily_name, PROPID_SUBFAMILY, PLATFORM_MS, 0, 0) + nametable.setName(subfamily_name, PROPID_SUBFAMILY, PLATFORM_MAC, 1, 1033) + nametable.setName(full_name, PROPID_FULLNAME, PLATFORM_MS, 0, 0) + nametable.setName(full_name, PROPID_FULLNAME, PLATFORM_MAC, 1, 1033) + nametable.setName(postscript_name, PROPID_PSNAME, PLATFORM_MS, 0, 0) + nametable.setName(postscript_name, PROPID_PSNAME, PLATFORM_MAC, 1, 1033) + ttf.save(file) + print(f" {file.name}: [{family_name} :: {subfamily_name}]") diff --git a/.local/share/bin/labels2lrc b/.local/share/bin/labels2lrc index 1491dae..38630c1 100755 --- a/.local/share/bin/labels2lrc +++ b/.local/share/bin/labels2lrc @@ -1,13 +1,17 @@ -#!/bin/sh -cat "$@" |\ - awk ' +#!/bin/gawk -f BEGIN { FS = "\t" } { - seconds = $1 - minutes = int(seconds / 60) - seconds = seconds % 60 - millis = (seconds * 100) % 100 + time = $1 + time = gensub(/([0-9]+)\.([0-9]{,2})([0-9]*)/, "\\1\\2.\\3", "g", time) + time = int(time + 0.5) + + millis = time % 100 + time = int(time / 100) + + seconds = time % 60 + time = int(time / 60) + + minutes = time % 100 + printf("[%02d:%02d.%02d]%s\n", minutes, seconds, millis, $3) } -' - diff --git a/.local/share/bin/lrc2labels b/.local/share/bin/lrc2labels index 31aa4be..a23b299 100755 --- a/.local/share/bin/lrc2labels +++ b/.local/share/bin/lrc2labels @@ -1,11 +1,7 @@ -#!/bin/sh -cat "$@" |\ - gawk ' +#!/bin/gawk -f match($0, /^\[([0-9]{2}):([0-9]{2}\.[0-9]{2})\](.*)/, group) { time = group[1] * 60 + group[2] lyric = group[3] printf("%.2f\t%.2f\t%s\n", time, time, lyric) } -' - diff --git a/.local/share/bin/mk b/.local/share/bin/mk index b7e2b41..54b6908 100755 --- a/.local/share/bin/mk +++ b/.local/share/bin/mk @@ -1,6 +1,9 @@ #!/bin/sh progname="$(basename "$0")" showmode() { + ! [ -n "$FROM_PROMPT" ] && return + ! [ -t 1 ] && return + mode=" ($1)" col=$(( $(tput cols) - $(echo "$mode" | wc -L) + 1 )) printf '\e[1A\e['$col'G\e[1;30m%s\e[0m\n' "$mode" @@ -23,11 +26,17 @@ mode_cmake() { # re-run configuration if fresh or CMakeLists was changed if [ ! -e "$builddir/build.ninja" ] || - [ "CMakeLists.txt" -nt "$builddir/build.ninja" ] ; then - cmake --log-level WARNING -B "$builddir" + [ "CMakeLists.txt" -nt "$builddir/build.ninja" ] ; then + cmake --log-level WARNING -B "$builddir" fi - exec cmake --build "$builddir" -- "$@" + # build + cmake --build "$builddir" -- "$@" || exit $? + + # generate vim tags (continue after mk exits) + ninja -C "$builddir" -t deps | sed -n 's/^ \{4\}//p' | sort -u | ctags -L - -f "$builddir/tags" & + + exit 0 } [ -e "CMakeLists.txt" ] && mode_cmake "$@" diff --git a/.local/share/bin/screenrecord b/.local/share/bin/screenrecord index d595cc8..1045a6e 100755 --- a/.local/share/bin/screenrecord +++ b/.local/share/bin/screenrecord @@ -1,8 +1,8 @@ #!/bin/sh exec giph "$@" \ - --framerate=60 \ + --framerate 60 \ --select \ - --bordersize=4 \ - --color=255,255,255 \ + --bordersize 4 \ + --color 255,255,255 \ "$(date +'%Y-%m-%d_%H-%M-%S.mp4')" diff --git a/.local/share/bin/sdk10_compiledb b/.local/share/bin/sdk10_compiledb new file mode 100755 index 0000000..6e62d47 --- /dev/null +++ b/.local/share/bin/sdk10_compiledb @@ -0,0 +1,38 @@ +#!/bin/python3 + +from shlex import split, join +from sys import argv +from os import getcwd +import subprocess + +process = subprocess.run(argv[1:], stdout=subprocess.PIPE, stderr=None, env={"LANG": "C"}) + +dir_stack = [getcwd()] +expanded_output = [] + +for line in process.stdout.decode('utf-8').split('\n'): + expanded_args = [] + args = split(line) + + if line.startswith('make: Entering directory'): + dir_stack.append(args[-1]) + expanded_output.append(line) + continue + if line.startswith('make: Leaving directory'): + dir_stack.pop() + expanded_output.append(line) + continue + + for arg in args: + if not arg.startswith('@'): + expanded_args.append(arg) + continue + with open(dir_stack[-1] + '/' + arg[1:], 'r') as file: + expanded_args += split(file.read()) + expanded_output.append(subprocess.list2cmdline(expanded_args)) + +process = subprocess.Popen(["compiledb"], stdin=subprocess.PIPE, stdout=None, stderr=None, text=True) +process.stdin.write("\n".join(expanded_output)) +process.stdin.close() +process.wait() + diff --git a/.local/share/gnupg/gpg-agent.conf b/.local/share/gnupg/gpg-agent.conf index b747e5e..4e3bb5d 100644 --- a/.local/share/gnupg/gpg-agent.conf +++ b/.local/share/gnupg/gpg-agent.conf @@ -1,2 +1,3 @@ allow-preset-passphrase max-cache-ttl 604800 +pinentry-program /usr/bin/pinentry-gtk diff --git a/.local/share/mode/mode b/.local/share/mode/mode index 55de32f..dc188e9 100755 --- a/.local/share/mode/mode +++ b/.local/share/mode/mode @@ -1,10 +1,11 @@ -#!/bin/sh +#!/usr/bin/env sh progname="$(basename "$0")" data="$(dirname "$(readlink -f "$0")")" export data # path to directory containing reload.d, switch.d, etc. -run_cfggen=1 +run_switch=1 run_reload=1 +no_cfg=0 theme="" # absolute path to theme # print error message and exit with error @@ -22,7 +23,8 @@ usage: $progname [-chr] action|theme options: - -c, --no-cfggen disable updating of configuration files + -s, --no-switch disable running switch.d hooks + -c, --no-cfggen disable generation of templated configuration files -h, --help display this help text -r, --no-reload disable reloading of applications after applying theme @@ -105,11 +107,13 @@ for arg in "$@" ; do # help -h|--help|help) usage && exit 0 ;; # only run reload scripts - reload) run_reload=1 run_cfggen=0 ;; + reload) run_reload=1 run_switch=0 ;; # prevent reload.d scripts from running -r|--no-reload) run_reload=0 ;; # prevent switch.d scripts from running - -c|--no-cfggen) run_cfggen=0 ;; + -s|--no-switch) run_switch=0 ;; + # prevent switch.d scripts from running + -c|--no-cfggen) no_cfg=1 ;; # restore previous theme stored as symlink (see switch.d/mode) restore) theme="$(readlink -f "$XDG_CACHE_HOME/mode/state/theme")" @@ -136,7 +140,9 @@ for arg in "$@" ; do esac done +export no_cfg + # main -[ $run_cfggen -eq 1 ] && switch +[ $run_switch -eq 1 ] && switch [ $run_reload -eq 1 ] && reload diff --git a/.local/share/mode/reload.d/i3 b/.local/share/mode/reload.d/i3 new file mode 100755 index 0000000..96212cf --- /dev/null +++ b/.local/share/mode/reload.d/i3 @@ -0,0 +1,2 @@ +#!/bin/sh +fork i3-msg reload diff --git a/.local/share/mode/switch.d/anki b/.local/share/mode/switch.d/anki index c9caf5d..7572b00 100755 --- a/.local/share/mode/switch.d/anki +++ b/.local/share/mode/switch.d/anki @@ -1,4 +1,5 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return # this generates theme files compatible with Anki-redesign: # <https://ankiweb.net/shared/info/308574457> diff --git a/.local/share/mode/switch.d/chromium b/.local/share/mode/switch.d/chromium index fb701a5..5ed07fc 100755 --- a/.local/share/mode/switch.d/chromium +++ b/.local/share/mode/switch.d/chromium @@ -1,11 +1,13 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CACHE_HOME/mode/chromium" rm -f 'Cached Theme.pak' magick -size 100x100 "xc:$bg" 'bg.png' -bg_alt=$(mix_rgb $color7 $bg 0.20) -fg_alt=$(mix_rgb $color15 $fg 0.60) +bg_alt=$(mix_rgb $bg $color0 0.65) +fg_alt=$(mix_rgb $fg $color15 0.35) bg="$(hex_to_rgb_array "$bg")" fg="$(hex_to_rgb_array "$fg")" bg_alt="$(hex_to_rgb_array "$bg_alt")" diff --git a/.local/share/mode/switch.d/discord b/.local/share/mode/switch.d/discord index 5931dec..dd7e5e3 100755 --- a/.local/share/mode/switch.d/discord +++ b/.local/share/mode/switch.d/discord @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/BetterDiscord/themes" cat << EOF > 'mode.theme.css' /** diff --git a/.local/share/mode/switch.d/dunst b/.local/share/mode/switch.d/dunst index f863100..d7d9a2b 100755 --- a/.local/share/mode/switch.d/dunst +++ b/.local/share/mode/switch.d/dunst @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/dunst" cat 'base' - << EOF > 'dunstrc' frame_color = "$accent" diff --git a/.local/share/mode/switch.d/fcitx5 b/.local/share/mode/switch.d/fcitx5 index 71880a7..d9d0032 100755 --- a/.local/share/mode/switch.d/fcitx5 +++ b/.local/share/mode/switch.d/fcitx5 @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_DATA_HOME/fcitx5/themes/default" rounding=6 size=$(( 2 * $rounding + 4 )) diff --git a/.local/share/mode/switch.d/i3 b/.local/share/mode/switch.d/i3 new file mode 100755 index 0000000..713869e --- /dev/null +++ b/.local/share/mode/switch.d/i3 @@ -0,0 +1,14 @@ +#!/bin/sh +[ $no_cfg -eq 1 ] && return + +indicator="$color0" +mkcd "$XDG_CONFIG_HOME/i3" +cat << EOF > 'color.conf' +client.focused $fg $bg $fg $indicator $bg +client.focused_inactive $bg $bg $fg $indicator $bg +client.unfocused $bg $bg $fg $indicator $bg +client.urgent $bg $bg $fg $indicator $bg +client.placeholder $bg $bg $fg $indicator $bg +client.background $bg +EOF + diff --git a/.local/share/mode/switch.d/kitty b/.local/share/mode/switch.d/kitty index dddc41b..eeb81d0 100755 --- a/.local/share/mode/switch.d/kitty +++ b/.local/share/mode/switch.d/kitty @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/kitty" cat << EOF > 'color.conf' diff --git a/.local/share/mode/switch.d/mode b/.local/share/mode/switch.d/mode index f4c916e..8866486 100755 --- a/.local/share/mode/switch.d/mode +++ b/.local/share/mode/switch.d/mode @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CACHE_HOME/mode/state" echo "$mode" > mode diff --git a/.local/share/mode/switch.d/polybar b/.local/share/mode/switch.d/polybar index 17fcee2..7087735 100755 --- a/.local/share/mode/switch.d/polybar +++ b/.local/share/mode/switch.d/polybar @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/polybar" cat << EOF > 'colors.ini' [color] diff --git a/.local/share/mode/switch.d/vim b/.local/share/mode/switch.d/vim index cb5a651..2220b1a 100755 --- a/.local/share/mode/switch.d/vim +++ b/.local/share/mode/switch.d/vim @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/nvim/mode" # lightline diff --git a/.local/share/mode/switch.d/zathura b/.local/share/mode/switch.d/zathura index e1a15e7..42d6d90 100755 --- a/.local/share/mode/switch.d/zathura +++ b/.local/share/mode/switch.d/zathura @@ -1,4 +1,6 @@ #!/bin/sh +[ $no_cfg -eq 1 ] && return + mkcd "$XDG_CONFIG_HOME/zathura" cat << EOF > 'colors' set completion-bg "$bg" @@ -8,7 +8,6 @@ export LANG='ja_JP.UTF-8' # aliases -alias vim='nvim' alias copy='xclip -selection clipboard' alias dnd='dragon-drop --all --and-exit' alias sl='sl -w' @@ -31,6 +30,9 @@ alias g='git' # force colorterm export COLORTERM="truecolor" +# colors +alias diff='diff --color=auto' + # xdg base directories export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" @@ -42,9 +44,8 @@ export GEM_HOME="$XDG_DATA_HOME/gem/ruby/3.0.0" # script locations if [ -z "$PATH_EXTENDED" ] ; then + PATH="/opt/zephyr-sdk/arm-zephyr-eabi/bin:$PATH" PATH="$GEM_HOME/bin:$PATH" - # PATH="$HOME/.lyp/bin:$PATH" - # PATH="/opt/f4pga/xc7/conda/bin:$PATH" PATH="$HOME/.local/share/cargo/bin:$PATH" PATH="$HOME/.local/go/bin:$PATH" PATH="$HOME/.local/bin:$PATH" @@ -54,14 +55,18 @@ if [ -z "$PATH_EXTENDED" ] ; then fi # other stuff -export EDITOR="nvim -p" +export EDITOR=editor export PAGER="less" export FZF_DEFAULT_COMMAND="find . -name '.?*' -prune -o -print" -export FZF_DEFAULT_OPTS="--color=bw,fg:7,scrollbar:8,info:8 --layout=reverse --info=inline-right --no-separator --no-scrollbar --marker='*' --pointer=''" +export FZF_DEFAULT_OPTS="--color=bw,current-fg:regular:reverse,current-hl:underline:reverse,info:bright-black,hl:underline --layout=reverse --info=inline-right --no-separator --no-scrollbar --marker='' --pointer='' --highlight-line" export GOPATH="$HOME/.local/go" [ -e "$XDG_CONFIG_HOME/gtk-4.0/env" ] && . "$XDG_CONFIG_HOME/gtk-4.0/env" export PASSWORD_STORE_ENABLE_EXTENSIONS=true export PASSWORD_STORE_EXTENSIONS_DIR="$XDG_DATA_HOME/pass-extensions" +export MOZ_USE_XINPUT2=1 +export CMAKE_EXPORT_COMPILE_COMMANDS=1 +export CMAKE_GENERATOR=Ninja +export LIBVIRT_DEFAULT_URI='qemu:///system' # LS_COLORS [ ! -e "$XDG_CACHE_HOME/dircolors" ] || [ "$XDG_CONFIG_HOME/dircolors" -nt "$XDG_CACHE_HOME/dircolors" ] && dircolors "$XDG_CONFIG_HOME/dircolors" > "$XDG_CACHE_HOME/dircolors" @@ -85,7 +90,17 @@ export CONAN_USER_HOME="$XDG_CONFIG_HOME/conan" alias nvidia-settings='nvidia-settings --config="$XDG_CONFIG_HOME/nvidia/settings"' alias gpg2="gpg2 --homedir $XDG_DATA_HOME/gnupg" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" +export NMPASS_FORMAT="net/{ssid}/passwd" export WGETRC="$XDG_CONFIG_HOME/wgetrc" +export TEXMFHOME="$XDG_DATA_HOME/texmf" +export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var" +export TEXMFCONFIG="$XDG_CONFIG_HOME/texlive/texmf-config" +alias poke="poke --quiet" + +# colors +alias diff='diff --color=auto' +alias mk='FROM_PROMPT=y mk' +alias diffstat='diffstat -C' # disable dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..d5b44b7 --- /dev/null +++ b/.ssh/config @@ -0,0 +1,5 @@ +match user git host pipeframe.xyz + requesttty no + +host * + warnweakcrypto no @@ -22,6 +22,7 @@ WORDCHARS="${WORDCHARS:gs/\//}" # remove '/' from WORDCHARS compinit -d "$ZSH_COMPDUMP" # history +! [ -d "$XDG_DATA_HOME/zsh" ] && mkdir -p "$XDG_DATA_HOME/zsh" export HISTFILE="$XDG_DATA_HOME/zsh/history" export HISTSIZE=10000000 export SAVEHIST=10000000 |