[READ-ONLY] Mirror of https://github.com/jmrplens/ShellFish-Widgets. Bash scripts to send information from the server to the widget.
0

Configure Feed

Select the types of activity you want to include in your feed.

Update small_widget_A.sh

authored by

José M. Requena Plens and committed by
GitHub
(Sep 7, 2024, 11:41 PM +0200) 8b6e343a 79444202

+4 -4
+4 -4
small_widget_A.sh
··· 80 80 mem_string="${mem_percent}%" 81 81 82 82 # 2. Disk usage as a percentage 83 - disk_info_percent=$(df /dev/${DISK} -h --output=pcent | tail -1 | tr -d ' %') 84 - disk_total_size="$(df /dev/${DISK} -h --output=size | tail -1)B" 85 - disk_used_size="$(df /dev/${DISK} -h --output=used | tail -1)B" 83 + disk_info_percent=$(df /dev/"${DISK}" -h --output=pcent | tail -1 | tr -d ' %') 84 + disk_total_size=$(df /dev/"${DISK}" -h --output=size | tail -1)B 85 + disk_used_size=$(df /dev/"${DISK}" -h --output=used | tail -1)B 86 86 87 87 # String for disk usage as a percentage 88 88 disk_string="${disk_info_percent}%" ··· 161 161 162 162 # Widget command using SF Symbols and strings in the correct format with colors 163 163 widget \ 164 - --target ${TARGET} \ 164 + --target "${TARGET}" \ 165 165 --text "${SERVER_NAME} " --color "foreground" --icon thermometer --color "$temp_color" --text " $cpu_temp_string\n" \ 166 166 --color "foreground" --text " " --icon cpu --text " $cpu_string\n" --color "$cpu_color" --progress "$cpu_string" --text "\n" \ 167 167 --color "foreground" --text " " --icon memorychip --text " $mem_string\n" --color "$memory_color" --progress "$mem_string" --text "\n" \