-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_aliases.sailfishos
49 lines (44 loc) · 3.7 KB
/
.bash_aliases.sailfishos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# vim: ft=bash noet:
! declare 2>&1 | grep -wq ^colors= && [ $BASH_VERSINFO -ge 4 ] && source $initDir/.colors
test "$debug" -gt 0 && echo "=> Running $bold${colors[blue]}$(basename ${BASH_SOURCE[0]})$normal ..."
findExcludedPathList="./proc ./sys ./dev ./media ./opt/alien ./home/$USER/android_storage"
findPrunePathsExpression="( -type d -a ( -name .git $(printf -- " -o -path %s" $findExcludedPathList) ) ) -prune -o"
duExcludedPathList="./proc ./sys ./dev ./opt/alien"
excludePathsDuExpression=$(printf -- "--exclude %s " $duExcludedPathList)
alias version >/dev/null 2>&1 && unalias version
alias androidVersion='echo "=> Android Version: $(getprop ro.build.version.release)"'
alias androidSDK='echo "=> Android SDK: $(getprop ro.build.version.sdk)"'
type -P advcp >/dev/null || { alias acp="rsync -ogpu -lH"; alias amv="rsync -ogpu -lH --remove-source-files"; }
alias apkInstall=apkd-install
alias cupsRestart='sudo systemctl restart cups.service;sleep 1;systemctl status cups.service'
unset -f dfc
alias dfc='dfc -TWfc always | egrep -v "/opt/alien/data| /data"'
alias getIMEI="ssu status | awk '/UID/{print\$NF}'"
alias imei="ssu status | awk '/UID/{print\$NF}'"
alias inxi='inxi -c2 -f'
alias inxiSummary='inxi -SMBmCGANEdPjsIJ -xx'
alias binxiSummary='binxi -SMBmCGANEdPjsIJ -xx'
alias keyboardRestart='systemctl --user restart maliit-server.service;systemctl --user status maliit-server.service | egrep " - |Active:"'
alias la='ls -A'
alias notesGrep='sqlite3 ~/.local/share/jolla-notes/QML/OfflineStorage/Databases/8b63c31a7656301b3f7bcbbfef8a2b6f.sqlite "select body from notes;" | grep'
alias notesSearch=notesGrep
alias model=$'ssu status | awk -F "[ )]" \'/model/{print$(NF-4)" "$(NF-1)}\''
#groups | egrep -wq "admin|sudo" && alias pipInstall="curl -fsSL https://bootstrap.pypa.io/get-pip.py | sudo -H python" || alias pipInstall="curl -fsSL https://bootstrap.pypa.io/get-pip.py | python"
#groups | egrep -wq "admin|sudo" && alias pip3Install="curl -fsSL https://bootstrap.pypa.io/get-pip.py | sudo -H python3" || alias pip3Install="curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3"
groups | egrep -wq "admin|sudo" && alias pipInstall="sudo -H easy_install pip" || alias pipInstall="easy_install --user pip"
groups | egrep -wq "admin|sudo" && alias pipInstall="sudo -H easy_install3 pip" || alias pipInstall="easy_install3 --user pip"
alias refresh="time sudo pkcon refresh"
alias refresh2="time sudo zypper refresh"
alias rgrep=$'time rg -uu -g !.git/'
alias smsGrep='sqlite3 ~/.local/share/commhistory/commhistory.db "select Freetext from Events where type=2;" | grep'
alias smsSearch=smsGrep
alias timedRestart='systemctl --user restart timed-qt5.service;systemctl --user status timed-qt5.service | egrep " - |Active:"'
alias topd10="topd 10"
alias topd5="topd 5"
alias topd="toybox du -cxmd 1 2>/dev/null | grep -v '\s*\.$' | sort -nr | head -n"
alias topf10=$'$find . $findPrunePathsExpression -xdev -type f -size +10240k -exec ls -l --block-size=M --time-style=+"%Y-%m-%d %T" {} \; 2>/dev/null | sort -nrk5 | head -10 | awk \'{total+=$5;print}END{print"=> total = "total" MiB"}\''
alias topf50=$'$find . $findPrunePathsExpression -xdev -type f -size +10240k -exec ls -l --block-size=M --time-style=+"%Y-%m-%d %T" {} \; 2>/dev/null | sort -nrk5 | head -50 | awk \'{total+=$5;print}END{print"=> total = "total" MiB"}\''
alias topf5=$'$find . $findPrunePathsExpression -xdev -type f -size +10240k -exec ls -l --block-size=M --time-style=+"%Y-%m-%d %T" {} \; 2>/dev/null | sort -nrk5 | head -5 | awk \'{total+=$5;print}END{print"=> total = "total" MiB"}\''
alias virtualisation="\grep flags /proc/cpuinfo | head -n1 | \grep -Eo '(vmx|svm)' | sort -u"
set +x
test "$debug" -gt 0 && echo "=> END of $bold${colors[blue]}$(basename ${BASH_SOURCE[0]})$normal"