From ca2632845390c2bc40d578d4e94758cc9ce4889e Mon Sep 17 00:00:00 2001 From: Ethan Edwards Date: Fri, 16 Oct 2020 18:38:29 -0400 Subject: [PATCH] Fix Locale issue Caused some users to have incorrect info because some text manipulation tools were getting confused. --- scripts/battery.sh | 2 ++ scripts/cpu_info.sh | 2 ++ scripts/dracula.sh | 2 ++ scripts/gpu_usage.sh | 2 ++ scripts/network.sh | 2 ++ scripts/ram_info.sh | 2 ++ scripts/sleep_weather.sh | 2 ++ scripts/weather.sh | 3 ++- 8 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/battery.sh b/scripts/battery.sh index 4d57ad0..9d1e52a 100755 --- a/scripts/battery.sh +++ b/scripts/battery.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 linux_acpi() { arg=$1 diff --git a/scripts/cpu_info.sh b/scripts/cpu_info.sh index b96c399..cc10c9d 100755 --- a/scripts/cpu_info.sh +++ b/scripts/cpu_info.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 # function for getting the refresh rate get_tmux_option() { diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 7a67e58..6548fd6 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 get_tmux_option() { local option=$1 diff --git a/scripts/gpu_usage.sh b/scripts/gpu_usage.sh index 785cf8f..d9685c8 100755 --- a/scripts/gpu_usage.sh +++ b/scripts/gpu_usage.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 # function for getting the refresh rate get_tmux_option() { diff --git a/scripts/network.sh b/scripts/network.sh index 145d142..bd7f84e 100755 --- a/scripts/network.sh +++ b/scripts/network.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 HOSTS="google.com github.com example.com" diff --git a/scripts/ram_info.sh b/scripts/ram_info.sh index 98d348d..bddedef 100755 --- a/scripts/ram_info.sh +++ b/scripts/ram_info.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 # function for getting the refresh rate get_tmux_option() { diff --git a/scripts/sleep_weather.sh b/scripts/sleep_weather.sh index d42adb0..b18bf39 100755 --- a/scripts/sleep_weather.sh +++ b/scripts/sleep_weather.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 #wrapper script for running weather on interval diff --git a/scripts/weather.sh b/scripts/weather.sh index b5bf371..8cdcd70 100755 --- a/scripts/weather.sh +++ b/scripts/weather.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash - +# setting the locale, some users have issues with different locales, this forces the correct one +export LC_ALL=en_US.UTF-8 fahrenheit=$1