Browse Source

Update

red-hat-laptop
Kevin Mok 6 years ago
parent
commit
8dd7e28ad0
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 1
      .gitignore
  2. 4
      dot_config/chezmoi/chezmoi.toml.tmpl
  3. 25
      dot_config/i3/config
  4. 2
      dot_config/i3blocks/scripts/executable_temperature
  5. 7
      dot_config/private_fish/config.fish
  6. 2
      dot_config/private_fish/private_functions/scan-history.fish
  7. 13
      dot_config/ranger/rc.conf
  8. 16
      dot_vimrc
  9. 2
      dot_zshrc
  10. 31
      key_aliases.tmpl
  11. 6
      key_dirs.tmpl
  12. 10
      key_files.tmpl
  13. 5
      txt/exclude-dirs-backup.txt
  14. 12
      txt/nzxt-aur.txt
  15. 10
      txt/nzxt-pkgs.txt
  16. 2
      txt/todo.md

1
.gitignore

@ -0,0 +1 @@
commit-msg.txt

4
dot_config/chezmoi/chezmoi.toml.tmpl

@ -0,0 +1,4 @@
sourceDir = "{{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config"
[data]
gui = true

25
dot_config/i3/config

@ -3,7 +3,7 @@
set $browser "firefox"
# set $browser "chromium"
set $def_term "urxvt"
set $scripts_path "/home/kevin/linux-config/scripts"
set $scripts_path "/home/kevin/scripts"
exec redshift -O 2000
# exec redshift -O 3000
# random bg
@ -37,7 +37,7 @@ bindsym control+Return exec $def_term
bindsym Mod4+a exec studio
bindsym Mod4+b layout tabbed; exec zathura
bindsym Mod4+c exec $browser
bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
# bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
bindsym Mod4+f exec firefox
bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard
@ -237,13 +237,16 @@ assign [class="Steam"] $ws5
bindsym $mod+F5 workspace $ws5; exec $browser
bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam
bindsym Mod4+t workspace $ws5; exec thunderbird
bindsym Mod4+5 workspace $ws5; exec cd ~/coding/ada-mario-prep && godot -e
for_window [class="ada-mario-prep"] floating enable
for_window [class="Move_mouse_with_head"] floating enable
set $ws6 "6 "
workspace $ws6 output $samsung
assign [class="Slack"] $ws6
bindsym Mod4+d workspace $ws6; exec discord
bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home
# bindsym Mod4+k workspace $ws6; exec slack
bindsym Mod4+k workspace $ws6; exec slack
set $ws7 "7 "
# set $ws7 "7 📤"
@ -305,10 +308,10 @@ bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym Mod4+1 workspace $ws11
bindsym Mod4+2 workspace $ws12
bindsym Mod4+3 workspace $ws13
bindsym Mod4+4 workspace $ws14
bindsym Mod4+5 workspace $ws15
# bindsym Mod4+2 workspace $ws12
# bindsym Mod4+3 workspace $ws13
# bindsym Mod4+4 workspace $ws14
# bindsym Mod4+5 workspace $ws15
# }}} ws bindings #
# move container to ws {{{ #
@ -431,8 +434,8 @@ bar {
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
}
tray_output none
# status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
# status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
output $benq
wheel_up_cmd nop
wheel_down_cmd nop
@ -456,8 +459,8 @@ bar {
active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
}
# status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf
status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
status_command i3blocks -c ~/.config/i3blocks/sam-i3blocks.conf
# status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
tray_output none
wheel_up_cmd nop
wheel_down_cmd nop

2
dot_config/i3blocks/scripts/executable_temperature

@ -3,5 +3,5 @@
. "/home/kevin/.cache/wal/colors.sh"
temps="$(sensors | rg 'temp1:.*' | awk '{ print $2 }' | rg -o '\d{2}' | \
sed 's/$/°C/' | tr '\n' ' ' | xargs)"
sort -r | sed 's/$/°C/' | tr '\n' ' ' | xargs)"
printf "%s\n\n%s\n" "$temps" "$color7"

7
dot_config/private_fish/config.fish

@ -23,8 +23,8 @@ bind \cr forward-word
chezmoi apply
/home/kevin/scripts/sync-shortcuts
source /home/kevin/.config/fish/key_abbr.fish
# set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions"
set -U fish_fxn_dir "/home/kevin/.config/fish/functions"
set -U fish_fxn_dir "/home/kevin/linux-config/dot_config/private_fish/private_functions"
# set -U fish_fxn_dir "/home/kevin/.config/fish/functions"
abbr ff "cd $fish_fxn_dir"
for fxn in (find $fish_fxn_dir -name '*.fish')
source $fxn
@ -45,6 +45,9 @@ set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site"
set -x PATH $PATH /home/kevin/scripts /home/kevin/scripts/colors /home/kevin/go/bin
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
set -x PASSWORD_STORE_CLIP_TIME 120
set -xU XSET_RATE 90
set -xU XSET_DELAY 200

2
dot_config/private_fish/private_functions/scan-history.fish

@ -1,7 +1,7 @@
function scan-history
sudo systemctl start postgresql.service
# and systemctl status postgresql.service
and source $spv_dir/src/api-keys.sh
and source $spv_dir/src/scripts/api-keys.sh
and $spv_dir/src/scripts/update-history.sh
and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1
end

13
dot_config/ranger/rc.conf

@ -365,7 +365,6 @@ map gm cd /media
map gM cd /mnt
map gs cd /srv
map gp cd /tmp
# map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
@ -421,7 +420,8 @@ map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map gr fzf_select
# map gr fzf_select
map rg fzf_select
map n search_next
map N search_next forward=False
map ct search_next order=tag
@ -677,10 +677,10 @@ map rr source ~/.config/ranger/rc.conf
# backgrounds {{{ #
map w shell /usr/bin/wal -i %f
map bde shell mv %f dim/editing
map bdn shell mv %f dim/non-editing
map bbe shell mv %f bright/editing
map bbn shell mv %f bright/non-editing
map bde shell mv %f /home/kevin/Pictures/Backgrounds/dim/editing
map bdn shell mv %f /home/kevin/Pictures/Backgrounds/dim/non-editing
map bbe shell mv %f /home/kevin/Pictures/Backgrounds/bright/editing
map bbn shell mv %f /home/kevin/Pictures/Backgrounds/bright/non-editing
map be shell mv %f editing
map bn shell mv %f non-editing
@ -695,7 +695,6 @@ map zr shell unzip %f && rm %f
map e. open_with evince f
map v. shell $EDITOR %f
# map gr fzf_select
source /home/kevin/.config/ranger/key_mappings.conf
map dg shell dragon-drag-and-drop -a -x %p

16
dot_vimrc

@ -26,7 +26,7 @@ set timeoutlen=350
set tw=75
set undodir=~/.vim/undo
set undofile
set updatetime=2000
set updatetime=1000
autocmd VimResized * wincmd =
filetype plugin on
@ -52,14 +52,17 @@ autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set
" autocmd BufNewFile,BufRead *.md set filetype=markdown
" autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0
autocmd BufNewFile,BufRead *.gd set expandtab!
autocmd Filetype markdown map <F8> :LivedownToggle<CR>
autocmd Filetype markdown inoremap <Tab> <Esc>>>A
autocmd Filetype markdown nnoremap <Tab> <Esc>>>A
autocmd Filetype markdown inoremap <S-Tab> <Esc><<A
autocmd Filetype markdown inoremap > <Esc>>>A
autocmd Filetype markdown inoremap >> >
autocmd FileType markdown,tex,text set spell spelllang=en_us
autocmd Filetype javascript set updatetime=1000
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
autocmd Filetype json set foldmethod=marker
autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
autocmd FileType tex set updatetime=3000
autocmd FileType tex map <F8> :VimtexCompile<CR>
autocmd VimEnter *.tex VimtexCompile
autocmd VimLeave *.tex !tex-clean %:p
@ -179,6 +182,7 @@ Plug 'scrooloose/nerdcommenter'
" add quotes/brackets around chunks of text easily
Plug 'tpope/vim-surround'
nmap S ys
" navigate around file easily and precisely
Plug 'easymotion/vim-easymotion'
@ -220,9 +224,10 @@ Plug 'tpope/vim-fugitive'
" auto reload file
Plug 'djoshea/vim-autoread'
" Plug 'mustache/vim-mustache-handlebars'
" Plug 'trapd00r/vim-syntax-vidir-ls'
Plug 'calviken/vim-gdscript3'
call plug#end()
" }}} vim-plug "
" colorscheme gotham256
@ -232,7 +237,6 @@ colorscheme wal
nnoremap > >>
nnoremap < <<
inoremap >> <Esc>>>A
inoremap << <Esc><<A
" function keys {{{ "
@ -266,7 +270,7 @@ nnoremap <C-w> <C-W>|
let mapleader="\<Space>"
" find alias
nnoremap <leader>a /^ <Left>
nnoremap <leader>a / <Left>
" replace until end of line
nnoremap <leader>c c$
" delete entire buffer

2
dot_zshrc

@ -96,7 +96,6 @@ plugins=(
# }}} default #
source $ZSH/oh-my-zsh.sh
source ~/linux-config/aliases/zsh_aliases
# ZSH_THEME="bira"
# ZSH_THEME="miloshadzic"
@ -171,7 +170,6 @@ fi
# # }}} autoreload zsh aliases #
source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export GPG_TTY=$(tty)

31
key_aliases.tmpl

@ -2,9 +2,10 @@
# system
# clear screen
cs "printf '\033c'"
c "printf '\033c'"
hst "history"
nf "printf '\033c' && neofetch | lolcat"
## nf "printf '\033c' && neofetch | lolcat"
nf "printf '\033c' && neofetch"
fi "fish"
# reload urxvt
ru "xrdb ~/.Xresources"
@ -49,7 +50,7 @@
udub "udisksctl unmount -b /dev/sdc2"
tc "touch"
vdr "vidir"
vd "vidir --verbose"
# directory-related #
ls "lsd"
@ -109,15 +110,17 @@
tri "trizen -S --noedit"
# install
ya "yay -S --answerdiff=N --answeredit=N"
ya "yay -S --answerclean=None --answerdiff=None --answeredit=None"
# info
yaq "yay -Qi"
# remove
yar "yay -Rns"
# sync
yaud "yay -Sy"
# sync and download
yaugd "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None"
# sync and update
yaug "yay -Syu"
yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None"
# export packages
xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && yay -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt "
@ -145,7 +148,11 @@ chr "google-chrome"
gpe "gpg --encrypt --recipient"
htc "htop -s PERCENT_CPU"
htm "htop -s PERCENT_MEM"
kd "killall Discord && killall Discord"
i "sxiv"
ig "sxiv -a"
it "sxiv -t *"
ka "killall"
kd "killall Discord && killall Discord && killall slack"
kt "killall thunderbird"
mp "mpv --volume=50"
mra "man ranger"
@ -157,13 +164,10 @@ chr "google-chrome"
r "ranger"
rx "redshift -x"
sn "sudo nvim"
sx "sxiv"
sxa "sxiv -a"
sxt "sxiv -t *"
vmd "vimdiff"
wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh"
zt "zathura --fork"
z "zathura --fork"
lz "unzip -l"
@ -193,6 +197,7 @@ chr "google-chrome"
ww "watson log"
# wlm "watson log --project coding --tag mfs"
wr "watson report --day"
wra "watson report --all"
wrw "watson report"
wre "watson restart"
wree "watson restart && watson edit"
@ -302,7 +307,7 @@ rgt "rg TODO"
ze "chezmoi edit"
zp "chezmoi -v apply"
ssv "bash ../bin/activate && python manage.py runserver"
ssv "source ../bin/activate.fish && python manage.py runserver"
# spotify-lib-vis #
# start spv server outside dir
# open spv db in psql
@ -342,7 +347,9 @@ rgt "rg TODO"
ss "ssh {{ .chezmoi.group }}@192.168.0.100"
ssb "ssh-bandit"
rt "python ~/coding/rt-scraper/rt-scraper.py"
rt "python ~/coding/rt-scraper/!rt-scraper.py"
med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head"
# coding projs #
wlf "watson log --all --tag=final"

6
key_dirs.tmpl

@ -2,12 +2,12 @@
# sys *
bg {{ .chezmoi.homedir }}/Pictures/Backgrounds
c {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config
cf {{ .chezmoi.homedir }}/.config
d {{ .chezmoi.homedir }}/Downloads
D {{ .chezmoi.homedir }}/Documents
fo {{ .chezmoi.homedir }}/.config/fish
k {{ .chezmoi.homedir }}/
lc {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config
lf /mnt/{{ .chezmoi.os }}-files
lfv /mnt/{{ .chezmoi.os }}-files/Videos
me /run/media/{{ .chezmoi.group }}
@ -20,10 +20,13 @@
b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16
# cdn *
2d {{ .chezmoi.homedir }}/coding/godot-demos/2d-plat
ad {{ .chezmoi.homedir }}/coding/ada-mario-prep
cn {{ .chezmoi.homedir }}/coding
ib {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/i3blocks/.config/i3blocks/scripts
j {{ .chezmoi.homedir }}/Documents/journal
lh {{ .chezmoi.homedir }}/Documents/listening-history
mm {{ .chezmoi.homedir }}/coding/move-mouse-with-head
ms {{ .chezmoi.homedir }}/coding/mf-site
mh {{ .chezmoi.homedir }}/coding/mf-site/layouts
# mg {{ .chezmoi.homedir }}/coding/best-mf-site-personal
@ -31,6 +34,7 @@ b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16
sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/scripts
snp {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips
sv {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src
svg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/graphs/static/graphs/scripts
swa {{ .chezmoi.homedir }}/.local/share/nvim/swap
tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt
wd {{ .chezmoi.homedir }}/.config/watson

10
key_files.tmpl

@ -3,15 +3,15 @@
# sys *
3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config
a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl
d ~/{{ .chezmoi.os }}-config/key_dirs.tmpl
dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl
f ~/{{ .chezmoi.os }}-config/key_files.tmpl
i {{ .chezmoi.homedir }}/.config/i3blocks/i3blocks.conf
p {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/pacman-pkgs/pacman-pkgs.txt
r {{ .chezmoi.homedir }}/.config/ranger/rc.conf
r {{ .chezmoi.homedir }}/linux-config/dot_config/ranger/rc.conf
sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf
ss {{ .chezmoi.homedir }}/.shortcuts
u {{ .chezmoi.homedir }}/.Xresources
v {{ .chezmoi.homedir }}/.vimrc
v {{ .chezmoi.homedir }}/linux-config/dot_vimrc
x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish
y {{ .chezmoi.homedir }}/.zshrc
z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases
@ -19,6 +19,7 @@
cm /tmp/commit-msg.txt
# cdn *
bid {{ .chezmoi.homedir }}/coding/project-ideas/blog.md
ci {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/ideas.md
cmd ./commit-msg.txt
hlg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/api/management/commands/update-history.log
@ -31,7 +32,8 @@ cm /tmp/commit-msg.txt
mi {{ .chezmoi.homedir }}/coding/mf-site/ideas.md
ne {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/neofetch/config.conf
re README.md
td todo.md
t todo.md
tt txt/todo.md
tm {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
wh {{ .chezmoi.homedir }}/Documents/journal/todo/work-habit.md
wt {{ .chezmoi.homedir }}/.config/watson/state.tmp

5
txt/exclude-dirs-backup.txt

@ -1,8 +1,9 @@
/home/kevin/.cache
/home/kevin/.local/share/Steam/steamapps/common
/home/kevin/.ACEStream
/home/kevin/.android
/home/kevin/.AndroidStudio3.3
/home/kevin/Android
/home/kevin/.cache
/home/kevin/.local/share/Steam/steamapps/common
/lost+found
/mnt
/proc

12
txt/nzxt-aur.txt

@ -1,6 +1,9 @@
acestream-engine
acestream-player
android-studio
aurvote
bear
browserpass
chezmoi
chromium-widevine
cliqz-bin
curseradio-git
@ -8,10 +11,12 @@ discord
dragon-drag-and-drop-git
ffcast
flashplugin-focusfix
godot-bin
heroku-cli
htop-vim-git
i3blocks-git
insomnia
libavutil-52
linux-kevin
linux-kevin-headers
linux-nzxt
@ -27,8 +32,10 @@ pipes.sh
pycp
qdirstat
riot-desktop-git
robo3t-bin
rxvt-unicode-pixbuf
sc-im
slack-desktop-dark
spotify
spotify-now-git
st
@ -37,6 +44,8 @@ systemd-numlockontty
texlive-local-algorithmicx
texlive-local-algorithms
texlive-local-biblatex
texlive-local-biblatex-apa
texlive-local-csquotes
texlive-local-enumitem
texlive-local-ifmtarg
texlive-local-logreq
@ -55,5 +64,6 @@ vidir
watson
weechat-vimode-git
wego
wpa_actiond
yad
yay

10
txt/nzxt-pkgs.txt

@ -1,4 +1,5 @@
alsa-utils
android-file-transfer
apache
arch-install-scripts
asp
@ -11,7 +12,9 @@ biber
bison
bookworm
broadcom-wl
browserpass
bzip2
calcurse
certbot
chromium
cloc
@ -42,6 +45,7 @@ firefox
fish
flashplugin
flex
fortune-mod
fzf
gawk
gcc
@ -54,6 +58,7 @@ glibc
grep
grub
gzip
hdf5
hexyl
highlight
hugo
@ -117,6 +122,7 @@ procps-ng
psmisc
pulseaudio
python-dbus
python-numpy
python-pip
python-pywal
python-setuptools
@ -146,6 +152,7 @@ sysfsutils
sysstat
systemd-sysvcompat
tar
termdown
texinfo
texlive-core
the_silver_searcher
@ -167,15 +174,16 @@ valgrind
vi
vim
virtualbox
vtk
w3m
which
wireless_tools
wkhtmltopdf
wpa_actiond
wpa_supplicant
xautomation
xbindkeys
xclip
xdotool
xf86-input-evdev
xf86-input-keyboard
xf86-input-mouse

2
txt/ideas.md → txt/todo.md

@ -1,9 +1,9 @@
# chezmoi
- merge laptop
- root
- shortcut script
- fish config template
- nvim setup
- merge laptop
- home server
- lab
- template bash file
Loading…
Cancel
Save