Browse Source

Added wp shuffler, rm txt/md from ycm_blacklist

red-hat-laptop
Kevin Mok 5 years ago
parent
commit
caf4e67b6a
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 18
      aliases/key_aliases
  2. 1
      fish/.config/fish/config.fish
  3. 9
      fish/.config/fish/functions/gdb-a2.fish
  4. 11
      i3/.config/i3/config
  5. 3
      ranger/.config/ranger/rc.conf
  6. 63
      scripts/shuffler
  7. 1
      txt/key_files.txt
  8. 17
      vim/.vimrc
  9. 4
      x/.Xresources

18
aliases/key_aliases

@ -97,7 +97,7 @@ pcug "sudo pacman -Syu"
pcv "sudo pacman -Q"
xpc "pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt"
# tri "trizen -S --noconfirm"
tri "trizen -S"
tri "trizen -S --noedit"
# }}} pacman #
@ -171,7 +171,7 @@ py "python"
w "watson"
wa "watson start"
we "watson edit"
wl "watson log"
wl "watson log --day"
# wlm "watson log --project coding --tag mfs"
wr "watson report"
ws "watson stop"
@ -319,7 +319,7 @@ snw "spotify-now -i '%artist - %title'"
# }}} spotify-lib-vis #
sc "shellcheck"
shc "shellcheck"
pdl "pdflatex"
tcl "tex-clean"
@ -341,10 +341,14 @@ ss "ssh kevin@192.168.0.100"
# a2
m "printf '\033c' && bear make"
mc "bear make clean"
mcr "bear make clean && printf '\033c' && bear make && ./carsim light 10 50"
mr "printf '\033c' && make && ./carsim stop 1 4"
# mr "printf '\033c' && bear make && ./carsim light 1 50"
hl "valgrind --tool=helgrind ./carsim stop 10 50 > helgrind.txt 2>&1 && valgrind --tool=helgrind ./carsim light 10 50 >> helgrind.txt 2>&1"
mcr "bear make clean && printf '\033c' && bear make && ./carsim light 1 20"
# mr "printf '\033c' && make && ./carsim stop 10 20"
mr "printf '\033c' && bear make && ./carsim light 1 20"
# "valgrind --tool=helgrind ./carsim stop 10 50 > helgrind.txt 2>&1 && valgrind --tool=helgrind ./carsim light 10 50 >> helgrind.txt 2>&1"
# lk "valgrind --leak-check=yes ./carsim stop 10 20"
lk "valgrind --leak-check=yes ./carsim light 1 1"
# hl "valgrind --tool=helgrind ./carsim stop 10 20"
hl "valgrind --tool=helgrind ./carsim light 10 20"
# a1
# sa "ssh k@192.168.0.17"

1
fish/.config/fish/config.fish

@ -16,6 +16,7 @@ set -x VISUAL nvim
builtin cd $last_dir
bind \ce edit_command_buffer
bind \cr forward-word
# fish-specific
source /home/kevin/.config/fish/key_abbr.fish

9
fish/.config/fish/functions/gdb-a2.fish

@ -1,10 +1,15 @@
function gdb-a2
gdb -ex "b safeStopSign.c:40" -ex "b safeStopSign.c:44" -ex "run" \
# gdb -ex "b safeStopSign.c:96" -ex "run" \
# gdb -ex "b safeTrafficLight.c:98" -ex "run" \
gdb -ex "run" -ex "bt" \
# gdb -ex "run" \
# -ex "p cur_lane_queue.count" \
# -ex "p cur_front->car->index" \
# -ex "p cur_front->car" \
--args ./carsim stop 1 4
# -ex "p cur_front" \
# --args ./carsim stop 1 4
# --args ./carsim stop 3 20
# --args ./carsim light 1 4
--args ./carsim light 1 20
# gdb -ex "b safeStopSign.c:86" -ex "run" --args ./carsim stop 1 10
end

11
i3/.config/i3/config

@ -2,11 +2,12 @@
# set $browser "firefox"
set $browser "chromium"
set $def_term "urxvt"
set $scripts_path "/home/kevin/linux-config/scripts"
exec redshift -O 2000
# exec redshift -O 3000
# random bg
exec compton
exec wal -i "$HOME/Pictures/Backgrounds/dim/non-editing"
exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing")
exec imwheel
exec xmodmap ~/.Xmodmap
exec xset r rate 200 70
@ -145,11 +146,11 @@ bindsym shift+x kill
# container display {{{ #
# backgrounds
# set $colors_sh "~/.cache/wal/colors.sh"
bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/bright/editing"
bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim/non-editing"
bindsym $mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing")
bindsym $mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing")
# bindsym $mod+w exec ~/linux-config/scripts/bg-chooser
bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/dim/editing"
bindsym $mod+y exec wal -i "$HOME/Pictures/Backgrounds/bright/non-editing"
bindsym $mod+r exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/editing")
bindsym $mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/non-editing")
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

3
ranger/.config/ranger/rc.conf

@ -691,3 +691,6 @@ 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
# map <C-d> shell dragon-drag-and-drop -a -x %p

63
scripts/shuffler

@ -0,0 +1,63 @@
#!/bin/bash
# vars {{{ #
shuffle_cache="shuffle.txt"
regen_flag=0
dir=""
# }}} vars #
# usage_msg {{{ #
function usage_msg() {
# echo "usage: shuffler [-r] [dir_name]"
cat <<-EOF
Usage: shuffler [-r] [dir_name]
-r: regenerate the shuffle cache
EOF
}
# }}} usage_msg #
# parse for regen_flag{{{
while getopts ":r" opt; do
case $opt in
r)
echo "-r was triggered!" >&2
regen_flag=1
;;
\?)
echo "Invalid flag: -$OPTARG" >&2
usage_msg
exit 1
;;
esac
done
#}}}
# set dir {{{ #
shift $((OPTIND-1))
# if no dir, use pwd
if [[ "$#" -eq 0 ]]; then
dir=$(pwd)
elif [[ "$#" -gt 1 ]] || [[ ! -d "$1" ]]; then
usage_msg
exit 1
else
dir="$1"
fi
# }}} set dir #
# rebuild shuffle cache if regen_flag, doesn't exist or file empty
if [[ "$regen_flag" -eq 1 ]] || [[ ! -f "$dir"/"$shuffle_cache" ]] || \
[[ $(wc -l "$dir"/"$shuffle_cache" | awk '{print $1}') -eq 0 ]]; then
# if [[ "$regen_flag" -eq 1 ]]; then
find "$dir"/* ! -name "$shuffle_cache" -type f | shuf > "$dir"/"$shuffle_cache"
fi
head -n 1 "$dir"/"$shuffle_cache"
printf '%s\n\n' "$(sed '1d' "$dir"/"$shuffle_cache")" > "$dir"/"$shuffle_cache"
# vim: set tabstop=2 shiftwidth=2 expandtab:

1
txt/key_files.txt

@ -30,6 +30,7 @@ mc /home/kevin/coding/mf-site/assets/sass/main.scss
mi /home/kevin/coding/mf-site/ideas.md
ne /home/kevin/linux-config/configs/neofetch/config.conf
re README.md
td todo.md
tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
wt /home/kevin/.config/watson/state.tmp

17
vim/.vimrc

@ -30,7 +30,8 @@ set linespace=5
set timeoutlen=350
set hlsearch
set noswapfile
let maplocalleader="-"
" let maplocalleader="-"
let maplocalleader="\\"
" }}} set x=y "
" commands for file types {{{ "
@ -46,7 +47,6 @@ autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0
autocmd Filetype c let maplocalleader="\\"
autocmd BufWritePost key_* !sync-shortcuts
autocmd VimLeave *.tex !tex-clean %
@ -106,6 +106,16 @@ Plug 'lervag/vimtex'
" auto-completion for various languages
Plug 'Valloric/YouCompleteMe'
let g:ycm_filetype_blacklist = {
\ 'tagbar': 1,
\ 'qf': 1,
\ 'notes': 1,
\ 'unite': 1,
\ 'vimwiki': 1,
\ 'pandoc': 1,
\ 'infolog': 1,
\ 'mail': 1
\}
" wrote short bits of text that expand into whatever you want
" demo: https://www.youtube.com/watch?v=Zik6u0klD40
@ -227,6 +237,7 @@ nnoremap <leader>fc /[<>=\|]\{7\}<CR>
nnoremap <leader>ff :set foldmethod=marker<CR> zM
" find copied text
nnoremap <leader>ft /TODO<CR>
nnoremap <leader>g :YcmCompleter GoTo<CR>
" toggle search highlighting
nnoremap <leader>h :set hlsearch! hlsearch?<CR>
" help
@ -291,8 +302,6 @@ nnoremap <leader>z za
" Local Mappings {{{ "
autocmd Filetype c nnoremap <localleader>g :YcmCompleter GoTo<CR>
autocmd Filetype fish inoremap <localleader>1 $argv[1]
autocmd Filetype fish inoremap <localleader>2 $argv[2]

4
x/.Xresources

@ -13,8 +13,8 @@ URxvt*inheritPixmap: true
URxvt*transparent: true
!
! URxvt*shading: 0 (blackest) to 99 black, 101 to 200 (whitest) white
! URxvt*shading: 40
URxvt*shading: 35
URxvt*shading: 40
! URxvt*shading: 35
/* }}} transparency */

Loading…
Cancel
Save