Merge branch 'master' of gitee.com:klesh/dotfiles

This commit is contained in:
Klesh Wong 2020-10-09 09:40:58 +08:00
commit a9c07a3d87
8 changed files with 40 additions and 20 deletions

View File

@ -12,6 +12,7 @@ case "$PM" in
fonts-cascadia-code \ fonts-cascadia-code \
fonts-wqy-microhei \ fonts-wqy-microhei \
fonts-symbola \ fonts-symbola \
fonts-dejavu-core \
gucharmap gucharmap
# network manager # network manager
sudo apt install \ sudo apt install \
@ -31,9 +32,10 @@ case "$PM" in
gsfonts \ gsfonts \
ttf-cascadia-code \ ttf-cascadia-code \
wqy-microhei \ wqy-microhei \
ttf-dejavu \
gucharmap gucharmap
# install symbola for plain emojis(no-color) for st # install symbola for plain emojis(no-color) for st
yay -S ttf-symbola-free yay -S --needed ttf-symbola-free
# clipboard # clipboard
sudo pacman -S --needed \ sudo pacman -S --needed \
xclip xsel xclip xsel
@ -70,6 +72,7 @@ install-nerdfont () {
https://gitee.com/klesh/nerd-fonts.git \ https://gitee.com/klesh/nerd-fonts.git \
$LOCAL_REPO_PATH $LOCAL_REPO_PATH
sudo 7z x -x!'*Windows*' -aoa $LOCAL_REPO_PATH/$NAME -o/usr/local/share/fonts sudo 7z x -x!'*Windows*' -aoa $LOCAL_REPO_PATH/$NAME -o/usr/local/share/fonts
sudo chmod +x /usr/local/share/fonts
echo $LOCAL_REPO_PATH echo $LOCAL_REPO_PATH
rm -rf $LOCAL_REPO_PATH rm -rf $LOCAL_REPO_PATH
} }

View File

@ -3,11 +3,11 @@
<fontconfig> <fontconfig>
<match target="pattern"> <match target="pattern">
<test qual="any" name="family"><string>serif</string></test> <test qual="any" name="family"><string>serif</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Serif CJK SC</string></edit> <edit name="family" mode="assign" binding="same"><string>DejaVu Serif</string></edit>
</match> </match>
<match target="pattern"> <match target="pattern">
<test qual="any" name="family"><string>sans-serif</string></test> <test qual="any" name="family"><string>sans-serif</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Sans CJK SC</string></edit> <edit name="family" mode="assign" binding="same"><string>URW Gothic</string></edit>
</match> </match>
<match target="pattern"> <match target="pattern">
<test qual="any" name="family"><string>monospace</string></test> <test qual="any" name="family"><string>monospace</string></test>

View File

@ -166,3 +166,25 @@ let g:ctrlp_user_command = ['.git', 'git ls-files -co --exclude-standard']
color gruvbox color gruvbox
set background=dark set background=dark
highlight Normal ctermbg=None highlight Normal ctermbg=None
" ==== NERDCommenter for vue ====
let g:ft = ''
fu! NERDCommenter_before()
if &ft == 'vue'
let g:ft = 'vue'
let stack = synstack(line('.'), col('.'))
if len(stack) > 0
let syn = synIDattr((stack)[0], 'name')
if len(syn) > 0
let syn = tolower(syn)
exe 'setf '.syn
endif
endif
endif
endfu
fu! NERDCommenter_after()
if g:ft == 'vue'
setf vue
g:ft
endif
endfu

View File

@ -620,5 +620,7 @@ def_key "f"
change_browse_mode change_browse_mode
def_key "x" def_key "x"
delete_playlist_items delete_playlist_items
def_key "X"
delete_browser_items
def_key "P" def_key "P"
show_playlist show_playlist

View File

@ -364,7 +364,7 @@ media_library_albums_split_by_date = no
# #
#generate_win32_compatible_filenames = yes #generate_win32_compatible_filenames = yes
# #
#allow_for_physical_item_deletion = no allow_for_physical_item_deletion = yes
# #
## ##
## Note: If you set this variable, ncmpcpp will try to get info from last.fm in ## Note: If you set this variable, ncmpcpp will try to get info from last.fm in

View File

@ -349,7 +349,7 @@ handle_fallback() {
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )" MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
drop_bigsize #drop_bigsize
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}" handle_image "${MIMETYPE}"
fi fi

View File

@ -10,6 +10,7 @@ $HOME/.config/dunst/launch.sh
$HOME/.config/dwm/dwmbar $HOME/.config/dwm/dwmbar
# setup screen locker # setup screen locker
xset s 300
killall xss-lock killall xss-lock
xss-lock --ignore-sleep (which slock) & xss-lock --ignore-sleep (which slock) &

View File

@ -55,6 +55,8 @@ cd ~/Projects/suckless/dwm && sudo rm -f config.h && sudo make clean install
# config xinit to start for dwm # config xinit to start for dwm
rm ~/.xinitrc rm ~/.xinitrc
cat <<EOT > ~/.xinitrc cat <<EOT > ~/.xinitrc
#!/bin/sh
export QT_QPA_PLATFORMTHEME="qt5ct" export QT_QPA_PLATFORMTHEME="qt5ct"
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
@ -62,24 +64,14 @@ export XMODIFIERS="@im=ibus"
export QT_IM_MODULE=ibus export QT_IM_MODULE=ibus
export GTK_IM_MODULE=xim export GTK_IM_MODULE=xim
# setup gnome keyring
# xrandr --setprovideroutputsource modesetting NVIDIA-0
# xrandr --auto
xrdb ~/.Xresources
# auto lock after 300 seconds
xset s 300
systemd-lock-handler /usr/local/bin/slock
#xsetroot -cursor_name left_ptr
dbus-update-activation-environment --systemd DISPLAY dbus-update-activation-environment --systemd DISPLAY
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) export SSH_AUTH_SOCK=$(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
# load monitors profile
autorandr --change --force autorandr --change --force
# restart dwm if it existed without error
while :; do while :; do
ssh-agent dwm 2>/tmp/dwm.log || break ssh-agent dwm 2>/tmp/dwm.log || break
done done