369-a3 and other fish functions
This commit is contained in:
@@ -9,6 +9,8 @@ fi "fish"
|
||||
ru "xrdb ~/.Xresources"
|
||||
# list file sizes in megabytes with depth 1
|
||||
duh "sudo du -d 1 -h"
|
||||
dum "sudo du -d 1 -m"
|
||||
m "man"
|
||||
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}'"
|
||||
@@ -24,7 +26,7 @@ grr "grep -r"
|
||||
cld "colordiff -y --suppress-common-lines"
|
||||
|
||||
mkpk "makepkg -sri"
|
||||
mkex "chmod 777"
|
||||
ex "chmod 777"
|
||||
|
||||
# systemctl {{{ #
|
||||
|
||||
@@ -59,6 +61,7 @@ fz "fzf"
|
||||
fnd "find . -type f -name"
|
||||
|
||||
rmr "rm -rf"
|
||||
rmd "rm ~/Downloads/*"
|
||||
md "mkdir -p"
|
||||
rsy "rsync -Pr"
|
||||
|
||||
@@ -70,7 +73,7 @@ ds "df -h | head -n 1 && df -h | grep sd"
|
||||
chownw "sudo chown -R kevin:wheel"
|
||||
chwnm "sudo chown -R kevin:wheel /run/media/kevin"
|
||||
# cd into backup folder and show backup sizes
|
||||
nbu "f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz"
|
||||
nbu "cd /run/media/kevin/backup-hd/nzxt/tar && lsd -l"
|
||||
|
||||
# }}} directory-related #
|
||||
|
||||
@@ -166,7 +169,7 @@ pse "pass edit"
|
||||
psi "pass insert -m"
|
||||
psg "pass generate -c"
|
||||
|
||||
xclip "xclip -selection clipboard"
|
||||
xc "xclip -selection clipboard"
|
||||
yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
|
||||
yg "xclip -selection clipboard ~/.password-store/social/gmail"
|
||||
yt "xclip -selection clipboard ~/.password-store/social/trapbot"
|
||||
@@ -216,6 +219,7 @@ gro "git remote show origin"
|
||||
|
||||
ga "git add -A . && git status -u"
|
||||
gac "git add -A . && git commit -S"
|
||||
gaf "git add -f"
|
||||
# unsigned commt
|
||||
gacu "git add -A . && git commit"
|
||||
|
||||
@@ -357,18 +361,24 @@ ssb "ssh-bandit"
|
||||
|
||||
# 369 {{{ #
|
||||
|
||||
# a2
|
||||
m "printf '\033c' && bear make"
|
||||
ma "printf '\033c' && bear make"
|
||||
mc "bear make clean"
|
||||
|
||||
rms "rm swapfile.*"
|
||||
|
||||
# a2 {{{ #
|
||||
|
||||
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"
|
||||
# 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"
|
||||
|
||||
# }}} a2 #
|
||||
|
||||
# a1
|
||||
# sa "ssh k@192.168.0.17"
|
||||
# cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1"
|
||||
|
||||
@@ -19,6 +19,8 @@ bind \ce edit_command_buffer
|
||||
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"
|
||||
source /home/kevin/.config/fish/key_abbr.fish
|
||||
abbr xf "fish_config"
|
||||
abbr f. "cd .."
|
||||
@@ -27,7 +29,6 @@ abbr f.. "cd ../.."
|
||||
# spv
|
||||
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
|
||||
set -U mfs_dir "/home/kevin/coding/mf-site"
|
||||
source $spv_dir/src/api-keys.sh
|
||||
|
||||
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
|
||||
# (ruby -e 'print Gem.user_dir')/bin
|
||||
@@ -42,6 +43,7 @@ set -xU XSET_DELAY 200
|
||||
# fxn abbr's
|
||||
abbr ag "grep-aliases"
|
||||
abbr bq "benq-brightness"
|
||||
abbr cf "create-fish-function"
|
||||
abbr ev "evince-silent"
|
||||
# git {{{ #
|
||||
|
||||
@@ -60,7 +62,12 @@ abbr z "zathura-silent"
|
||||
set -U BROWSER "chromium"
|
||||
abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender"
|
||||
|
||||
abbr ga2 "gdb-a2"
|
||||
# 369
|
||||
abbr grc "grep-c"
|
||||
abbr grh "grep-headers"
|
||||
abbr cs "carsim"
|
||||
abbr rgh "rg-headers"
|
||||
|
||||
abbr r6 "run-a3"
|
||||
|
||||
# abbr cs "carsim"
|
||||
# abbr ga2 "gdb-a2"
|
||||
|
||||
@@ -46,7 +46,7 @@ function cd --description "Change directory"
|
||||
set -g __fish_cd_direction prev
|
||||
|
||||
set -U last_dir $PWD
|
||||
ls -a
|
||||
lsd -a
|
||||
end
|
||||
|
||||
return $cd_status
|
||||
|
||||
3
fish/.config/fish/functions/copy.fish
Normal file
3
fish/.config/fish/functions/copy.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function copy
|
||||
$argv[1] $argv[2] | xclip -selection clipboard
|
||||
end
|
||||
5
fish/.config/fish/functions/create-fish-function.fish
Normal file
5
fish/.config/fish/functions/create-fish-function.fish
Normal file
@@ -0,0 +1,5 @@
|
||||
function create-fish-function
|
||||
printf 'function %s\n \nend' $argv[1] > $fish_fxn_dir/$argv[1].fish
|
||||
and cd $fish_fxn_dir
|
||||
and $EDITOR $argv[1].fish
|
||||
end
|
||||
6
fish/.config/fish/functions/gdb-a3.fish
Normal file
6
fish/.config/fish/functions/gdb-a3.fish
Normal file
@@ -0,0 +1,6 @@
|
||||
function gdb-a3
|
||||
# gdb -ex "b safeStopSign.c:96" -ex "run" \
|
||||
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
|
||||
@@ -1,4 +1,5 @@
|
||||
function grep-aliases
|
||||
set key_aliases /home/kevin/linux-config/aliases/key_aliases
|
||||
grep $argv[1] $key_aliases
|
||||
# grep $argv[1] $key_aliases
|
||||
rg "^$argv[1]" $key_aliases
|
||||
end
|
||||
|
||||
3
fish/.config/fish/functions/rg-headers.fish
Normal file
3
fish/.config/fish/functions/rg-headers.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function rg-headers
|
||||
rg $argv[1] *.h
|
||||
end
|
||||
3
fish/.config/fish/functions/rgc.fish
Normal file
3
fish/.config/fish/functions/rgc.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function rgc
|
||||
rg $argv[1] *.c
|
||||
end
|
||||
7
fish/.config/fish/functions/run-a3.fish
Normal file
7
fish/.config/fish/functions/run-a3.fish
Normal file
@@ -0,0 +1,7 @@
|
||||
function run-a3
|
||||
printf '\033c'
|
||||
and bear make
|
||||
and ./sim -f /home/kevin/school/369/a3/a3/traceprogs/tr-simpleloop.ref -m 50 -s 3000 -a rand
|
||||
|
||||
rm swapfile.*
|
||||
end
|
||||
@@ -1,6 +1,7 @@
|
||||
function scan-history
|
||||
sudo systemctl start postgresql.service
|
||||
and systemctl status postgresql.service
|
||||
and $spv_dir/src/update-history.sh
|
||||
# and systemctl status postgresql.service
|
||||
and source $spv_dir/src/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
|
||||
|
||||
@@ -336,7 +336,7 @@ public_ip_host="http://ident.me"
|
||||
# disk_show=('/'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
#
|
||||
disk_show=('/' '/home' )
|
||||
disk_show=('/' '/home' '/mnt/linux-files' )
|
||||
|
||||
# Disk subtitle.
|
||||
# What to append to the Disk subtitle.
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
/proc
|
||||
/run
|
||||
/sys
|
||||
/var/cache/pacman
|
||||
/var/lib/systemd/coredump
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
bg /home/kevin/Pictures/Backgrounds
|
||||
cf /home/kevin/.config
|
||||
lc /home/kevin/linux-config/
|
||||
lf /mnt/linux-files
|
||||
d /home/kevin/Downloads
|
||||
D /home/kevin/Documents
|
||||
fo /home/kevin/.config/fish
|
||||
ff /home/kevin/linux-config/fish/.config/fish/functions
|
||||
fs /home/kevin/linux-config/fish/.config/fish
|
||||
k /home/kevin/
|
||||
lc /home/kevin/linux-config/
|
||||
|
||||
Reference in New Issue
Block a user