#!/bin/bash

DEVICE=$HOSTNAME
echo "📥 Sammle Konfigurationen für $DEVICE..."
copy() {
    src="$1"
    dst="$2"
    dstfile="$(basename "$src").$DEVICE"
    mkdir -p "$dst"
    rsync "$src" "$dst/$dstfile"
    echo "✅ $src → $dst/$dstfile"
}

#hyprland
copy ~/.config/hypr/hyprland.conf ./Hyprland

#waybar
copy ~/.config/waybar/style.css ./Waybar
copy ~/.config/waybar/config.jsonc ./Waybar
cp -rv ~/.config/waybar/scripts/ ./Waybar/

#rsync ~/.config/waybar/frappe.css ./Waybar

#nvim
copy ~/.config/nvim/init.lua ./Nvim
copy ~/.config/nvim/lazy-lock.json ./Nvim
cp -rv ~/.config/nvim/lua ./Nvim

#tmux
#copy ~/.tmux.conf ./Tmux

#zsh
copy ~/.zshrc ~/.zsh

#sddm
copy /etc/sddm.conf ./Sddm

#hyprpaper
copy ~/.config/hypr/hyprpaper.conf ./Hyprpaper
#Wallpaper
rsync -r ~/Pictures/Wallpaper/ ./wallpaper

#hyprlock
#copy ~/.config/hypr/hyprlock.conf ./Hyprlock

#kitty
copy ~/.config/kitty/ ./Kitty

#pywal
rsync -rv ~/.cache/wal/ ./Pywal
