diff options
61 files changed, 336 insertions, 128 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..bde07e1 100644 --- a/.config/coc/extensions/package.json +++ b/.config/coc/extensions/package.json @@ -17,5 +17,5 @@ }, "disabled": [], "locked": [], - "lastUpdate": 1743837108306 + "lastUpdate": 1755852809949 }
\ 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..b6c58f8 100644 --- a/.config/firefox/chrome/userChrome.css +++ b/.config/firefox/chrome/userChrome.css @@ -13,9 +13,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 diff --git a/.config/firefox/user.js b/.config/firefox/user.js index 778631e..23adc29 100644 --- a/.config/firefox/user.js +++ b/.config/firefox/user.js @@ -5,6 +5,7 @@ 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("browser.safebrowsing.downloads.enabled", false); +user_pref("browser.translations.automaticallyPopup", false); // privacy user_pref("signon.rememberSignons", false); 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/git/config##template b/.config/git/config##template index edae109..8f34c5d 100644 --- a/.config/git/config##template +++ b/.config/git/config##template @@ -33,3 +33,7 @@ l = log d = diff cloc = !git ls-files -z | xargs -0 cloc +[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..586ccaf 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,10 @@ 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 %} # auto start lazy script after everything else [ -x "$HOME/do.sh" ] && "$HOME/do.sh" & 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/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/ncmpcpp/config##template b/.config/ncmpcpp/config##template index e38258f..12ddec6 100644 --- a/.config/ncmpcpp/config##template +++ b/.config/ncmpcpp/config##template @@ -12,6 +12,7 @@ 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 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..d0ae906 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -17,17 +17,20 @@ 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 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,10 +42,10 @@ 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 @@ -85,19 +88,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) @@ -248,27 +251,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 +360,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 +376,7 @@ autocmd InsertLeave * call system("fcitx5-temp-off &") " colorscheme source $XDG_CONFIG_HOME/nvim/mode.vim +" use .exrc files +set exrc +set secure + diff --git a/.config/picom.conf b/.config/picom.conf index 111ad71..30e2693 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -53,6 +53,20 @@ 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'"; 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..5ccc6f9 100644 --- a/.config/yadm/packages-arch +++ b/.config/yadm/packages-arch @@ -14,6 +14,7 @@ xorg-xrdb xorg-xset # directly used in scripts / startup +augeas autocutsel dbus dunst @@ -26,6 +27,7 @@ maim mpd neovim-remote nicotine+ +nodejs pastel picom pipewire @@ -34,6 +36,7 @@ polkit-gnome polybar python python-pip +python-pipx redshift rofi xbanish @@ -52,10 +55,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 +78,7 @@ pass pass-otp pavucontrol pinentry +qt5-tools ranger restic rofi-pass-git @@ -86,6 +87,7 @@ scrot slock sudo sxiv +unarchiver unzip vdirsyncer vim-plug diff --git a/.config/yadm/root/bootstrap b/.config/yadm/root/bootstrap index b244471..4eef9db 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 @@ -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/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/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/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..14e8ee1 100644 --- a/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf +++ b/.config/yadm/root/etc/lightdm/lightdm-gtk-greeter.conf @@ -1,3 +1,5 @@ [greeter] -theme-name=Skeuos-Blue-Dark +theme-name=adw-gtk3-dark indicators=~session;~power +hide-user-image=true +screensaver-timeout = 15 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/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/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/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/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/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/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/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" @@ -42,9 +42,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" @@ -62,6 +61,9 @@ 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 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" @@ -86,6 +88,9 @@ alias nvidia-settings='nvidia-settings --config="$XDG_CONFIG_HOME/nvidia/setting alias gpg2="gpg2 --homedir $XDG_DATA_HOME/gnupg" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" 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" # disable dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..7e3a1bc --- /dev/null +++ b/.ssh/config @@ -0,0 +1,2 @@ +match user git host pipeframe.xyz + requesttty no |