Browse Source

Organize/source fish functions in dirs

- mpv config
- 369-a3 fish functions
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
447af3e8cd
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 5
      .gitignore
  2. 14
      aliases/key_aliases
  3. 11
      fish/.config/fish/config.fish
  4. 0
      fish/.config/fish/functions/369/a2/carsim.fish
  5. 0
      fish/.config/fish/functions/369/a2/gdb-a2.fish
  6. 7
      fish/.config/fish/functions/369/a3/gdb-a3-break.fish
  7. 6
      fish/.config/fish/functions/369/a3/gdb-a3-custom.fish
  8. 4
      fish/.config/fish/functions/369/a3/gdb-a3.fish
  9. 9
      fish/.config/fish/functions/369/a3/run-a3-custom.fish
  10. 9
      fish/.config/fish/functions/369/a3/run-a3-file.fish
  11. 3
      fish/.config/fish/functions/369/a3/run-a3.fish
  12. 0
      fish/.config/fish/functions/369/grep-c.fish
  13. 0
      fish/.config/fish/functions/369/grep-headers.fish
  14. 0
      fish/.config/fish/functions/369/rg-headers.fish
  15. 0
      fish/.config/fish/functions/369/rgc.fish
  16. 1
      fish/.config/fish/functions/compile_commands.json
  17. 0
      fish/.config/fish/functions/git/git-amend-push.fish
  18. 0
      fish/.config/fish/functions/git/git-delete-branch.fish
  19. 0
      fish/.config/fish/functions/git/git-diff-files.fish
  20. 0
      fish/.config/fish/functions/git/git-mult-remotes.fish
  21. 0
      fish/.config/fish/functions/git/git-push-multiple.fish
  22. 4
      i3/.config/i3/config
  23. 23
      mpv/.config/mpv/input.conf
  24. 8
      neofetch/.config/neofetch/config.conf
  25. 4
      scripts/change-sink
  26. 2
      stow.sh
  27. 2
      txt/exclude-dirs-backup.txt
  28. 1
      txt/key_dirs.txt
  29. 4
      vim/.vimrc

5
.gitignore

@ -1,8 +1,11 @@
mpv/.config/mpv/watch_later/*
*.html
*.sw*
cp-*
commit-msg.txt
core
cp-*
ideas.md
temp.sh

14
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 {{{ #

11
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"

0
fish/.config/fish/functions/carsim.fish → fish/.config/fish/functions/369/a2/carsim.fish

0
fish/.config/fish/functions/gdb-a2.fish → fish/.config/fish/functions/369/a2/gdb-a2.fish

7
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

6
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

4
fish/.config/fish/functions/gdb-a3.fish → 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

9
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

9
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

3
fish/.config/fish/functions/run-a3.fish → 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

0
fish/.config/fish/functions/grep-c.fish → fish/.config/fish/functions/369/grep-c.fish

0
fish/.config/fish/functions/grep-headers.fish → fish/.config/fish/functions/369/grep-headers.fish

0
fish/.config/fish/functions/rg-headers.fish → fish/.config/fish/functions/369/rg-headers.fish

0
fish/.config/fish/functions/rgc.fish → fish/.config/fish/functions/369/rgc.fish

1
fish/.config/fish/functions/compile_commands.json

@ -0,0 +1 @@
[]

0
fish/.config/fish/functions/git-amend-push.fish → fish/.config/fish/functions/git/git-amend-push.fish

0
fish/.config/fish/functions/git-delete-branch.fish → fish/.config/fish/functions/git/git-delete-branch.fish

0
fish/.config/fish/functions/git-diff-files.fish → fish/.config/fish/functions/git/git-diff-files.fish

0
fish/.config/fish/functions/git-mult-remotes.fish → fish/.config/fish/functions/git/git-mult-remotes.fish

0
fish/.config/fish/functions/git-push-multiple.fish → fish/.config/fish/functions/git/git-push-multiple.fish

4
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

23
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

8
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

4
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

2
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

2
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

1
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 *

4
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 <F1> !sync-shortcuts
" }}} commands for specific files "
@ -247,6 +248,7 @@ nnoremap <leader>f q/p<CR>
nnoremap <leader>fc /[<>=\|]\{7\}<CR>
" reload folds
nnoremap <leader>ff :set foldmethod=marker<CR> zM
nnoremap <leader>fi :YcmCompleter FixIt<CR>
" find copied text
nnoremap <leader>ft /TODO<CR>
nnoremap <leader>g :YcmCompleter GoTo<CR>

Loading…
Cancel
Save