From fa7e3ee2e7846855e95c0caf50c24ebf5c86afbc Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 30 Jan 2025 22:55:59 +0900 Subject: updated copy.sh to handle the 12H change if user opted --- copy.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index 784207c0..1f0939e2 100755 --- a/copy.sh +++ b/copy.sh @@ -303,31 +303,34 @@ while true; do # Check if the answer is valid if [[ "$answer" == "y" ]]; then # Modify waybar config if 12hr is selected + # Clock 1 - sed -i 's#^\(\s*\)//"format": " {:%I:%M %p}", // AM PM format#\1"format": " {:%I:%M %p}", // AM PM format#' config/waybar/Modules 2>&1 | tee -a "$LOG" - sed -i 's#^\(\s*\) "format": " {:%H:%M:%S}", // 24H#\1// "format": " {:%H:%M:%S}", // 24H#' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)//\("format": " {:%I:%M %p}",\) #\1\2 #g' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)\("format": " {:%H:%M:%S}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # Clock 2 - sed -i 's#^\(\s*\) "format": " {:%H:%M}", // 24H#\1// "format": " {:%H:%M}", // 24H#' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)\("format": " {:%H:%M}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # Clock 3 - sed -i 's#^\(\s*\)//"format": "{:%I:%M %p - %d/%b}", //for AM/PM#\1"format": "{:%I:%M %p - %d/%b}", //for AM/PM#' config/waybar/Modules 2>&1 | tee -a "$LOG" - sed -i 's#^\(\s*\) "format": "{:%H:%M - %d/%b}", // 24H#\1// "format": "{:%H:%M - %d/%b}", // 24H#' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)//\("format": "{:%I:%M %p - %d/%b}",\) #\1\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)\("format": "{:%H:%M - %d/%b}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # Clock 4 - sed -i 's#^\(\s*\)//"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format#\1"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format#' config/waybar/Modules 2>&1 | tee -a "$LOG" - sed -i 's#^\(\s*\) "format": "{:%B | %a %d, %Y | %H:%M}", // 24H#\1// "format": "{:%B | %a %d, %Y | %H:%M}", // 24H#' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)//\("format": "{:%B | %a %d, %Y | %I:%M %p}",\) #\1\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)\("format": "{:%B | %a %d, %Y | %H:%M}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # Clock 5 - sed -i 's#^\(\s*\)//"format": "{:%A, %I:%M %P}", // AM PM format#\1"format": "{:%A, %I:%M %P}", // AM PM format#' config/waybar/Modules 2>&1 | tee -a "$LOG" - sed -i 's#^\(\s*\) "format": "{:%a %d | %H:%M}", // 24H#\1// "format": "{:%a %d | %H:%M}", // 24H#' config/waybar/Modules 2>&1 | tee -a "$LOG" - + sed -i 's#^\(\s*\)//\("format": "{:%A, %I:%M %P}",\) #\1\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" + sed -i 's#^\(\s*\)\("format": "{:%a %d | %H:%M}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" + # for hyprlock sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%H")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%S")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" + + echo "${OK} 12H format set on waybar clocks succesfully." 2>&1 | tee -a "$LOG" # for SDDM (simple-sddm) sddm_folder="/usr/share/sddm/themes/simple-sddm" -- cgit v1.2.3 From 1bcf3ab61608ff3f3c7093146ac6946e34fe1ebb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 31 Jan 2025 00:37:27 +0900 Subject: color coding adjustments --- copy.sh | 2 +- release.sh | 2 +- upgrade.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index 1f0939e2..a6a162e5 100755 --- a/copy.sh +++ b/copy.sh @@ -26,7 +26,7 @@ NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" INFO="$(tput setaf 4)[INFO]$(tput sgr0)" WARN="$(tput setaf 5)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 166) +ORANGE=$(tput setaf 9) YELLOW=$(tput setaf 3) BLUE=$(tput setaf 4) RESET=$(tput sgr0) diff --git a/release.sh b/release.sh index 84005628..86208b70 100755 --- a/release.sh +++ b/release.sh @@ -8,7 +8,7 @@ ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" WARN="$(tput setaf 5)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 166) +ORANGE=$(tput setaf 9) YELLOW=$(tput setaf 3) RESET=$(tput sgr0) diff --git a/upgrade.sh b/upgrade.sh index d3f68d64..d35068b7 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -10,7 +10,7 @@ ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" WARN="$(tput setaf 5)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 166) +ORANGE=$(tput setaf 9) YELLOW=$(tput setaf 3) RESET=$(tput sgr0) -- cgit v1.2.3 From 090cc93f75c7eea189415b2c7a788018a91578c6 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 31 Jan 2025 00:52:54 +0900 Subject: color coding update --- copy.sh | 4 ++-- release.sh | 4 ++-- upgrade.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index a6a162e5..18220c07 100755 --- a/copy.sh +++ b/copy.sh @@ -24,9 +24,9 @@ OK="$(tput setaf 2)[OK]$(tput sgr0)" ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" INFO="$(tput setaf 4)[INFO]$(tput sgr0)" -WARN="$(tput setaf 5)[WARN]$(tput sgr0)" +WARN="$(tput setaf 1)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 9) +ORANGE=$(tput setaf 5) YELLOW=$(tput setaf 3) BLUE=$(tput setaf 4) RESET=$(tput sgr0) diff --git a/release.sh b/release.sh index 86208b70..016125a6 100755 --- a/release.sh +++ b/release.sh @@ -6,9 +6,9 @@ OK="$(tput setaf 2)[OK]$(tput sgr0)" ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" -WARN="$(tput setaf 5)[WARN]$(tput sgr0)" +WARN="$(tput setaf 1)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 9) +ORANGE=$(tput setaf 5) YELLOW=$(tput setaf 3) RESET=$(tput sgr0) diff --git a/upgrade.sh b/upgrade.sh index d35068b7..a094a58a 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -8,9 +8,9 @@ OK="$(tput setaf 2)[OK]$(tput sgr0)" ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" -WARN="$(tput setaf 5)[WARN]$(tput sgr0)" +WARN="$(tput setaf 1)[WARN]$(tput sgr0)" CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" -ORANGE=$(tput setaf 9) +ORANGE=$(tput setaf 5) YELLOW=$(tput setaf 3) RESET=$(tput sgr0) -- cgit v1.2.3