aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh40
1 files changed, 27 insertions, 13 deletions
diff --git a/copy.sh b/copy.sh
index d3df3874..4bb1c521 100755
--- a/copy.sh
+++ b/copy.sh
@@ -3,7 +3,7 @@
clear
-wallpaper=$HOME/Pictures/wallpapers/Fantasy-Landscape.png
+wallpaper=$HOME/Pictures/wallpapers/Anime-Landscape2.png
Waybar_Style="$HOME/.config/waybar/style/[Pywal] Chroma Tally.css"
# Check if running as root. If root, script will exit
@@ -124,26 +124,38 @@ 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
- sed -i 's/^ "format": " {:%H:%M:%S}"/ \/\/"format": " {:%H:%M:%S}"/' ./config/waybar/modules
+ 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 +"%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)
+ # 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"
+ 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"
- sudo sed -i 's|^HourFormat="HH:mm"|## HourFormat="HH:mm"|' "$sddm_folder/theme.conf"
+ 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."
+ 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."
+ 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."
@@ -237,12 +249,14 @@ printf "\n%.0s" {1..3}
# Detect machine type and set Waybar configurations accordingly, logging the output
if hostnamectl | grep -q 'Chassis: desktop'; then
# Configurations for a desktop
- ln -sf "$HOME/.config/waybar/configs/[TOP] Default" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
+ ln -sf "$HOME/.config/waybar/configs/[TOP] Default_v2" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
rm -r "$HOME/.config/waybar/configs/[TOP] Default Laptop" "$HOME/.config/waybar/configs/[BOT] Default Laptop" 2>&1 | tee -a "$LOG"
+ rm -r "$HOME/.config/waybar/configs/[TOP] Default Laptop_v2" 2>&1 | tee -a "$LOG"
else
# Configurations for a laptop or any system other than desktop
- ln -sf "$HOME/.config/waybar/configs/[TOP] Default Laptop" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
+ ln -sf "$HOME/.config/waybar/configs/[TOP] Default Laptop_v2" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
rm -r "$HOME/.config/waybar/configs/[TOP] Default" "$HOME/.config/waybar/configs/[BOT] Default" 2>&1 | tee -a "$LOG"
+ rm -r "$HOME/.config/waybar/configs/[TOP] Default_v2" 2>&1 | tee -a "$LOG"
fi
printf "\n%.0s" {1..3}
@@ -284,7 +298,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