aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2024-05-28 06:42:46 +0900
committerJaKooLit <jimmielovejay@gmail.com>2024-05-28 06:42:46 +0900
commitb1b25e670ce12cdd6844db08d08e2e358d374543 (patch)
tree1eaa9dc6a6857a50aa63440d4fd7c7ba1a40707d /copy.sh
parentf593df6b480bb082f4131486822b755c334fedc7 (diff)
Collected all extra modules, (except camellia) into waybar/modules for easy management. Same adjusted copy.sh to take effect all clock modules if 12H chosen by user
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/copy.sh b/copy.sh
index b05b996c..89f9086d 100755
--- a/copy.sh
+++ b/copy.sh
@@ -126,9 +126,25 @@ while true; do
# Check if the answer is valid
if [[ "$answer" == "y" ]]; then
# Modify waybar config if 12hr is selected
- sed -i 's/^ \/\/"format": " {:%I:%M %p}"/ "format": " {:%I:%M %p}"/' config/waybar/modules 2>&1 | tee -a "$LOG"
- sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' config/waybar/modules 2>&1 | tee -a "$LOG"
+ # Clock 1
+ sed -i 's#^ \/\/"format": " {:%I:%M %p}", // AM PM format# "format": " {:%I:%M %p}", // AM PM format#' config/waybar/modules 2>&1 | tee -a "$LOG"
+ sed -i 's#^ "format": " {:%H:%M:%S}", // 24H# \/\/"format": " {:%H:%M:%S}", // 24H#' config/waybar/modules 2>&1 | tee -a "$LOG"
+ # Clock 2
+ sed -i 's#^ "format": " {:%H:%M}", // 24H# \/\/"format": " {:%H:%M}", // 24H#' config/waybar/modules 2>&1 | tee -a "$LOG"
+
+ # Clock 3
+ sed -i 's#^ \/\/"format": "{:%I:%M %p - %d/%b}", //for AM/PM# "format": "{:%I:%M %p - %d/%b}", //for AM/PM#' config/waybar/modules 2>&1 | tee -a "$LOG"
+ sed -i 's#^ "format": "{:%H:%M - %d/%b}", // 24H# \/\/"format": "{:%H:%M - %d/%b}", // 24H#' config/waybar/modules 2>&1 | tee -a "$LOG"
+
+ # Clock 4
+ sed -i 's#^ \/\/"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format# "format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format#' config/waybar/modules 2>&1 | tee -a "$LOG"
+ sed -i 's#^ "format": "{:%B | %a %d, %Y | %H:%M}", // 24H# \/\/"format": "{:%B | %a %d, %Y | %H:%M}", // 24H#' config/waybar/modules 2>&1 | tee -a "$LOG"
+
+ # Clock 5
+ sed -i 's#^ \/\/"format": "{:%A, %I:%M %P}", // AM PM format# "format": "{:%A, %I:%M %P}", // AM PM format#' config/waybar/modules 2>&1 | tee -a "$LOG"
+ sed -i 's#^ "format": "{:%a %d | %H:%M}", // 24H# \/\/"format": "{:%a %d | %H:%M}", // 24H#' config/waybar/modules 2>&1 | tee -a "$LOG"
+
# 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 2>&1 | tee -a "$LOG"
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 2>&1 | tee -a "$LOG"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage