Added script to create .config, added script to copy Repo .config to
~/.config, started reworking README.org
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
# Source and destination directories
|
||||
SOURCE_DIR="./assets/conf/.config"
|
||||
DEST_DIR="$HOME/.config"
|
||||
# Check if source directory exists
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "Error: Source directory $SOURCE_DIR does not exist."
|
||||
exit 1
|
||||
fi
|
||||
# Create destination directory if it doesn't exist
|
||||
mkdir -p "$DEST_DIR"
|
||||
# Use rsync to copy files, overwriting symlinks and existing files
|
||||
# --delete removes files in DEST_DIR that are not in SOURCE_DIR
|
||||
# --no-group --no-owner preserves your user ownership
|
||||
rsync -av --no-group --no-owner --delete "$SOURCE_DIR/" "$DEST_DIR/"
|
||||
echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files."
|
||||
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define source and destination directories
|
||||
SOURCE_DIR="$HOME/.config"
|
||||
DEST_DIR="$HOME/Repos/nixos/henrovnix_ok/assets/conf/.config"
|
||||
|
||||
# Create destination directory if it doesn't exist
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
# List of files/directories to copy
|
||||
declare -a files_to_copy=(
|
||||
"git/config"
|
||||
"hypr/hypridle.conf"
|
||||
"hypr/hyprland.conf"
|
||||
"hypr/hyprlock.conf"
|
||||
"hypr/hyprpaper/config/DP-1/defaults.conf"
|
||||
"hypr/hyprpaper/config/eDP-1/defaults.conf"
|
||||
"hypr/lock.png"
|
||||
"hypr/README.org"
|
||||
"hypr/scripts/lid-lock.sh"
|
||||
"hypr/scripts/powermenu.sh"
|
||||
"hyprshell/config.ron"
|
||||
"hyprshell/styles.css"
|
||||
"kdeconnect/certificate.pem"
|
||||
"kdeconnect/config"
|
||||
"kdeconnect/privateKey.pem"
|
||||
"kitty/kitty.conf"
|
||||
"kitty/themes/Catppuccin-Mocha.conf"
|
||||
"starship.toml"
|
||||
"Thunar/accels.scm"
|
||||
"Thunar/uca.xml"
|
||||
"walker/config.toml"
|
||||
"walker/themes/frosted/default.css"
|
||||
"walker/themes/frosted/style.css"
|
||||
"waybar/config"
|
||||
"waybar/style.css"
|
||||
"xdg-desktop-portal/hyprland-portals.conf"
|
||||
"xdg-desktop-portal/portals.conf"
|
||||
"zed/settings.json"
|
||||
"zed/settings.json.backup"
|
||||
)
|
||||
|
||||
# Copy each file/directory, resolving symlinks
|
||||
for file in "${files_to_copy[@]}"; do
|
||||
src="$SOURCE_DIR/$file"
|
||||
dest="$DEST_DIR/$file"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
if [ -L "$src" ]; then
|
||||
cp -L "$src" "$dest"
|
||||
else
|
||||
cp -r "$src" "$dest"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Files copied from $SOURCE_DIR to $DEST_DIR"
|
||||
Reference in New Issue
Block a user