-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmigrate-dr460nized
executable file
·36 lines (32 loc) · 1.42 KB
/
migrate-dr460nized
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 [ "$1" != "true" ]; then
LOOK_AND_FEEL="$(kreadconfig5 --key LookAndFeelPackage)"
if [ "$LOOK_AND_FEEL" == "Sweetified Plasma" ]; then
if [ "$(kreadconfig5 --key ColorScheme)" == "Sweetified" ] && [ "$(kreadconfig5 --key widgetStyle)" == "kvantum-dark" ] && [ -f ~/.config/autostart/org.kde.latte-dock.desktop ]; then
exit 0
fi
elif [ "$LOOK_AND_FEEL" == "Dr460nized" ]; then
exit 0
fi
exit 1
else
backup=(kwinrc kcminputrc kdeglobals plasmarc ksplashrc kscreenlockerrc)
for i in "${backup[@]}"; do
cp "$HOME/.config/$i" "$HOME/.config/$i.bak"
done
# Remove Kwin keys, this is not done by lookandfeeltool
sed -i 's&Meta=org.kde.lattedock,/Latte,org.kde.LatteDock,activateLauncher&&g' ~/.config/kwinrc || true
sed -i 's&ColorScheme=Sweetified&ColorScheme=Sweet&g' ~/.local/share/konsole/Garuda.profile || true
if [ -f ~/.config/fish/config.fish ]; then
# Apply the new dr460nized fastfetch preset
sed -i 's/--load-config neofetch/--load-config dr460nized/g' ~/.config/fish/config.fish
fi
# Apply the global theme & restart plasmashell gracefully
if [ -f ~/.config/autostart/org.kde.latte-dock.desktop ]; then
rm ~/.config/autostart/org.kde.latte-dock.desktop
killall -SIGINT latte-dock
fi
lookandfeeltool --resetLayout -a Dr460nized
sleep 5
systemctl --user restart plasma-plasmashell
fi