diff options
| author | 2021-04-13 20:28:25 +0000 | |
|---|---|---|
| committer | 2021-04-13 20:28:25 +0000 | |
| commit | c116fa3e97f7f4103f04af6f092b54e2d550ecfa (patch) | |
| tree | 6d17062ed970eb74b6fbcfa784dc25c2524b15dc | |
| parent | 21dc5c6e36993b5c59587ec69850eb8b504992c8 (diff) | |
Modificados scripts, arquivo de aliases e adicionado gitignore
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | aliases | 3 | ||||
| -rwxr-xr-x | bin/batt | 20 | ||||
| -rwxr-xr-x | bin/cpu | 3 |
4 files changed, 12 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0000c29 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/Digital @@ -19,6 +19,8 @@ alias zshrc='nvim ~/.config/zsh/.zshrc' alias bashrc='nvim ~/.bashrc' +alias mkshrc='nvim ~/.mkshrc' + alias tmconf='nvim ~/.tmux.conf' alias alconf='nvim ~/.config/alacritty/alacritty.yml' @@ -98,6 +100,7 @@ alias pm='pulsemixer' alias yda='youtube-dl -4 -x --audio-format mp3 -o "~/Música/%(title)s.%(ext)s"' alias xclip='xclip -sel copy' alias hc='herbstclient' +alias tg='telegram-cli' # abre o GTA V com facilidade alias gtav='legendary launch 9d2d0eb64d5c44529cece33fe2a46482' @@ -9,25 +9,19 @@ batt() { icon="" - if [ "$state" -eq "Discharging" ]; then + [ "$batt" -le 7 ] && icon="" && [ "$notif" -eq 0 ] && notify-send -u critical 'Bateria crítica!' 'Bateria atingiu 7%' && notif=1 - [ "$batt" -le 7 ] && icon="" && [ notif -eq 0 ] && notify-send -u critical 'Bateria crítica!' 'Bateria atingiu 7%' && "$notif"=1 + [ "$batt" -le 10 ] && icon="" && [ "$notif" -eq 0 ] && notify-send 'Bateria descarregando' 'Bateria atingiu 10%' && notif=1 - [ "$batt" -ge 7 ] && [ "$batt" -le 10 ] && icon="" && [ "$notif" -eq 0 ] && notify-send 'Bateria descarregando' 'Bateria atingiu 10%' && "$notif"=1 + [ "$batt" -le 20 ] && [ "$batt" -ge 10 ] && icon="" && [ "$notif" -eq 0 ] && notify-send 'Bateria descarregando' 'Bateria atingiu 20%' && notif=1 - [ "$batt" -ge 10 ] && [ "$batt" -le 20 ] && icon="" && [ "$notif" -eq 0 ] && notify-send 'Bateria descarregando' 'Bateria atingiu 20%' && "$notif"=1 + [ "$batt" -le 50 ] && icon="" - [ "$batt" -ge 20 ] && [ "$batt" -le 50 ] && icon="" + [ "$batt" -ge 90 ] && icon="" - [ "$batt" -le 96 ] && [ "$batt" -ge 90 ] && icon="" + [ "$state" = "Charging" ] && icon="" - [ "$batt" -ge 96 ] && icon="" - - elif [ "$state" -eq "Charging" ]; then - icon="" - - [ "$batt" -ge 98 ] && notify-send 'Bateria completamente carregada!' 'Bateria alcançou 100%' && icon="" - fi + [ "$state" = "Full" ] && icon="" && notify-send && notify-send 'Bateria completamente carregada!' 'Bateria alcançou 100%' && notif=1 printf "%s %d%%" "$icon" "$batt" } @@ -2,8 +2,7 @@ # checks the amount of CPU being used cpu() { - cpu="$(awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1); }' \ - <(grep 'cpu ' /proc/stat) <(sleep 1;grep 'cpu ' /proc/stat))" + cpu="$(cat /proc/loadavg | awk '{print $3}'|cut -f 1 -d ".")" printf " %.0f%%" "$cpu" } |
