summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/mkinitcpio.conf4
-rw-r--r--home/xyz/.config/neomutt/neomuttrc10
-rw-r--r--home/xyz/.config/nvim/init.vim31
-rw-r--r--home/xyz/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js6
4 files changed, 42 insertions, 9 deletions
diff --git a/etc/mkinitcpio.conf b/etc/mkinitcpio.conf
index 1dd9ace0..c9de0990 100644
--- a/etc/mkinitcpio.conf
+++ b/etc/mkinitcpio.conf
@@ -1,4 +1,4 @@
-# vim:set ft=sh
+# vim:set ft=sh:
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
@@ -48,7 +48,7 @@ FILES=()
# HOOKS=(base udev microcode modconf block lvm2 filesystems fsck)
#
## This will create a systemd based initramfs which loads an encrypted root filesystem.
-# HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
+# HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
diff --git a/home/xyz/.config/neomutt/neomuttrc b/home/xyz/.config/neomutt/neomuttrc
index afd5aa75..941e4c73 100644
--- a/home/xyz/.config/neomutt/neomuttrc
+++ b/home/xyz/.config/neomutt/neomuttrc
@@ -174,9 +174,15 @@ macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
# here must specify full path of the file to source, else it will souce in the dir where neomutt is execute at
# use vim-like uppercase marks
# Ca mail server
-macro index,pager \'C '<sync-mailbox><enter-command>source "$XDG_CONFIG_HOME/neomutt/mail"<enter><change-folder>!<enter>'
+#
+# mutt-wizard uses <change-folder>!<enter>, not sure what that '!' means, I
+# tested with `c` hotkey which seems is <change-folder> and if I enter '!', it
+# seems always go back ot ca mail server inbox. Need to learn more. I want it
+# to change to current server inbox so I use <change-folder>=INBOX<enter>
+# instead for now.
+macro index,pager \'C '<sync-mailbox><enter-command>source "$XDG_CONFIG_HOME/neomutt/mail"<enter><change-folder>=INBOX<enter>'
# Ib mail server
-macro index,pager \'I '<sync-mailbox><enter-command>source "$XDG_CONFIG_HOME/neomutt/mail2"<enter><change-folder>!<enter>'
+macro index,pager \'I '<sync-mailbox><enter-command>source "$XDG_CONFIG_HOME/neomutt/mail2"<enter><change-folder>=INBOX<enter>'
# maybe useful for multiple accounts
#macro index c "<change-folder>?<change-dir><home>^K=<enter>"
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim
index b5c7be08..0fcd4244 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -11,7 +11,6 @@ call plug#begin()
if has('nvim') && executable('firefox') && ( hostname() != 'xyzpp' )
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
endif
-" tinted-theming/base16-vim has low contrast on fold title make it unreadable, but I customized it easily
" chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained
" RRethy/base16-nvim does not highlight markdown codeblocks
" tinted-theming/base16-vim and RRethy/base16-nvim seem both work, both support tree-sitter
@@ -112,8 +111,15 @@ augroup mycmd
" https://github.com/neovim/neovim/pull/25336
" https://github.com/neovim/neovim/commit/29fe883aa9166bdbcae3f935523c75a8aa56fe45
" remove nvim.swapfile autocmd is more correct, without also works but I think it change to 'e' then to 'o' which is not ideal, also it will echo "W325: ..." which is not what I want
- autocmd! nvim.swapfile
- autocmd SwapExists * let v:swapchoice = 'o'
+ if has('nvim')
+ autocmd! nvim.swapfile
+ autocmd SwapExists * let v:swapchoice = 'o'
+ " neovim high CPU usage when editing markdown file with many lines,
+ " e.g., more than 100 lines, can be workarounded with `:lua
+ " vim.treesitter.stop()`
+ " https://github.com/neovim/neovim/discussions/39277
+ autocmd FileType markdown lua vim.treesitter.stop()
+ endif
augroup END
" :h markdown, for vim default tpope/vim-markdown
@@ -213,8 +219,23 @@ map <leader>* /\*\*.*\*\*<CR>
" toggle markdown folding and re-edit current file
map <leader>m :call Md_toggle_fold()<CR>
-" default statusline:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
-set statusline+=%<
+" Consider vim need `set laststatus=2` to always show status line above
+" command line, vim default to 1, nvim default to 2
+set laststatus=2
+" Default statusline shows in the `:h statusline` first example:
+" set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
+"
+" nvim `:set statusline?` shows more stuffs, not sure why
+"
+" Before nvim 0.12.1, statusline+=%< as first works, now it needs = instead of
+" += else it will show two statuline. statusline+=%< as first seems still work
+" with new version of vim. It maybe because now nvim `:set statusline?` is not
+" empty but at vim it is empty. Also note `set statusline=` at first will not
+" work for nvim 0.12.1, it will not set statusline as empty, see:
+" https://github.com/neovim/neovim/issues/38670#issuecomment-4168169676
+" https://github.com/neovim/neovim/issues/33576
+" https://github.com/neovim/neovim/pull/33036
+set statusline=%<
set statusline+=%f " %F or 1CTRL+G to show full path
set statusline+=\ %m
set statusline+=%=
diff --git a/home/xyz/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js b/home/xyz/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js
index 892a9f65..7412e911 100644
--- a/home/xyz/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js
+++ b/home/xyz/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js
@@ -69,6 +69,12 @@ user_pref("media.autoplay.default", 5);
// https://wiki.archlinux.org/title/Firefox#Hardware_video_acceleration
user_pref("gfx.webrender.all", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
+// disable av1 because my GPU can't hardware decode it, and youtube always
+// gives me av1 video and lags due to high CPU load, but it has drawbacks of
+// some webistes only provide av1 video will unable to load it and can't even
+// software decode it, more see:
+// https://www.reddit.com/r/firefox/comments/1rnogf8/comment/o9dlevm
+user_pref("media.av1.enabled", false);
// arkenfox user.js new verison 140 changed those from true to false, but I'm
// used to the old behavior, so I changed them back. The first three settings