-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestore-config.sh
More file actions
executable file
·36 lines (28 loc) · 1.08 KB
/
Copy pathrestore-config.sh
File metadata and controls
executable file
·36 lines (28 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
if [ $# -eq 0 ]; then
echo "ERROR: Please provide backup directory path"
echo "Usage: $0 <backup_directory>"
exit 1
fi
BACKUP_DIR=$1
if [ ! -d "$BACKUP_DIR" ]; then
echo "ERROR: Backup directory $BACKUP_DIR does not exist"
exit 1
fi
echo "INFO: Restoring configuration from $BACKUP_DIR"
# Restore config.yml if backup exists
if [ -f "$BACKUP_DIR/config.yml.backup" ]; then
cp "$BACKUP_DIR/config.yml.backup" ~/.config/mackeys/config.yml
echo "INFO: Restored config.yml"
fi
# Restore GNOME settings from backup files
# Note: This is a simplified restore - in practice you might want to parse the backup files
# and apply specific settings rather than trying to restore everything
echo "INFO: Please manually review and restore GNOME settings from:"
echo " $BACKUP_DIR/wm-keybindings.txt"
echo " $BACKUP_DIR/shell-keybindings.txt"
echo " $BACKUP_DIR/mutter-settings.txt"
echo " $BACKUP_DIR/input-sources.txt"
echo " $BACKUP_DIR/media-keys.txt"
echo " $BACKUP_DIR/terminal-keybindings.txt"
echo "INFO: Configuration restore completed"