diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2024-04-25 22:43:39 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 22:43:39 +0900 |
| commit | 2851f4999eb5777d5422870f30e2b0e5f9890793 (patch) | |
| tree | 8316292368e595e6fb98153aec291630c26bbe6b /copy.sh | |
| parent | 008cf215d3e02b3b86d81576b7672658c3c6533f (diff) | |
| parent | da27791de1831924aa07ba1d5b969e82affa17ec (diff) | |
Merge pull request #219 from JaKooLit/development
Development to main v2.2.8
Diffstat (limited to 'copy.sh')
| -rwxr-xr-x | copy.sh | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -113,6 +113,45 @@ 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 + 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 + + # for SDDM (custom theme) + sddm_folder="/usr/share/sddm/themes/simple-sddm" + if [ -d "$sddm_folder" ]; then + echo "Simple sddm exists. Editing to 12H format" + + sudo sed -i 's|^## HourFormat="hh:mm AP"|HourFormat="hh:mm AP"|' "$sddm_folder/theme.conf" + sudo sed -i 's|^HourFormat="HH:mm"|## HourFormat="HH:mm"|' "$sddm_folder/theme.conf" + + echo "12H format set to SDDM theme successfully." + fi + 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:" |
