tmux
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# shellcheck source=scripts/helpers.sh
|
||||
source "$CURRENT_DIR/helpers.sh"
|
||||
|
||||
# script global variables
|
||||
@ -21,13 +22,15 @@ get_icon_settings() {
|
||||
}
|
||||
|
||||
print_icon() {
|
||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
||||
local gpu_load_status=$(load_status $gpu_percentage)
|
||||
if [ $gpu_load_status == "low" ]; then
|
||||
local gpu_percentage
|
||||
local gpu_load_status
|
||||
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
|
||||
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
|
||||
if [ "$gpu_load_status" == "low" ]; then
|
||||
echo "$gpu_low_icon"
|
||||
elif [ $gpu_load_status == "medium" ]; then
|
||||
elif [ "$gpu_load_status" == "medium" ]; then
|
||||
echo "$gpu_medium_icon"
|
||||
elif [ $gpu_load_status == "high" ]; then
|
||||
elif [ "$gpu_load_status" == "high" ]; then
|
||||
echo "$gpu_high_icon"
|
||||
fi
|
||||
}
|
||||
@ -36,4 +39,4 @@ main() {
|
||||
get_icon_settings
|
||||
print_icon "$1"
|
||||
}
|
||||
main
|
||||
main "$@"
|
||||
|
Reference in New Issue
Block a user