Update multiple things

This commit is contained in:
Justin Lin
2022-08-07 10:18:14 +08:00
parent 8275315dc9
commit 4557f2e97f
16 changed files with 140 additions and 24 deletions

View File

@@ -38,4 +38,13 @@
<family>Braille</family>
</prefer>
</alias>
<!-- REAPER fonts patch -->
<match target="pattern">
<test name="prgname">
<string>reaper</string>
</test>
<edit name="family" mode="assign">
<string>Noto Sans CJK TC</string>
</edit>
</match>
</fontconfig>

View File

@@ -1,12 +1,8 @@
[Default Applications]
# xdg-open will use these settings to determine how to open filetypes.
# These .desktop entries can also be seen and changed in ~/.local/share/applications/
text/x-shellscript=text.desktop;
x-scheme-handler/magnet=torrent.desktop;
application/x-bittorrent=torrent.desktop;
x-scheme-handler/mailto=mail.desktop;
x-scheme-handler/mailto=userapp-Thunderbird-9TU2N1.desktop
text/plain=text.desktop;
application/postscript=pdf.desktop;
application/pdf=pdf.desktop;
@@ -17,3 +13,12 @@ application/rss+xml=rss.desktop
video/x-matroska=video.desktop
x-scheme-handler/lbry=lbry.desktop
inode/directory=file.desktop
message/rfc822=userapp-Thunderbird-9TU2N1.desktop
x-scheme-handler/mid=userapp-Thunderbird-9TU2N1.desktop
x-scheme-handler/notion=notion-app.desktop
x-scheme-handler/tg=userapp-Telegram Desktop-6L1RO1.desktop
[Added Associations]
x-scheme-handler/mailto=userapp-Thunderbird-9TU2N1.desktop;
x-scheme-handler/mid=userapp-Thunderbird-9TU2N1.desktop;
x-scheme-handler/tg=userapp-Telegram Desktop-6L1RO1.desktop;

View File

@@ -17,19 +17,29 @@ Plug 'vimwiki/vimwiki'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-commentary'
Plug 'ap/vim-css-color'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Plug 'leafOfTree/vim-vue-plugin'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
set title
set bg=light
set go=a
set mouse=a
set nohlsearch
set clipboard+=unnamedplus
set noshowmode
set noruler
set laststatus=0
set noshowcmd
set tabstop=4 expandtab softtabstop=4 shiftwidth=4
set scrolloff=5
" Tab
nnoremap H gT
nnoremap L gt
" Rename
nnoremap <F2> :GoRename<CR>
" Some basics:
nnoremap c "_c
@@ -59,7 +69,8 @@ set noshowcmd
let NERDTreeBookmarksFile = stdpath('data') . '/NERDTreeBookmarks'
else
let NERDTreeBookmarksFile = '~/.vim' . '/NERDTreeBookmarks'
endif
endif" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" vimling:
nm <leader><leader>d :call ToggleDeadKeys()<CR>
@@ -99,7 +110,7 @@ set noshowcmd
" Ensure files are read as what I want:
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
map <leader>v :VimwikiIndex<CR>
let g:vimwiki_list = [{'path': '~/.local/share/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
let g:vimwiki_list = [{'path': '~/Notes', 'syntax': 'markdown', 'ext': '.md'}]
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
autocmd BufRead,BufNewFile *.tex set filetype=tex
@@ -114,11 +125,11 @@ set noshowcmd
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
autocmd BufWritePre * let currPos = getpos(".")
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritePre * %s/\n\+\%$//e
autocmd BufWritePre *.[ch] %s/\%$/\r/e
autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
" autocmd BufWritePre * let currPos = getpos(".")
" autocmd BufWritePre * %s/\s\+$//e
" autocmd BufWritePre * %s/\n\+\%$//e
" autocmd BufWritePre *.[ch] %s/\%$/\r/e
" autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
" When shortcut files are updated, renew bash and ranger configs with new material:
autocmd BufWritePost bm-files,bm-dirs !shortcuts
@@ -157,3 +168,7 @@ nnoremap <leader>h :call ToggleHiddenAll()<CR>
" if typed fast without the timeout.
source ~/.config/nvim/shortcuts.vim
au filetype go inoremap <buffer> . .<C-x><C-o>
inoremap {<CR> {<CR>}<ESC>O
source ~/.config/nvim/coc.vim
command! -nargs=0 Prettier :CocCommand prettier.forceFormatDocument

View File

@@ -21,9 +21,9 @@ context.properties = {
core.name = pipewire-0 # core name and socket name
## Properties for the DSP configuration.
#default.clock.rate = 48000
default.clock.rate = 48000
#default.clock.allowed-rates = [ 48000 ]
#default.clock.quantum = 1024
default.clock.quantum = 128
#default.clock.min-quantum = 32
#default.clock.max-quantum = 8192
#default.video.width = 640

View File

@@ -1,5 +1,4 @@
#!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
@@ -21,6 +20,8 @@ alias \
yt="yt-dlp --embed-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner"
xclip="xclip -selection clipboard"
dig="drill"
# Colorize commands when possible.
alias \

View File

@@ -12,3 +12,8 @@ pp ${XDG_PICTURES_DIR:-$HOME/Pictures}
sc $HOME/.local/bin
src $HOME/src
vv ${XDG_VIDEOS_DIR:-$HOME/Videos}
idx $HOME/src/indexer
lg $HOME/Notes/ledger
api $HOME/src/api
app $HOME/src/app-like-co
sp $HOME/src/likenft-sample

View File

@@ -5,6 +5,7 @@ bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files # This file, a list of bookm
bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs # A list of bookmarked directories similar to this file
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources # Colors, themes and variables for X11
cfb ~/.local/src/dwmblocks/config.h # dwmblocks: the status bar for dwm
lgv $HOME/Notes/ledger/wancat.txt
# These do not update automatically, but on the next new instance of a program:

View File

@@ -6,7 +6,7 @@
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}:~/.local/share/go/bin"
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}:$HOME/.local/share/go/bin"
unsetopt PROMPT_SP

36
.config/shell/shortcutrc Normal file
View File

@@ -0,0 +1,36 @@
# vim: filetype=sh
alias cac="cd /home/wancat/.cache && ls -a" \
cf="cd /home/wancat/.config && ls -a" \
D="cd /home/wancat/Downloads && ls -a" \
d="cd /home/wancat/Documents && ls -a" \
dt="cd /home/wancat/.local/share && ls -a" \
rr="cd /home/wancat/.local/src && ls -a" \
h="cd /home/wancat && ls -a" \
m="cd /home/wancat/Music && ls -a" \
mn="cd /mnt && ls -a" \
pp="cd /home/wancat/Pictures && ls -a" \
sc="cd /home/wancat/.local/bin && ls -a" \
src="cd /home/wancat/src && ls -a" \
vv="cd /home/wancat/Videos && ls -a" \
idx="cd /home/wancat/src/indexer && ls -a" \
lg="cd /home/wancat/Notes/ledger && ls -a" \
api="cd /home/wancat/src/api && ls -a" \
app="cd /home/wancat/src/app-like-co && ls -a" \
sp="cd /home/wancat/src/likenft-sample && ls -a" \
bf="$EDITOR /home/wancat/.config/shell/bm-files" \
bd="$EDITOR /home/wancat/.config/shell/bm-dirs" \
cfx="$EDITOR /home/wancat/.config/x11/xresources" \
cfb="$EDITOR ~/.local/src/dwmblocks/config.h" \
lgv="$EDITOR /home/wancat/Notes/ledger/wancat.txt" \
cfv="$EDITOR /home/wancat/.config/nvim/init.vim" \
cfz="$EDITOR /home/wancat/.config/zsh/.zshrc" \
cfa="$EDITOR /home/wancat/.config/shell/aliasrc" \
cfp="$EDITOR /home/wancat/.config/shell/profile" \
cfm="$EDITOR /home/wancat/.config/mutt/muttrc" \
cfn="$EDITOR /home/wancat/.config/newsboat/config" \
cfu="$EDITOR /home/wancat/.config/newsboat/urls" \
cfmb="$EDITOR /home/wancat/.config/ncmpcpp/bindings" \
cfmc="$EDITOR /home/wancat/.config/ncmpcpp/config" \
cfl="$EDITOR /home/wancat/.config/lf/lfrc" \
cfL="$EDITOR /home/wancat/.config/lf/scope" \
cfX="$EDITOR /home/wancat/.config/sxiv/exec/key-handler" \

View File

@@ -0,0 +1,35 @@
hash -d cac=/home/wancat/.cache
hash -d cf=/home/wancat/.config
hash -d D=/home/wancat/Downloads
hash -d d=/home/wancat/Documents
hash -d dt=/home/wancat/.local/share
hash -d rr=/home/wancat/.local/src
hash -d h=/home/wancat
hash -d m=/home/wancat/Music
hash -d mn=/mnt
hash -d pp=/home/wancat/Pictures
hash -d sc=/home/wancat/.local/bin
hash -d src=/home/wancat/src
hash -d vv=/home/wancat/Videos
hash -d idx=/home/wancat/src/indexer
hash -d lg=/home/wancat/Notes/ledger
hash -d api=/home/wancat/src/api
hash -d app=/home/wancat/src/app-like-co
hash -d sp=/home/wancat/src/likenft-sample
hash -d bf=/home/wancat/.config/shell/bm-files
hash -d bd=/home/wancat/.config/shell/bm-dirs
hash -d cfx=/home/wancat/.config/x11/xresources
hash -d cfb=~/.local/src/dwmblocks/config.h
hash -d lgv=/home/wancat/Notes/ledger/wancat.txt
hash -d cfv=/home/wancat/.config/nvim/init.vim
hash -d cfz=/home/wancat/.config/zsh/.zshrc
hash -d cfa=/home/wancat/.config/shell/aliasrc
hash -d cfp=/home/wancat/.config/shell/profile
hash -d cfm=/home/wancat/.config/mutt/muttrc
hash -d cfn=/home/wancat/.config/newsboat/config
hash -d cfu=/home/wancat/.config/newsboat/urls
hash -d cfmb=/home/wancat/.config/ncmpcpp/bindings
hash -d cfmc=/home/wancat/.config/ncmpcpp/config
hash -d cfl=/home/wancat/.config/lf/lfrc
hash -d cfL=/home/wancat/.config/lf/scope
hash -d cfX=/home/wancat/.config/sxiv/exec/key-handler

View File

@@ -3,12 +3,12 @@
# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.
xrandr --dpi 192 # Set DPI. User may want to use a larger number for larger screens.
xrandr --dpi 144 -r 75 # Set DPI. User may want to use a larger number for larger screens.
setbg & # set the background with the `setbg` script
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
remaps & # run the remaps script, switching caps/esc and more; check it for more info
autostart="mpd xcompmgr dunst unclutter pipewire"
autostart="mpd xcompmgr dunst unclutter pipewire wireplumber"
for program in $autostart; do
pidof -s "$program" || "$program" &

View File

@@ -2,7 +2,7 @@
*.alpha: 0.9
!! Set a default font and font size as below:
*.font: monospace:size=10:antialias=true
*.font: monospace:size=6:antialias=true
/* name dark light */
/* black 0 8 */
@@ -74,7 +74,7 @@
/* *.color14: #0f7ddb */
/* *.color7: #d6dbe5 */
/* *.color15: #ffffff */
/* *.colorBD: #d6dbe5 */
/* *.colorbd: #d6dbe5 */
/* ! base16 */
/* *.color0: #181818 */

View File

@@ -20,6 +20,10 @@ HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zstyle -e ':completion:*:hosts' hosts 'reply=(
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//,/ }
${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
)'
zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
@@ -80,3 +84,6 @@ bindkey -M visual '^[[P' vi-delete
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey "^[[H" beginning-of-line
bindkey "^[[4~" end-of-line
source /usr/share/nvm/init-nvm.sh