Browse Source
369-a4 fxn's: run, hex converter, block to line
369-a4 fxn's: run, hex converter, block to line
- switch from pacman to yay - update packages - apparent size dured-hat-laptop
Kevin Mok
6 years ago
15 changed files with 201 additions and 86 deletions
-
62aliases/key_aliases
-
43fish/.config/fish/config.fish
-
5fish/.config/fish/functions/369/a4/block-to-line.fish
-
12fish/.config/fish/functions/369/a4/hex.fish
-
29fish/.config/fish/functions/369/a4/run-a4.fish
-
4fish/.config/fish/functions/grep-aliases.fish
-
3fish/.config/fish/functions/revert-e3-json.fish
-
8i3/.config/i3/config
-
9ranger/.config/ranger/rc.conf
-
3txt/exclude-dirs-backup.txt
-
5txt/key_dirs.txt
-
11txt/nzxt-aur.txt
-
13txt/nzxt-pkgs.txt
-
79vim/.vimrc
-
1zathura/.config/zathura/zathurarc
@ -0,0 +1,5 @@ |
|||||
|
function block-to-line |
||||
|
set block_size 1024 |
||||
|
set bytes_per_line 16 |
||||
|
math "($block_size*$argv[1])/$bytes_per_line + 1" |
||||
|
end |
@ -0,0 +1,12 @@ |
|||||
|
function hex |
||||
|
switch $argv[1] |
||||
|
case h |
||||
|
# print dec/bin. |
||||
|
printf "%d " (echo "ibase=16;obase=A;$argv[2]" | bc) |
||||
|
printf "%d\n" (echo "ibase=16;obase=2;$argv[2]" | bc) |
||||
|
case d |
||||
|
# print hex/bin. |
||||
|
printf "%s " (echo "obase=16;$argv[2]" | bc) |
||||
|
printf "%d\n" (echo "obase=2;$argv[2]" | bc) |
||||
|
end |
||||
|
end |
@ -0,0 +1,29 @@ |
|||||
|
function run-a4 |
||||
|
# 1 = ex, 2 = img |
||||
|
printf '\033c' |
||||
|
# and bear make clean |
||||
|
bear make |
||||
|
|
||||
|
set img_file 'imgs/emptydisk.img' |
||||
|
switch $argv[2] |
||||
|
case 1 |
||||
|
set img_file 'imgs/onefile.img' |
||||
|
case m |
||||
|
set img_file 'imgs/multilevel.img' |
||||
|
case l |
||||
|
set img_file 'imgs/largefile.img' |
||||
|
end |
||||
|
|
||||
|
switch $argv[1] |
||||
|
case h |
||||
|
./ext2_helpers_tester 'imgs/multilevel.img' '/level1/level2/bfile' |
||||
|
case hg |
||||
|
gdb -ex "run" -ex "bt" -ex "q" \ |
||||
|
--args ./ext2_helpers_tester './imgs/multilevel.img' '/level1/level2/level3//' |
||||
|
case m |
||||
|
./ext2_mkdir $img_file '/' |
||||
|
# ./ext2_mkdir 'imgs/multilevel.img' '/level1/level2/bfile' |
||||
|
case '*' |
||||
|
./readimage $img_file |
||||
|
end |
||||
|
end |
@ -1,5 +1,5 @@ |
|||||
function grep-aliases |
function grep-aliases |
||||
set key_aliases /home/kevin/linux-config/aliases/key_aliases |
set key_aliases /home/kevin/linux-config/aliases/key_aliases |
||||
# grep $argv[1] $key_aliases |
|
||||
rg "^$argv[1]" $key_aliases |
|
||||
|
rg $argv[1] $key_aliases |
||||
|
# rg "^$argv[1]" $key_aliases |
||||
end |
end |
@ -1,3 +0,0 @@ |
|||||
function revert-e3-json |
|
||||
cp $argv[1]_example.json $argv[1].json |
|
||||
end |
|
@ -1,3 +1,4 @@ |
|||||
set recolor true |
set recolor true |
||||
set recolor-darkcolor "#dcdccc" |
set recolor-darkcolor "#dcdccc" |
||||
set recolor-lightcolor "#1f1f1f" |
set recolor-lightcolor "#1f1f1f" |
||||
|
set selection-clipboard clipboard |
Write
Preview
Loading…
Cancel
Save
Reference in new issue