Browse Source

Update, merge with laptop

red-hat-laptop
Kevin Mok 6 years ago
parent
commit
fc99b8c1e1
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 3
      .chezmoiignore
  2. 52
      dot_config/fish/config.fish.tmpl
  3. 26
      dot_config/i3/config.tmpl
  4. 2
      dot_config/ranger/rc.conf.tmpl
  5. 61
      dot_vimrc.tmpl
  6. 4
      dot_xinitrc.tmpl
  7. 6
      key_aliases.tmpl
  8. 1
      key_files.tmpl
  9. 12
      txt/todo.md

3
.chezmoiignore

@ -5,7 +5,8 @@ README.md
.config/i3blocks/
.config/mpv/
.config/zathura/
scripts/
scripts/*
!scripts/sync-shortcuts
txt/
.gitconfig
.imwheelrc

52
dot_config/fish/config.fish.tmpl

@ -13,6 +13,32 @@ set -x GPG_TTY (tty)
# ]]] login to X #
# universal var's [[[ #
# spv
{{ if eq .chezmoi.fullHostname "nzxt" }}
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site"
{{ end }}
set -x PATH $PATH ~/scripts ~/scripts/colors ~/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
# causes xmodmap to have issues when opening terminal sometimes
# xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
{{ if and (eq .chezmoi.fullHostname "x1-carbon") (not (eq .chezmoi.username "root")) }}
xset r rate $XSET_DELAY $XSET_RATE
{{ end }}
# set -U BROWSER "chromium"
set -U BROWSER "firefox"
# ]]] universal var's #
# fish-specific [[[ #
fish_vi_key_bindings
@ -41,32 +67,6 @@ abbr f.. "cd ../.."
# ]]] fish-specific #
# universal var's [[[ #
# spv
{{ if eq .chezmoi.fullHostname "nzxt" }}
set -U spv_dir "~/coding/spotify-lib-vis"
set -U mfs_dir "~/coding/mf-site"
{{ end }}
set -x PATH $PATH ~/scripts ~/scripts/colors ~/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
# causes xmodmap to have issues when opening terminal sometimes
# xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
{{ if and (eq .chezmoi.fullHostname "x1-carbon") (not (eq .chezmoi.username "root")) }}
xset r rate $XSET_DELAY $XSET_RATE
{{ end }}
# set -U BROWSER "chromium"
set -U BROWSER "firefox"
# ]]] universal var's #
# fxn abbr's [[[ #
abbr ag "grep-aliases"

26
dot_config/i3/config.tmpl

@ -1,9 +1,14 @@
# startup [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
exec dunst
exec compton
exec imwheel
exec numlockx on
exec xbacklight -set 10
exec wal -i "$(/home/kevin/scripts/shuffler \"$HOME/Pictures/Backgrounds/dim/non-editing\")"
{{ end }}
exec --no-startup-id i3-msg 'workspace $ws2; exec $term'
# exec --no-startup-id i3-msg 'workspace $ws2; exec $term'
exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
# ]]] startup #
@ -13,16 +18,17 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
set $mod Mod1
# set $browser "firefox"
set $browser "chromium"
set $term "urxvt"
set $term_alt "st"
# set $term "st"
# set $term_alt "urxvt"
# set $term st
# set $term_alt urxvt
set $term urxvt
set $term_alt st
set $scripts_path "/home/kevin/scripts"
set $sch_dir "$HOME/Documents/School"
# app shortcuts [[[ #
bindsym Control+Return exec $term
bindsym Control+Shift+Return exec $term -A1
bindsym Control+$mod+Return exec $term_alt
# bindsym Control+$mod+Return exec st
# PROTIP: You can also dynamically set dmenu's colors this way:
@ -198,10 +204,17 @@ bindsym $mod+minus move workspace to output left
bindsym $mod+plus move workspace to output right
# move focused window
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
bindsym Control+Shift+h move left 50px
bindsym Control+Shift+j move down 50px
bindsym Control+Shift+k move up 50px
bindsym Control+Shift+l move right 50px
{{ else }}
bindsym Control+Shift+h move left
bindsym Control+Shift+j move down
bindsym Control+Shift+k move up
bindsym Control+Shift+l move right
{{ end }}
# split in horizontal orientation
bindsym $mod+b split h
@ -388,7 +401,6 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
# status bar [[[ #
# bar vars [[[ #
# set $sb_font Hack NF Bold
@ -422,6 +434,7 @@ bar {
font pango:$sb_font 17
{{ else }}
font pango:$sb_font 21
# font pango:$sb_font 19
{{ end }}
colors {
# 0 (transparent) -> 255 (opaque) in hex
@ -451,6 +464,7 @@ bar {
font pango:$sb_font 18
{{ else }}
font pango:$sb_font 25
# font pango:$sb_font 20
{{ end }}
# output $main
i3bar_command i3bar -t

2
dot_config/ranger/rc.conf.tmpl

@ -679,7 +679,7 @@ map rr source ~/.config/ranger/rc.conf
# backgrounds [[[ #
map w shell /usr/bin/wal -i %f
map w shell /usr/bin/wal -i %f && sudo ~/st/make-st.sh
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

61
dot_vimrc.tmpl

@ -36,7 +36,6 @@ autocmd VimResized * wincmd =
filetype plugin on
filetype indent on
syntax on
" au CursorHold * checktime
autocmd CursorHold * if !bufexists("[Command Line]") | checktime | endif
" cursor indicator [[[ "
@ -93,6 +92,7 @@ autocmd BufWritePost config.def.h silent !cd %:p:h; sudo rm config.h; sudo bear
autocmd BufRead config.def.h map <F10> :silent !cd %:p:h<CR>:!sudo rm config.h; sudo bear make install<CR>
autocmd BufRead config.def.h set updatetime=3000
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
autocmd VimLeave /etc/default/grub !sudo grub-mkconfig -o /boot/grub/grub.cfg
" autocmd BufWritePost key_* !sync-shortcuts
autocmd BufNewFile,BufRead key_* map <F1> :w<CR>:silent !sync-shortcuts<CR>
@ -240,6 +240,7 @@ Plug 'djoshea/vim-autoread'
Plug 'calviken/vim-gdscript3'
" display hex colors in Vim
Plug 'RRethy/vim-hexokinase'
Plug 'junegunn/goyo.vim'
" ]]] vim-plug "
" Mappings [[[ "
@ -253,33 +254,6 @@ nnoremap > >>
nnoremap < <<
inoremap << <Esc><<A
" function keys [[[ "
map <F3> :wa<CR>
map <F4> :xa<CR>
map <F5> :q!<CR>
map <F6> :qa!<CR>
map <F7> :AutoSaveToggle<CR>
" reload file
nnoremap <F9> :e<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
nnoremap <F11> :set paste<CR>"*p:set nopaste<CR>
" ]]] function keys "
map <S-Enter> O<ESC>
" swap text visually
vnoremap <C-P> <Esc>`.``gvP``P
ino <C-A> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
" splits [[[ "
nnoremap <C-Down> <C-W><C-J>
nnoremap <C-Up> <C-W><C-K>
nnoremap <C-Right> <C-W><C-L>
nnoremap <C-Left> <C-W><C-H>
" Maximize height/width.
nnoremap <C-g> <C-W>_
nnoremap <C-w> <C-W>|
" ]]] splits "
" leader mappings [[[ "
let mapleader="\<Space>"
@ -305,7 +279,8 @@ nnoremap <leader>fmm :set foldmethod=marker<CR> zM
" add marker foldmethod modeline
nnoremap <leader>fi :YcmCompleter FixIt<CR>
" find copied text
nnoremap <leader>ft /TODO<CR>
nnoremap <leader>ft :se ft?
nnoremap <leader>ftd /TODO<CR>
nnoremap <leader>g :YcmCompleter GoTo<CR>
" vimdiff split
nnoremap <leader>gd :Gvdiff
@ -365,6 +340,7 @@ nnoremap <leader>vv :vsp ~/.vimrc<CR>
" nnoremap <leader>y "+
" nnoremap <leader>Y "+Y
nnoremap <leader>y y$
nnoremap <leader>yo :Goyo<CR>
" yank entire buffer
nnoremap <leader>yg ggyG
" toggle fold
@ -372,6 +348,33 @@ nnoremap <leader>z za
" ]]] leader mappings "
" function keys [[[ "
map <F3> :wa<CR>
map <F4> :xa<CR>
map <F5> :q!<CR>
map <F6> :qa!<CR>
map <F7> :AutoSaveToggle<CR>
" reload file
nnoremap <F9> :e<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
nnoremap <F11> :set paste<CR>"*p:set nopaste<CR>
" ]]] function keys "
map <S-Enter> O<ESC>
" swap text visually
vnoremap <C-P> <Esc>`.``gvP``P
ino <C-A> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
" splits [[[ "
nnoremap <C-Down> <C-W><C-J>
nnoremap <C-Up> <C-W><C-K>
nnoremap <C-Right> <C-W><C-L>
nnoremap <C-Left> <C-W><C-H>
" Maximize height/width.
nnoremap <C-g> <C-W>_
nnoremap <C-w> <C-W>|
" ]]] splits "
" ]]] Mappings "
" Local Mappings [[[ "

4
dot_xinitrc → dot_xinitrc.tmpl

@ -6,6 +6,7 @@ redshift -O 2000
xset r rate $XSET_DELAY $XSET_RATE
# exec /home/kevin/Downloads/dwm/reload-dwm.sh
{{ if eq .chezmoi.fullHostname "nzxt" }}
dunst &
compton -b
imwheel &
@ -13,6 +14,7 @@ numlockx on &
start-pulseaudio-x11 &
wal -i "$(/home/kevin/scripts/shuffler \"$HOME/Pictures/Backgrounds/dim/non-editing\")" && /home/kevin/st/make-st.sh &
{{ end }}
exec i3
# # Statusbar loop
@ -24,3 +26,5 @@ exec i3
# # wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") &
# wal -i "$HOME/Pictures/Backgrounds/dim/editing/captain-marvel.jpg" &
# exec dwm
# vim: ft=conf.go-template

6
key_aliases.tmpl

@ -35,8 +35,7 @@ grr "grep -r"
cld "colordiff -wy --suppress-common-lines"
mkpk "makepkg -sri"
ex "chmod 777"
ex "chmod 777"
ex "chmod +x"
# systemctl [[[ #
ctl "sudo systemctl"
@ -164,7 +163,8 @@ rdh "sudo killall dhcpcd && sudo dhcpcd"
id "identify"
# rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases"
mst "sudo rm config.h && sudo bear make install"
# mst "sudo rm ~/st/config.h && sudo bear make -C ~/st install"
mst "sudo ~/st/make-st.sh"
# system ]]]

1
key_files.tmpl

@ -26,6 +26,7 @@ z ~/linux-config/aliases/zsh_aliases
adt ~/coding/ada-mario-prep/txt/todo.md
cm /tmp/commit-msg.txt
adt ~/coding/ada-mario-prep/txt/todo.md
bid ~/coding/project-ideas/blog.md
ci ~/linux-config/txt/ideas.md
cmd ./commit-msg.txt

12
txt/todo.md

@ -1,7 +1,15 @@
- suckless
- dwm
- layout
- tabbed
- tmux
- surf
- convert bookmarks
- dark theme
- nnn?
# chezmoi
- scripts
- copy sync-shortcut
- YCM
# Other
- nnn?
Loading…
Cancel
Save