From 447af3e8cdc6f2ab236e5f9790f654f07baee590 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 12 Mar 2019 04:45:04 -0400 Subject: [PATCH] Organize/source fish functions in dirs - mpv config - 369-a3 fish functions --- .gitignore | 5 +++- aliases/key_aliases | 14 +++++++---- fish/.config/fish/config.fish | 11 ++++++++- .../fish/functions/{ => 369/a2}/carsim.fish | 0 .../fish/functions/{ => 369/a2}/gdb-a2.fish | 0 .../fish/functions/369/a3/gdb-a3-break.fish | 7 ++++++ .../fish/functions/369/a3/gdb-a3-custom.fish | 6 +++++ .../fish/functions/{ => 369/a3}/gdb-a3.fish | 4 ++-- .../fish/functions/369/a3/run-a3-custom.fish | 9 ++++++++ .../fish/functions/369/a3/run-a3-file.fish | 9 ++++++++ .../fish/functions/{ => 369/a3}/run-a3.fish | 3 ++- .../fish/functions/{ => 369}/grep-c.fish | 0 .../functions/{ => 369}/grep-headers.fish | 0 .../fish/functions/{ => 369}/rg-headers.fish | 0 .../.config/fish/functions/{ => 369}/rgc.fish | 0 .../fish/functions/compile_commands.json | 1 + .../functions/{ => git}/git-amend-push.fish | 0 .../{ => git}/git-delete-branch.fish | 0 .../functions/{ => git}/git-diff-files.fish | 0 .../functions/{ => git}/git-mult-remotes.fish | 0 .../{ => git}/git-push-multiple.fish | 0 i3/.config/i3/config | 4 ++-- mpv/.config/mpv/input.conf | 23 +++++++++++++++++++ neofetch/.config/neofetch/config.conf | 8 +++++-- scripts/change-sink | 4 ++-- stow.sh | 2 +- txt/exclude-dirs-backup.txt | 2 -- txt/key_dirs.txt | 1 + vim/.vimrc | 4 +++- 29 files changed, 97 insertions(+), 20 deletions(-) rename fish/.config/fish/functions/{ => 369/a2}/carsim.fish (100%) rename fish/.config/fish/functions/{ => 369/a2}/gdb-a2.fish (100%) create mode 100644 fish/.config/fish/functions/369/a3/gdb-a3-break.fish create mode 100644 fish/.config/fish/functions/369/a3/gdb-a3-custom.fish rename fish/.config/fish/functions/{ => 369/a3}/gdb-a3.fish (69%) create mode 100644 fish/.config/fish/functions/369/a3/run-a3-custom.fish create mode 100644 fish/.config/fish/functions/369/a3/run-a3-file.fish rename fish/.config/fish/functions/{ => 369/a3}/run-a3.fish (78%) rename fish/.config/fish/functions/{ => 369}/grep-c.fish (100%) rename fish/.config/fish/functions/{ => 369}/grep-headers.fish (100%) rename fish/.config/fish/functions/{ => 369}/rg-headers.fish (100%) rename fish/.config/fish/functions/{ => 369}/rgc.fish (100%) create mode 100644 fish/.config/fish/functions/compile_commands.json rename fish/.config/fish/functions/{ => git}/git-amend-push.fish (100%) rename fish/.config/fish/functions/{ => git}/git-delete-branch.fish (100%) rename fish/.config/fish/functions/{ => git}/git-diff-files.fish (100%) rename fish/.config/fish/functions/{ => git}/git-mult-remotes.fish (100%) rename fish/.config/fish/functions/{ => git}/git-push-multiple.fish (100%) create mode 100644 mpv/.config/mpv/input.conf diff --git a/.gitignore b/.gitignore index c8051a1..077d19e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ +mpv/.config/mpv/watch_later/* + *.html *.sw* + +cp-* commit-msg.txt core -cp-* ideas.md temp.sh diff --git a/aliases/key_aliases b/aliases/key_aliases index 349d587..007def0 100644 --- a/aliases/key_aliases +++ b/aliases/key_aliases @@ -15,7 +15,7 @@ tl "tldr" nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'" -vgb "sni /etc/default/grub" +vgb "sudo nvim /etc/default/grub" mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" bt "bat" @@ -27,6 +27,7 @@ cld "colordiff -y --suppress-common-lines" mkpk "makepkg -sri" ex "chmod 777" +ex "chmod 777" # systemctl {{{ # @@ -81,7 +82,7 @@ nbu "cd /run/media/kevin/backup-hd/nzxt/tar && lsd -l" s "systemctl suspend" sd "sudo shutdown 0" -reb "sudo shutdown -r 0" +rb "sudo shutdown -r 0" lo "i3-msg exit" x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" @@ -100,10 +101,10 @@ vlh "alsamixer -c 2" # pacman {{{ # pc "sudo pacman -S" +pcq "sudo pacman -Qi" pcr "sudo pacman -Rns" pcud "sudo pacman -Sy" pcug "sudo pacman -Syu" -pcv "sudo pacman -Q" xpc "pacman -Qqne > ~/linux-config/txt/nzxt-pkgs.txt && pacman -Qqme > ~/linux-config/txt/nzxt-aur.txt " # tri "trizen -S --noconfirm" tri "trizen -S --noedit" @@ -142,9 +143,10 @@ cv "cava" fh "feh" gpd "gpg --decrypt" gpe "gpg --encrypt --recipient" -hc "htop -s PERCENT_CPU" -# h "htop -s PERCENT_MEM" +htc "htop -s PERCENT_CPU" +htm "htop -s PERCENT_MEM" kd "killall Discord && killall Discord" +mp "mpv --volume=50" mra "man ranger" n "nvim" nd "node" @@ -365,6 +367,8 @@ ma "printf '\033c' && bear make" mc "bear make clean" rms "rm swapfile.*" +wl6 "watson log --all --project=369 --tag=a3" +wr6 "watson report --all --project=369 --tag=a3" # a2 {{{ # diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index ded7226..e0fa62c 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -21,6 +21,9 @@ bind \cr forward-word # fish-specific set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions" abbr ff "cd $fish_fxn_dir" +for fxn in (find $fish_fxn_dir -name '*.fish') + source $fxn +end source /home/kevin/.config/fish/key_abbr.fish abbr xf "fish_config" abbr f. "cd .." @@ -43,7 +46,9 @@ set -xU XSET_DELAY 200 # fxn abbr's abbr ag "grep-aliases" abbr bq "benq-brightness" -abbr cf "create-fish-function" +abbr cpc "copy cat" +abbr cpe "copy echo" +abbr cff "create-fish-function" abbr ev "evince-silent" # git {{{ # @@ -68,6 +73,10 @@ abbr grh "grep-headers" abbr rgh "rg-headers" abbr r6 "run-a3" +abbr r6f "run-a3-file" +abbr r6c "run-a3-custom" +abbr g6 "gdb-a3" +abbr g6b "gdb-a3-break" # abbr cs "carsim" # abbr ga2 "gdb-a2" diff --git a/fish/.config/fish/functions/carsim.fish b/fish/.config/fish/functions/369/a2/carsim.fish similarity index 100% rename from fish/.config/fish/functions/carsim.fish rename to fish/.config/fish/functions/369/a2/carsim.fish diff --git a/fish/.config/fish/functions/gdb-a2.fish b/fish/.config/fish/functions/369/a2/gdb-a2.fish similarity index 100% rename from fish/.config/fish/functions/gdb-a2.fish rename to fish/.config/fish/functions/369/a2/gdb-a2.fish diff --git a/fish/.config/fish/functions/369/a3/gdb-a3-break.fish b/fish/.config/fish/functions/369/a3/gdb-a3-break.fish new file mode 100644 index 0000000..7083d8e --- /dev/null +++ b/fish/.config/fish/functions/369/a3/gdb-a3-break.fish @@ -0,0 +1,7 @@ +function gdb-a3-break + printf '\033c' + and bear make + and gdb -ex "b pagetable.c:147" \ + -ex "run" \ + --args ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand +end diff --git a/fish/.config/fish/functions/369/a3/gdb-a3-custom.fish b/fish/.config/fish/functions/369/a3/gdb-a3-custom.fish new file mode 100644 index 0000000..4b74a61 --- /dev/null +++ b/fish/.config/fish/functions/369/a3/gdb-a3-custom.fish @@ -0,0 +1,6 @@ +function gdb-a3-custom + printf '\033c' + and bear make + gdb -ex "run" -ex "bt" \ + --args ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-custom-2.ref -m 1 -s 10 -a rand +end diff --git a/fish/.config/fish/functions/gdb-a3.fish b/fish/.config/fish/functions/369/a3/gdb-a3.fish similarity index 69% rename from fish/.config/fish/functions/gdb-a3.fish rename to fish/.config/fish/functions/369/a3/gdb-a3.fish index acf858f..2de99db 100644 --- a/fish/.config/fish/functions/gdb-a3.fish +++ b/fish/.config/fish/functions/369/a3/gdb-a3.fish @@ -1,6 +1,6 @@ function gdb-a3 - # gdb -ex "b safeStopSign.c:96" -ex "run" \ + printf '\033c' + and bear make gdb -ex "run" -ex "bt" \ - # gdb -ex "run" \ --args ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand end diff --git a/fish/.config/fish/functions/369/a3/run-a3-custom.fish b/fish/.config/fish/functions/369/a3/run-a3-custom.fish new file mode 100644 index 0000000..91f1d1c --- /dev/null +++ b/fish/.config/fish/functions/369/a3/run-a3-custom.fish @@ -0,0 +1,9 @@ +function run-a3-custom + printf '\033c' + # and bear make clean + and bear make + # and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-custom.ref -m 5 -s 50 -a rand + and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-custom-2.ref -m 1 -s 10 -a rand + + # rm swapfile.* +end diff --git a/fish/.config/fish/functions/369/a3/run-a3-file.fish b/fish/.config/fish/functions/369/a3/run-a3-file.fish new file mode 100644 index 0000000..28cfc4a --- /dev/null +++ b/fish/.config/fish/functions/369/a3/run-a3-file.fish @@ -0,0 +1,9 @@ +function run-a3-file + printf '\033c' + # and bear make clean + and bear make + # and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand > task-1.out + and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand > task-1.out 2>&1 + + # rm swapfile.* +end diff --git a/fish/.config/fish/functions/run-a3.fish b/fish/.config/fish/functions/369/a3/run-a3.fish similarity index 78% rename from fish/.config/fish/functions/run-a3.fish rename to fish/.config/fish/functions/369/a3/run-a3.fish index 9641d63..e42cd82 100644 --- a/fish/.config/fish/functions/run-a3.fish +++ b/fish/.config/fish/functions/369/a3/run-a3.fish @@ -1,7 +1,8 @@ function run-a3 printf '\033c' + # and bear make clean and bear make and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand - rm swapfile.* + # rm swapfile.* end diff --git a/fish/.config/fish/functions/grep-c.fish b/fish/.config/fish/functions/369/grep-c.fish similarity index 100% rename from fish/.config/fish/functions/grep-c.fish rename to fish/.config/fish/functions/369/grep-c.fish diff --git a/fish/.config/fish/functions/grep-headers.fish b/fish/.config/fish/functions/369/grep-headers.fish similarity index 100% rename from fish/.config/fish/functions/grep-headers.fish rename to fish/.config/fish/functions/369/grep-headers.fish diff --git a/fish/.config/fish/functions/rg-headers.fish b/fish/.config/fish/functions/369/rg-headers.fish similarity index 100% rename from fish/.config/fish/functions/rg-headers.fish rename to fish/.config/fish/functions/369/rg-headers.fish diff --git a/fish/.config/fish/functions/rgc.fish b/fish/.config/fish/functions/369/rgc.fish similarity index 100% rename from fish/.config/fish/functions/rgc.fish rename to fish/.config/fish/functions/369/rgc.fish diff --git a/fish/.config/fish/functions/compile_commands.json b/fish/.config/fish/functions/compile_commands.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/fish/.config/fish/functions/compile_commands.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/fish/.config/fish/functions/git-amend-push.fish b/fish/.config/fish/functions/git/git-amend-push.fish similarity index 100% rename from fish/.config/fish/functions/git-amend-push.fish rename to fish/.config/fish/functions/git/git-amend-push.fish diff --git a/fish/.config/fish/functions/git-delete-branch.fish b/fish/.config/fish/functions/git/git-delete-branch.fish similarity index 100% rename from fish/.config/fish/functions/git-delete-branch.fish rename to fish/.config/fish/functions/git/git-delete-branch.fish diff --git a/fish/.config/fish/functions/git-diff-files.fish b/fish/.config/fish/functions/git/git-diff-files.fish similarity index 100% rename from fish/.config/fish/functions/git-diff-files.fish rename to fish/.config/fish/functions/git/git-diff-files.fish diff --git a/fish/.config/fish/functions/git-mult-remotes.fish b/fish/.config/fish/functions/git/git-mult-remotes.fish similarity index 100% rename from fish/.config/fish/functions/git-mult-remotes.fish rename to fish/.config/fish/functions/git/git-mult-remotes.fish diff --git a/fish/.config/fish/functions/git-push-multiple.fish b/fish/.config/fish/functions/git/git-push-multiple.fish similarity index 100% rename from fish/.config/fish/functions/git-push-multiple.fish rename to fish/.config/fish/functions/git/git-push-multiple.fish diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 7cce7fe..fbce6a4 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,6 +1,6 @@ # startup {{{ # -# set $browser "firefox" -set $browser "chromium" +set $browser "firefox" +# set $browser "chromium" set $def_term "urxvt" set $scripts_path "/home/kevin/linux-config/scripts" exec redshift -O 2000 diff --git a/mpv/.config/mpv/input.conf b/mpv/.config/mpv/input.conf new file mode 100644 index 0000000..4479c39 --- /dev/null +++ b/mpv/.config/mpv/input.conf @@ -0,0 +1,23 @@ +# volume +WHEEL_UP add volume 1 +WHEEL_DOWN add volume -1 + +# speed +r set speed 1.0 +g set speed 1.5 +s add speed -.25 +d add speed .25 + +# seek +Shift+RIGHT seek 1 +Shift+LEFT seek -1 +RIGHT seek 5 +LEFT seek -5 +UP seek 10 +DOWN seek -10 +Shift+UP seek 60 +Shift+DOWN seek -60 + +# mark +m revert-seek mark # mark position for revert-seek +Shift+m revert-seek diff --git a/neofetch/.config/neofetch/config.conf b/neofetch/.config/neofetch/config.conf index da23bdf..758cb72 100644 --- a/neofetch/.config/neofetch/config.conf +++ b/neofetch/.config/neofetch/config.conf @@ -21,7 +21,7 @@ print_info() { info "Packages" packages info "WM" wm info "WM Theme" wm_theme - info "Font" font + # info "Font" font info "Theme" theme info "Icons" icons info "CPU" cpu @@ -336,7 +336,8 @@ public_ip_host="http://ident.me" # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # -disk_show=('/' '/home' '/mnt/linux-files' ) +# disk_show=('/' '/home' '/mnt/linux-files' ) +disk_show=('/dev/sda1' '/dev/sda3' '/dev/sdc2' ) # Disk subtitle. # What to append to the Disk subtitle. @@ -547,8 +548,11 @@ bar_color_total="distro" # off: 'info' cpu_display="off" memory_display="off" +# cpu_display="barinfo" +# memory_display="barinfo" battery_display="off" disk_display="off" +# disk_display="barinfo" # Backend Settings diff --git a/scripts/change-sink b/scripts/change-sink index 6377e69..937cbb8 100755 --- a/scripts/change-sink +++ b/scripts/change-sink @@ -9,8 +9,8 @@ case $1 in devicename="alsa_output.usb-1852_DigiHug_USB_Audio-01.analog-stereo" ;; line-out ) - # devicename="alsa_output.pci-0000_00_14.2.analog-stereo" - devicename="alsa_output.pci-0000_00_14.2.iec958-stereo" + devicename="alsa_output.pci-0000_00_14.2.analog-stereo" + # devicename="alsa_output.pci-0000_00_14.2.iec958-stereo" ;; esac # if [ "$1" = "dac" ]; then diff --git a/stow.sh b/stow.sh index 2ff1862..ab8ac69 100755 --- a/stow.sh +++ b/stow.sh @@ -1,3 +1,3 @@ #!/bin/bash -stow git i3 i3blocks input neofetch ranger shell vim x zathura +stow git i3 i3blocks input mpv neofetch ranger shell vim x zathura diff --git a/txt/exclude-dirs-backup.txt b/txt/exclude-dirs-backup.txt index e469963..d4c3ce5 100644 --- a/txt/exclude-dirs-backup.txt +++ b/txt/exclude-dirs-backup.txt @@ -1,7 +1,5 @@ /home/kevin/.cache /home/kevin/.local/share/Steam -/home/kevin/coding/linux-* -/home/kevin/VirtualBox VMs /lost+found /mnt /proc diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index 8a42f6f..206a0ca 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -15,6 +15,7 @@ o / p /home/kevin/.password-store P /home/kevin/Pictures tm /tmp +lfv /mnt/linux-files/Videos # }}} sys * diff --git a/vim/.vimrc b/vim/.vimrc index ba223b3..cd8f5a5 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -63,7 +63,8 @@ autocmd VimLeave *.tex !tex-clean % autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72 -autocmd BufWritePost key_* !sync-shortcuts +" autocmd BufWritePost key_* !sync-shortcuts +autocmd BufNewFile,BufRead key_* map !sync-shortcuts " }}} commands for specific files " @@ -247,6 +248,7 @@ nnoremap f q/p nnoremap fc /[<>=\|]\{7\} " reload folds nnoremap ff :set foldmethod=marker zM +nnoremap fi :YcmCompleter FixIt " find copied text nnoremap ft /TODO nnoremap g :YcmCompleter GoTo