source /etc/nixos/other/colors.sh FLAG_FILE="/home/cookiez/.flags/theme-flag" /run/current-system/sw/bin/konsave -i /etc/nixos/plasma/NixOS-1.0.1.knsv /run/current-system/sw/bin/konsave -i /etc/nixos/plasma/NixOS-1.0.1.knsv /run/current-system/sw/bin/konsave -a NixOS-1.0.1 progress_bar() { local duration=$1 local interval=0.25 local total_intervals=$((duration / interval)) local progress="" local bar_length=10 for ((i=0; i "$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