aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/copy.sh b/copy.sh
index 2efc116a..7f29b34e 100755
--- a/copy.sh
+++ b/copy.sh
@@ -173,10 +173,7 @@ cp -r config/* ~/.config/ && { echo "${OK}Copy completed!"; } || { echo "${ERROR
mkdir -p ~/Pictures/wallpapers
cp -r wallpapers ~/Pictures/ && { echo "${OK}Copy completed!"; } || { echo "${ERROR} Failed to copy wallpapers."; exit 1; } 2>&1 | tee -a "$LOG"
-# Initial Symlinks to avoid errors
-# symlinks for waybar
-ln -sf "$HOME/.config/waybar/configs/Default [TOP]" "$HOME/.config/waybar/config" && \
-ln -sf "$HOME/.config/waybar/style/Golden Noir.css" "$HOME/.config/waybar/style.css" && \
+
# Set some files as executable
@@ -206,6 +203,23 @@ if [[ $WALL =~ ^[Yy]$ ]]; then
fi
fi
+# Initial Symlinks to avoid errors
+
+# 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/Default [TOP]" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
+ rm -r "$HOME/.config/waybar/configs/Def[TOP]-Laptop" "$HOME/.config/waybar/configs/Def[Bottom]-Laptop" 2>&1 | tee -a "$LOG"
+else
+ # Configurations for a laptop or any system other than desktop
+ ln -sf "$HOME/.config/waybar/configs/Def[TOP]-Laptop" "$HOME/.config/waybar/config" 2>&1 | tee -a "$LOG"
+ rm -r "$HOME/.config/waybar/configs/Default [TOP]" "$HOME/.config/waybar/configs/Default [Bottom]" 2>&1 | tee -a "$LOG"
+fi
+
+
+# symlinks for waybar style
+ln -sf "$HOME/.config/waybar/style/Golden Noir.css" "$HOME/.config/waybar/style.css" && \
+
# initialize pywal to avoid config error on hyprland
wal -i ~/Pictures/wallpapers/mecha-nostalgia.png 2>&1 | tee -a "$LOG"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage