#!/bin/bash yad --title "Neofetch Switch" --question --text " Would you like to enable neofetch in the terminal ? (will become active in the next terminal you open)" --width=450 --text-align=center --button="Enable:0" --button="Disable:1" 2> /dev/null foo=$? if [[ $foo -eq 0 ]]; then if grep -Fq "/usr/bin/neofetch" $HOME/.bashrc then exit else echo "if [ -f /usr/bin/neofetch ]; then neofetch -t; fi" >> $HOME/.bashrc fi elif [[ $foo -eq 1 ]]; then sed -i '/\/usr\/bin\/neofetch/d' $HOME/.bashrc else exit 0 fi