aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh53
1 files changed, 52 insertions, 1 deletions
diff --git a/copy.sh b/copy.sh
index 7b513a90..807507de 100755
--- a/copy.sh
+++ b/copy.sh
@@ -113,6 +113,57 @@ done
printf "\n"
+# Ask whether to change to 12hr format
+while true; do
+ 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
+ sed -i 's/^ \/\/"format": " {:%I:%M %p}"/ "format": " {:%I:%M %p}"/' ./config/waybar/modules 2>&1 | tee -a "$LOG" || true
+ sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' ./config/waybar/modules 2>&1 | tee -a "$LOG" || true
+
+ # 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
+
+ # for SDDM (simple-sddm)
+ sddm_folder="/usr/share/sddm/themes/simple-sddm"
+ if [ -d "$sddm_folder" ]; then
+ echo "Simple sddm exists. Editing to 12H format" 2>&1 | tee -a "$LOG"
+
+ sudo sed -i 's|^## HourFormat="hh:mm AP"|HourFormat="hh:mm AP"|' "$sddm_folder/theme.conf" 2>&1 | tee -a "$LOG" || true
+ sudo sed -i 's|^HourFormat="HH:mm"|## HourFormat="HH:mm"|' "$sddm_folder/theme.conf" 2>&1 | tee -a "$LOG" || true
+
+ echo "12H format set to SDDM theme successfully." 2>&1 | tee -a "$LOG"
+ fi
+
+ # for SDDM (simple-sddm-2)
+ sddm_folder_2="/usr/share/sddm/themes/simple-sddm-2"
+ if [ -d "$sddm_folder_2" ]; then
+ echo "Simple sddm 2 exists. Editing to 12H format" 2>&1 | tee -a "$LOG"
+
+ sudo sed -i 's|^## HourFormat="hh:mm AP"|HourFormat="hh:mm AP"|' "$sddm_folder_2/theme.conf" 2>&1 | tee -a "$LOG" || true
+ sudo sed -i 's|^HourFormat="HH:mm"|## HourFormat="HH:mm"|' "$sddm_folder_2/theme.conf" 2>&1 | tee -a "$LOG" || true
+
+ echo "12H format set to SDDM theme successfully." 2>&1 | tee -a "$LOG"
+ fi
+
+ break
+ elif [[ "$answer" == "n" ]]; then
+ echo "You chose not to change to 12H format." 2>&1 | tee -a "$LOG"
+ 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:"
@@ -245,7 +296,7 @@ done
ln -sf "$Waybar_Style" "$HOME/.config/waybar/style.css" && \
# initialize pywal to avoid config error on hyprland
-wal -i $wallpaper -s -t 2>&1 | tee -a "$LOG"
+wal -i $wallpaper -s -t -n -e 2>&1 | tee -a "$LOG"
#initial symlink for Pywal Dark and Light for Rofi Themes
ln -sf "$HOME/.cache/wal/colors-rofi-dark.rasi" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage