← Retour

supermenu.lua

mon_menu/version/v001/supermenu.lua
--LUA
--Menu dans le terminal
--Version 1.1
--2026





-- =========================
-- 00. IMPORTS
-- =========================


-- =====================================
-- Définition des fonctions
-- =====================================



function  titre() -- Fonction titre  principal de l'application

	print ("------------------")
	print ("-Mon Super Menu---")
	print ("------------------")
end

function choixApplication () -- Fonction choisir ses options d actions
	print ("Lancer serveur graphique choix: 1")
	print ("Lancer Mise a jour systeme choix: 2")
	print ("Quitter le programme: 3")

	io.write("Votre choix : ")

		local choix = io.read()
		  if choix == "1" then
		    print (" dwm SUCKS")
		    return true
		    
		  elseif choix == "2" then
		    print ("linux update")
		    return true
		    
		  elseif choix == "3" then
		    print ("Au revoir")
		    return false
		    
		  else 
		    print ("Choix invalide")
		    return true
		    
		  end
		end
-- =====================================
-- Lancement du programme boucle principale
-- =====================================

function lancerProgramme ()
  local continuer = true
   while continuer do
        titre()
        continuer = choixApplication()
        
    end
 end  

-- =====================================
-- Programme principal
-- =====================================
 lancerProgramme ()