mirror of
https://github.com/xHyroM/dotfiles.git
synced 2024-12-25 21:51:06 +01:00
feat: utils
This commit is contained in:
parent
abf7f7eec2
commit
de9af63f49
3 changed files with 15 additions and 1 deletions
3
.local/bin/biggest_files
Executable file
3
.local/bin/biggest_files
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "Size\tPath" && du -ah . 2>/dev/null | sort -rh | head -n 20
|
11
.local/bin/memory
Executable file
11
.local/bin/memory
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
program=$1
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
ps -eo size,pid,user,command --sort -size | \
|
||||||
|
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\
|
||||||
|
cut -d "" -f2 | cut -d "-" -f1 | grep "$program" | \
|
||||||
|
awk '{print $0; sum+=$1} END {print "Total: " sum " Mb"}'
|
||||||
|
sleep 0.3
|
||||||
|
done
|
2
goog
2
goog
|
@ -11,7 +11,7 @@ stuff: list[str] = [
|
||||||
*expand("~/.config/{fish,kitty,nvim,pipewire,sway,swaylock,waybar,xdg-desktop-portal,zed}/**"),
|
*expand("~/.config/{fish,kitty,nvim,pipewire,sway,swaylock,waybar,xdg-desktop-portal,zed}/**"),
|
||||||
*expand("~/.config/vesktop/{settings,themes}/**"),
|
*expand("~/.config/vesktop/{settings,themes}/**"),
|
||||||
"~/.icons/**",
|
"~/.icons/**",
|
||||||
*expand("~/.local/bin/{yarn}"),
|
*expand("~/.local/bin/{yarn,memory,biggest_files}"),
|
||||||
]
|
]
|
||||||
|
|
||||||
options, _ = getopt(sys.argv[1:], "ds", ["dump", "sync"])
|
options, _ = getopt(sys.argv[1:], "ds", ["dump", "sync"])
|
||||||
|
|
Loading…
Reference in a new issue