aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-04-24 15:20:42 +0900
committerGitHub <noreply@github.com>2024-04-24 15:20:42 +0900
commit6352d78fd42c021094842f63a3a08b31e9177955 (patch)
tree26bfe9901e36c204c2fe8434657c703780106b73 /copy.sh
parent8cd047fcde9dc62f80c2afde4dc9a9c8102f4775 (diff)
parente25a8a4f487ccb4f68682f4885262152ef955f39 (diff)
Merge branch 'development' into rofi
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/copy.sh b/copy.sh
index 7b513a90..f03715a3 100755
--- a/copy.sh
+++ b/copy.sh
@@ -113,6 +113,37 @@ done
printf "\n"
+# Ask whether to change to 12hr format
+while true; do
+ # Ask whether to change to 12hr format
+ echo -e "$ORANGE By default, configs are in 24H format."
+ read -p "$CAT Do you want to change to 12H format (AM/PM)? (y/n): " answer
+
+ # Convert the answer to lowercase for comparison
+ answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
+
+ # Check if the answer is valid
+ if [[ "$answer" == "y" ]]; then
+ # Modify waybar config if 12hr is selected
+ # waybar
+ sed -i 's/^ \/\/"format": " {:%I:%M %p}"/ "format": " {:%I:%M %p}"/' ./config/waybar/modules
+ sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' ./config/waybar/modules
+
+ # for hyprlock
+ sed -i 's|^# text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|text = cmd\[update:1000\] echo "<b><big> $(date +"%I:%M:%S %p") </big></b>" # AM/PM|' ./config/hypr/hyprlock.conf
+ sed -i 's|^text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|# text = cmd\[update:1000\] echo "<b><big> $(date +"%H:%M:%S") </big></b>" # 24H|' ./config/hypr/hyprlock.conf
+
+ break
+ elif [[ "$answer" == "n" ]]; then
+ echo "You chose not to change to 12H format."
+ break
+ else
+ echo "Invalid choice. Please enter y for yes or n for no."
+ fi
+done
+
+printf "\n"
+
# Action to do for better rofi appearance
while true; do
echo "$ORANGE Select monitor resolution for better Rofi appearance:"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage