#!/bin/bash

DMENU_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

version="5.2"
fontSize=0

dmenu_set_font_size()
{	
	cd $DMENU_SCRIPT_DIR/dmenu_5.2/
	graphics_input_prompt "What size font would you like (6 to 34): " 
	read fontSize  
	sed -i -e  "s/size=../size=$fontSize/g" config.h
}

intro()
{
	graphics_install_prompt "Dmenu verison : $version  Will be installed"	
	color_start "themeIndication"
	echo "Currently used mods are :"
	ls | grep -oP '.*diff'
	color_stop	
}

outro()
{
	graphics_install_prompt "Dmenu installation complete"
	cd $MAIN_DIR
}

install_dmenu()
{
	intro
	echo "demnu location $DMENU_SCRIPT_DIR"
	case $OS in
	  debian)
		dmenu_set_font_size
		sudo make install
		;;

	  arch)
		dmenu_set_font_size
		sudo make install
		;;

	  rasberry)
		dmenu_set_font_size
		sudo make install
		;;

	  *)
		echo -n "Invalid os is selectred ofr Dmenu"
		exit_abord
		;;
	esac

	outro
}
