Moved KDE-Plasma theme related files to Plasma dir.
This commit is contained in:
38
plasma/konsave.sh
Normal file
38
plasma/konsave.sh
Normal file
@ -0,0 +1,38 @@
|
||||
source /etc/nixos/other/colors.sh
|
||||
FLAG_FILE="/home/cookiez/.flags/theme-flag"
|
||||
|
||||
/run/current-system/sw/bin/konsave -i /etc/nixos/plasma/theme.knsv
|
||||
/run/current-system/sw/bin/konsave -i /etc/nixos/plasma/theme.knsv
|
||||
/run/current-system/sw/bin/konsave -a theme
|
||||
|
||||
progress_bar() {
|
||||
local duration=$1
|
||||
local interval=0.25
|
||||
local total_intervals=$((duration / interval))
|
||||
local progress=""
|
||||
local bar_length=10
|
||||
|
||||
for ((i=0; i<total_intervals; i++)); do
|
||||
progress="${progress}-"
|
||||
printf "\rApplying: [%-${bar_length}s]" "$progress"
|
||||
sleep $interval
|
||||
done
|
||||
echo -ne "\r[${progress}] Done!\n"
|
||||
}
|
||||
|
||||
mkdir -p "$(dirname "$FLAG_FILE")"
|
||||
touch "$FLAG_FILE"
|
||||
echo "Flag for knowing weather the Default theme packaged with this NixOS install was actually applied! (If this exists than it should be applied already)" > "$FLAG_FILE"
|
||||
|
||||
echo -e "Use ${RED}'sudo reboot -h 0'${NOCOLOR} to successfully apply the theme, if logging out manually ${YELLOW}doesn't${NOCOLOR} work!"
|
||||
progress_bar 2.5
|
||||
|
||||
echo ""
|
||||
echo -n "Do you want to reboot now? (y/n): "
|
||||
read -r answer
|
||||
if [ -z "$answer" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
||||
echo "Rebooting! ..."
|
||||
sudo shutdown -r now
|
||||
else
|
||||
echo "Make sure to log out/reboot later!"
|
||||
fi
|
||||
9
plasma/theme-reminder.sh
Normal file
9
plasma/theme-reminder.sh
Normal file
@ -0,0 +1,9 @@
|
||||
source /etc/nixos/other/colors.sh
|
||||
FLAG_FILE="/home/cookiez/.flags/theme-flag"
|
||||
|
||||
if [ ! -f "$FLAG_FILE" ]; then
|
||||
echo -e "${RED}Warning: Make sure to apply the custom system theme!${NOCOLOR} (source '/etc/nixos/plasma/konsave.sh')"
|
||||
fi
|
||||
#else
|
||||
# echo "Flag file exists - Theme should be applied already!"
|
||||
#fi
|
||||
BIN
plasma/theme.knsv
Normal file
BIN
plasma/theme.knsv
Normal file
Binary file not shown.
Reference in New Issue
Block a user