/**
 *
 */ import Pacman from '../../pacman' ; /**
 * restituisce displaymanagers in uso
 */ export function displaymanager ( ) { let text = '' ; text += addIfExist ( 'slim' ) ; text += addIfExist ( 'sddm' ) ; text += addIfExist ( 'lightdm' ) ; text += addIfExist ( 'gdm' ) ; text += addIfExist ( 'gdm3' ) ; text += addIfExist ( 'mdm' ) ; text += addIfExist ( 'lxdm' ) ; text += addIfExist ( 'kdm' ) ; return text ; } function addIfExist ( package2check ) { let text = '' ; if ( Pacman . packageIsInstalled ( package2check ) ) { let displayManager = package2check ; if ( package2check === 'gdm3' ) { displayManager = 'gdm' ; } text += text === '' ? `- ${ displayManager }\n` : `                 - ${ displayManager }\n` ; } return text ; }