Nuevos scripts

Se añaden scripts para utilizarse con i3blocks y también se añaden otros scripts de utilidad
This commit is contained in:
Tuxliban Torvalds 2020-03-13 06:11:06 -06:00
parent fa2e5cf7b8
commit 2f4fb87f9a
50 changed files with 660 additions and 0 deletions

34
i3blocks/Arch/bat.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
Bat=$(acpi | cut -d " " -f4 | tr -d "%,")
Adapt=$(acpi -a | cut -d " " -f3)
if [ "$Adapt" = "on-line" ];then
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
else
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
fi
if [ -z "$Bat" ];then
bat="$icon4 $Adapt"
elif [ "$Bat" -gt "100" ];then
bat="$icon4 Full"
elif [ "$Bat" -gt "90" ];then
bat="$icon3 $Bat %"
elif [ "$Bat" -gt "60" ];then
bat="$icon2 $Bat %"
elif [ "$Bat" -gt "30" ];then
bat="$icon1 $Bat %"
elif [ "$Bat" -lt "30" ];then
bat="$icon0 $Bat %"
fi
echo -e "$bat"

5
i3blocks/Arch/cpu.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
Cpu=$(mpstat -u | grep "all" | awk '{print $4"%"}')
echo -e "$Cpu"

3
i3blocks/Arch/date.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo -e "$(date +%D)$(date +%T)"

10
i3blocks/Arch/disk.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
Disk=$(df -h "$1" | grep -v "^[A-Z]" | awk '{print $3-G"/"$2}')
if [ -z "$1" ];then
echo -e "Enter Your Mounted Point Name Ex : \"/\" "
else
echo -e "$Disk "
fi
unset Disk

15
i3blocks/Arch/focus.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
focus=$(xdotool getactivewindow getwindowname)
focus_Number=$(xdotool getactivewindow getwindowname | wc -c)
Focus_N=$(xdotool getactivewindow getwindowname | head -c 40 )
if [ "$focus" = "" ];then
echo -e " : Void Linux "
else
if [ "$focus_Number" -gt "40" ];then
echo -e " : $Focus_N ..."
else
echo -e " : $focus"
fi
fi

5
i3blocks/Arch/key_l.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
Key=$(setxkbmap -query | grep "^layout" | awk '{print $2}')
echo -e "$Key"

3
i3blocks/Arch/lang.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo -e "$LANGUAGE"

20
i3blocks/Arch/mem.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
Mem=$(free -h | grep "^Mem:" | awk '{print $3}')
Swap=$(free -h | grep "^Swap:" | awk '{print $3}')
if [ -z "$1" ];then
echo -e " $0 : no Argument \n\t -m : Show Memory usage \n\t -s : Show Swap usage "
fi
case "$1" in
"-m" )
echo -e "$Mem"
;;
"-s" )
echo -e "$Swap"
;;
esac
unset Mem
unset Swap

16
i3blocks/Arch/mocp.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
Title=$(mocp -i | grep "^Title:" | cut -d ":" -f2)
NUM_Title=$(echo -e "$Title" | wc -c )
S_Title=$(echo -e "$Title" | head -c 30)
Status=$(mocp -i | grep "^State:" | cut -d ":" -f2)
if [ "$Status" != " PLAY" ];then
echo -e " : Pause"
else
if [ "$NUM_Title" -lt 30 ];then
echo -e " : $Title "
else
echo -e " : $S_Title ... "
fi
fi

14
i3blocks/Arch/mpd.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
NCMP=$(mpc | grep "^\[playing\]" | awk '{print $1}')
NUM_NCMP=$(mpc | head -1 | wc -c )
S_NCMP=$(mpc | head -1 | head -c 30)
if [ "$NCMP" = "[playing]" ];then
if [ "$NUM_NCMP" -lt 30 ];then
echo -e " :$(mpc current) "
else
echo -e " : $S_NCMP..."
fi
else
echo -e " :Pause "
fi

39
i3blocks/Arch/net.sh Executable file
View File

@ -0,0 +1,39 @@
#!/bin/bash
# Show Wifi Stuff
W_inter=$(ip link | grep "[1-9]: wlp" | cut -d " " -f2 | tr -d ':')
W_con=$(nmcli d | grep "$W_inter" | awk '{print $3}')
W_name=$(nmcli d | grep "$W_inter" | awk '{print $4}')
W_ip=$(ifconfig $W_inter | grep 'netmask' | awk '{print $6}')
# Show Ethernet stuff
E_inter=$(ip link | grep "^[1-9]: enp" | cut -d " " -f2 | tr -d :)
E_con=$(nmcli d | grep "$E_inter" | awk '{print $3}')
E_name=$(nmcli d | grep "$E_inter" | awk '{print $4}')
E_ip=$(ifconfig $E_inter | grep 'netmask' | awk '{print $6}')
Wifi () {
if [ "$W_con" = "connected" ];then
echo -w "$W_ip ($W_name)"
fi
}
Ethernet () {
if [ "$E_con" = "connected" ];then
echo -e "$E_ip ($E_name)"
fi
}
case "$1" in
"-w" )
Wifi
;;
"-e" )
Ethernet
;;
* )
echo -e " $0 : no Argument \n\t -e : Show Ethernet \n\t -w : Show Wireless"
;;
esac

5
i3blocks/Arch/temp.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
temp=$(sensors | grep "^CPU" | awk '{print $2}' | tr -d "+" )
echo -e "$temp"

9
i3blocks/Arch/touchpad.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
Status=$(synclient -l | grep Touchpad | awk '{print $3}')
if [ "$Status" = "0" ];then
echo -e "  Enable "
else
echo -e "  Disable "
fi

9
i3blocks/Arch/trash.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
trash=$(ls -A -1 ~/.local/share/Trash/files/ | wc -l)
if [ "$trash" = "0" ];then
echo -e ""
else
echo -e "$trash "
fi

9
i3blocks/Arch/update.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
update=$(checkupdates | cut -d " " -f1 | wc -l)
if [ "$update" = "0" ];then
echo -e ""
else
echo -e "$Update"
fi

5
i3blocks/Arch/uptime.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
UPTIME=$(uptime -p | sed "s/hour/H/" | sed "s/minutes/M/" | sed "s/up //")
echo -e "$UPTIME "

23
i3blocks/Arch/vol.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
Vol=$(amixer -c 0 get Master | grep "Mono:" | awk '{print $4}' | tr -d "[ %]")
Mute=$(amixer -c 0 get Master | grep "Mono:" | awk '{print $6}' | tr -d "[-]")
if [ "$Mute" = "off" ];then
echo -e " Mute"
else
if [ "$Vol" -gt "80" ];then
echo -e "$Vol %"
elif [ "$Vol" -gt "60" ];then
echo -e "$Vol %"
elif [ "$Vol" -gt "40" ];then
echo -e "$Vol %"
elif [ "$Vol" -gt "20" ];then
echo -e "$Vol %"
elif [ "$Vol" -eq "0" ];then
echo -e "$Vol %"
fi
fi
unset Vol
unset Mute

168
i3blocks/README.md Normal file
View File

@ -0,0 +1,168 @@
## Scripts sencillos pero funionales para utilizar con i3blocks. Siéntete libre de editarlos para adaptarlos a tus necesidades
| i3blocks Script | Dependencias |
|-----------------|-------------------|
| bat.sh | ACPI |
| date.sh | ------ |
| focus.sh | Xdotool |
| mem.sh | ------ |
| mpd.sh | Mpd, Ncmpcpp, Mpc |
| mocp.sh | Moc |
| temp.sh | lm-sensors |
| trash.sh | ---- |
| vol.sh | alsa-utils |
| cpu.sh | sysstat |
| disk.sh | ------ |
| key_l.sh | ------ |
| net.sh | ------ |
| touchpad.sh | ------ |
| update.sh | checkupdates |
| long.sh | ------ |
| uptime.sh | ------ |
---
### Instalación
git clone https://github...
### Configuración
##### Batería
[Bat]
command=~/.config/i3blocks/Blocks/bat.sh
interval=30
color=#CC0099
##### Fecha y hora
[Time]
command=~/.config/i3blocks/Blocks/date.sh
interval=60
color=#6699FF
##### Ventana enfocada
[Focus]
command=~/.config/i3blocks/Blocks/focus.sh
interval=1
color=#FF6666
##### Memoria ram
[Ram]
command=~/.config/i3blocks/Blocks/mem.sh -m
interval=10
color=#FF6600
##### Área de intercambio
[Swap]
command=~/.config/i3blocks/Blocks/mem.sh -s
interval=10
color=#6699FF
##### MPD
[MPD]
command=~/.config/i3blocks/Blocks/mpd.sh
interval=5
color=#66CCFF
##### Temperatura del cpu
[Temp]
command=~/.config/i3blocks/Blocks/temp.sh
interval=60
color=#6699FF
##### Papelera de reciclaje
[Trash]
command=~/.config/i3blocks/Blocks/trash.sh
interval=60
color=#c68c53
##### Volumen
[Vol]
command=~/.config/i3blocks/Blocks/Vol.sh
interval=3
color=#9933FF
##### Uso del cpu
[Cpu]
command=~/.config/i3blocks/Blocks/cpu.sh
interval=5
color=#FFFF66
##### Uso del disco
[Disk]
command=~/.config/i3blocks/Blocks/disk.sh /
interval=60
color=#CC6699
##### Distribución del teclado
[Key]
command=~/.config/i3blocks/Blocks/key_l.sh
interval=once
color=#33ff33
##### Mocp
[Mocp]
command=~/.config/i3blocks/Blocks/mocp.sh
interval=60
color=#66CCFF
##### Conexión Ethernet
[Ether]
command=~/.config/i3blocks/Blocks/net.sh -e
interval=10
color=#CC99FF
##### Conexión Wifi
[Ether]
command=~/.config/i3blocks/Blocks/net.sh -w
interval=10
color=#CC99FF
##### Touchpad
[Touchpad]
command=~/.config/i3blocks/Blocks/touchpad.sh
interval=10
color=#4d4dff
##### Actualizaciones
[Update]
command=~/.config/i3blocks/Blocks/update.sh
interval=600
color=#FFCC99
##### Tiempo de uso
[Uptime]
command=~/.config/i3blocks/Blocks/uptime.sh
interval=60
color=#FFCC00
##### Idioma del sistema
[Long]
command=~/.config/i3blocks/Blocks/long.sh
interval=600
color=#FFFF99
### [!] NOTA:
Necesitarás intalar el paquete fonts awesome

BIN
i3blocks/screenshot/bat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
i3blocks/screenshot/cpu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

BIN
i3blocks/screenshot/mem.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
i3blocks/screenshot/mpd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
i3blocks/screenshot/net.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
i3blocks/screenshot/vol.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

30
varios/bateria Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
## Script de notificación para la bateria
restante=$(acpi | awk '{print $5}')
estado=$(acpi | awk '{print $3}' | cut -d"," -f1)
porcentaje=$(cat /sys/class/power_supply/BAT1/capacity)
# Si el porcentaje de bateria es menor o igual a 30 y mayor a 25, mostrar el mensaje
if [ "$porcentaje" -le 30 ] && [ "$porcentaje" -gt 25 ]; then
notify-send --urgency=normal -i $HOME/.icons/status/battery_low.png "Conectar el cargador" "Tiempo de bateria disponible $restante"
fi
# Si el porcentaje de bateria es igual o menor a 25, mostrar el siguiente mensaje y...
# 1. Si se conecta el cargador no suspender el equipo
# 2. Si no se conecta el cargador suspender el equipo
if [ "$porcentaje" -le 25 ]; then
notify-send --urgency=critical -i $HOME/.icons/status/battery_critical.png "Batería crítica" "Activando modo de ahorro de \nenergia en 30 segundos..."
sleep 30 &&
if [ "$estado" == 'Charging' ]; then
notify-send --urgency=normal "Cargando bateria"
else
doas zzz
fi
fi
# Si el porcentaje de la bateria es igual al 100% mostrar el siguiente mensaje
#if [ "$porcentaje" -eq "100" ]; then
# notify-send --urgency=normal -i $HOME/.icons/status/battery_charged.png "Bateria cargada" "Puede desconectar el cargador"
#fi

4
varios/clima Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
CIUDAD=Orizaba
CLIMA=$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")
echo " $CLIMA" > /tmp/weather

7
varios/dropbox Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if $(pgrep dropbox); then
echo ""
else
echo ""
fi

2
varios/dunst_sound Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
aplay $HOME/Datos/Git_Hub/Void_Linux/dots/config/dunst/beep.wav

30
varios/feed-void Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
if [ -f /usr/bin/rsstail ];then
feed="https://github.com/void-linux/void-packages/commits/master.atom"
updatedpkgs="$(rsstail -1 -u ${feed} | grep -e "Update" -e "update" | wc -l)"
newpkgs="$(rsstail -1 -u ${feed} | grep -e "New" -e "new" | wc -l)"
sysupdates="$(xbps-install -nuM | wc -l)"
#sysupdates="$(xbps-install -Snu | wc -l)"
notify-send --urgency=critical """CAMBIOS EN EL REPOSITORIO:
Paquetes actualizados: ${updatedpkgs}
Nuevos paquetes: ${newpkgs}
ACTUALIZACIONES DE SISTEMA:
Disponible actualmente: ${sysupdates}"""
echo """CAMBIOS EN EL REPOSITORIO:
Paquetes actualizados: ${updatedpkgs}
Nuevos paquetes: ${newpkgs}
ACTUALIZACIONES DE SISTEMA:
Disponible actualmente: ${sysupdates}"""
elif [ ! -f /usr/bin/rsstail ];then
echo "[ERROR] Este script requiere del paquete: 'rsstail'"
exit 0;
else
echo "Algo salió mal al verificar: /usr/bin/rsstail"
exit 0;
fi

20
varios/hosts Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# V0.3_3
# Script para descargar una lista personalizada con direcciones para bloquearlas
# a través del fichero hosts
# Para automatizar este proceso se recomienda crear una tarea (crontab) y ajustarla a las necesidades del usuario (diario, semanal
# mensual, etc)
# Realizar copia de seguridad del fichero hosts previo
echo -e "\e[1;32mCreando copia de seguridad del fichero hosts...\e[0m"; cp /etc/hosts /etc/hosts.bak && sleep 1s; echo -e "\e[33mOK\e[0m"
# Descargar lista mas reciente del repositorio y copiarlo al fichero hosts
echo -e "\e[1;32mDescargando y copiando lista actualizada para fichero hosts...\e[0m"; wget -O /etc/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts && sleep 1s; echo -e "\e[33mOK\e[0m"
# Agregando lista personalizada de páginas al fichero hosts
echo -e "\e[1;32mAgregando parche de lista personalizada al fichero hosts...\e[0m"; cat /home/skynet/Datos/Git_Hub/Void_Linux/otros/parche >> /etc/hosts; sleep 2; doas sv restart dhcpcd &&
# Notificacion de actualizacion del fichero
echo -e "\e[1;36mTarea finalizada. Fichero host actualizado\e[0m"; notify-send -t 5000 -i /home/skynet/.icons/status/hosts_update.png "Tarea finalizada" 'Fichero hosts actulizado'

26
varios/lock Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
## V0.2
# Para poder utilizar la siguiente configuración se necesita de los siguiente:
# 1. i3lock
# 2. scrot
# 3. imagemagick
# 4. xautolock (opcional)
## Realizar captura de pantalla
#scrot /tmp/screenshot.png;
## Aplicar efecto difuso a imagen con ayuda de imagemagick
#convert /tmp/screenshot.png -blur 0x4 /tmp/screenshotblur.png;
## Utilizar imagen previa con i3lock
#i3lock -i /tmp/screenshotblur.png
## Para configurar el bloqueo automático de la pantalla se utiliza xautolock
xautolock -time 10 locker lock
#-------------------------------------------------------------------------------------------------------------------------
## Esta configuración funciona con i3lock-color
sleep 1; i3lock -k -B --blur --veriftext=Revisando --wrongtext=Incorrecto --keylayout 1 --insidevercolor=00ff38ff --insidewrongcolor=c10000ff --insidecolor=ffffff40 --ringvercolor=0020ffff --ringwrongcolor=e8df02ff --ringcolor=404090ff --linecolor=ffffffff --keyhlcolor=30ccccff --bshlcolor=ff8000ff --timecolor=000000ff

26
varios/lock.bak Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
## V0.2
# Para poder utilizar la siguiente configuración se necesita de los siguiente:
# 1. i3lock
# 2. scrot
# 3. imagemagick
# 4. xautolock (opcional)
## Realizar captura de pantalla
#scrot /tmp/screenshot.png;
## Aplicar efecto difuso a imagen con ayuda de imagemagick
#convert /tmp/screenshot.png -blur 0x4 /tmp/screenshotblur.png;
## Utilizar imagen previa con i3lock
#i3lock -i /tmp/screenshotblur.png
## Para configurar el bloqueo automático de la pantalla se utiliza xautolock
#xautolock -time 10 locker lock
#-------------------------------------------------------------------------------------------------------------------------
## Esta configuración funciona con i3lock-color
sleep 1; i3lock -k -B --blur=sigma --veriftext=Revisando --wrongtext=Incorrecto --keylayout 1 --insidevercolor=00ff38ff --insidewrongcolor=c10000ff --insidecolor=ffffff40 --ringvercolor=0020ffff --ringwrongcolor=e8df02ff --ringcolor=404090ff --linecolor=ffffffff --keyhlcolor=30ccccff --bshlcolor=ff8000ff --timecolor=000000ff

24
varios/menu-apagar Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
RET=$(echo "" Apagar"\n" Reiniciar"\n" Bloquear"\n" Suspender"\n" Hibernar"\n" logout"\ncancel" | dmenu -l 7 -p " Logout")
case $RET in
" Apagar")
doas shutdown -h now
;;
" Reiniciar")
doas shutdown -r now
;;
" Bloquear")
slock
;;
" Suspender")
slock && doas zzz
;;
" Hibernar")
slock && doas ZZZ
;;
" logout")
xdotool key "super+shift+q"
;;
*) ;;
esac

41
varios/popup-calendar Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
BAR_HEIGHT=22 # polybar height
BORDER_SIZE=1 # border size from your wm settings
YAD_WIDTH=222 # 222 is minimum possible value
YAD_HEIGHT=193 # 193 is minimum possible value
DATE="$(date +"%a %d/%b/%Y - %R")"
case "$1" in
--popup)
if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then
exit 0
fi
eval "$(xdotool getmouselocation --shell)"
eval "$(xdotool getdisplaygeometry --shell)"
# X
if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side
: $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))
elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side
: $((pos_x = BORDER_SIZE))
else #Center
: $((pos_x = X - YAD_WIDTH / 2))
fi
# Y
if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom
: $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))
else #Top
: $((pos_y = BAR_HEIGHT + BORDER_SIZE))
fi
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
--width=$YAD_WIDTH --height=$YAD_HEIGHT --posx=$pos_x --posy=$pos_y \
--title="yad-calendar" --borders=0 >/dev/null &
;;
*)
echo "$DATE"
;;
esac

12
varios/screenshot Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
Seleccionar=$(echo "Portapapeles\nGuardar\ncancel" | dmenu -l 3 -p "Screenshot")
case $Seleccionar in
"Portapapeles")
scrot -s /tmp/'select-%F_%T.png' -e 'xclip -selection c -t image/png < $f'
;;
"Guardar")
scrot -s -d 2 -q 100 'Select_%F_%H%M%S_$wx$h.png' -e 'mv $f /home/skynet/Datos/Capturas/select'; sleep 1; exec notify-send -t 5000 --icon=/home/skynet/.icons/workspace.png 'Área seleccionda' 'guardada en: ~/Datos/Capturas/select'
;;
*) ;;
esac

13
varios/statusbar Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
while true; do
DATE=$(date +" %a %d %b  %R")
MEM=$(free -h | awk '/^Mem:/ {print $3}')
CPU=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
BATTERY=$(acpi -b | awk '{print $3, $4}' | tr -d ',')
CLIMA=$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")
BRILLO=$(light)
PAPELERA=$(find ~/.local/share/Trash/files/ -maxdepth 1 | wc -l)
xsetroot -name " $CLIMA | $MEM | $CPU | ☀ $BRILLO |  $PAPELERA | $BATTERY | $DATE"
sleep 60
done

3
varios/trash Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
## Buscar en el directorio actual de forma no recursiva
find ~/.local/share/Trash/files/ -maxdepth 1 | wc -l

26
varios/updates-void Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
lista=$(xbps-install -nuM | awk '{print $1}' )
lista2=$(xbps-install -nuM | awk '{print $1}' | tail -n 10 )
updates=$(xbps-install -nuM | wc -l)
if [ "$updates" -eq 1 ]; then
notify-send -i "$HOME/.icons/status/package-upgrade.png" "Hay una actualización disponible:" "$lista"
echo "$updates"
elif [ "$updates" -le 5 ] && [ "$updates" -gt 1 ]; then
notify-send -i "$HOME/.icons/status/package-upgrade.png" "Hay $updates actualizaciones disponibles:" "$lista"
echo "$updates"
elif [ "$updates" -gt 5 ]; then
notify-send -i "$HOME/.icons/status/package-upgrade.png" "Hay $updates actualizaciones disponibles:" "$lista2 \n..."
echo "$updates"
else
echo ""
fi
sleep 180;
if [ -n "$updates" ] && [ "$updates" -lt 1 ]; then
echo ""
else
echo "$updates"
fi

4
varios/wallpaper Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
## Establecer un wallpaper aleatorio utilizando 'feh'
feh --bg-fill --randomize --no-fehbg $HOME/Wallpaper/* &