<commit_before>#!/bin/bash

# LightDM Configuration (PRECISA REINICIAR PARA FUNCIONAR)
# <NAME> (<EMAIL>)

# This script configures the main login screen (LightDM)
# Features:
# - Enable manual login (for network users)
# - Enable the guest login
# - Hide logged users

# Some informations
# https://wiki.ubuntu.com/LightDM
# http://askubuntu.com/questions/155611/no-unity-greeter-conf-file-in-etc-lightdm

key="$1"

install_cmd()
{
	echo "  - Customizing GAPH host"

	SCRIPTDIR=$1

	# PLYMOUNTH BACKUP
	if [ ! -f /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp ]; then
		cp /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp
	fi

	sed -i /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.svg
	convert $SCRIPTDIR/images/plymouth/ubuntu-logo.svg /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png

	# UNITY-GREETER BACKUP
	if [ ! -f /usr/share/unity-greeter/logo.png.bkp ]; then
		cp /usr/share/unity-greeter/logo.png /usr/share/unity-greeter/logo.png.bkp
	fi

	sed -i "s|gaphl00|$(hostname)|g" $SCRIPTDIR/images/unity-greeter/logo.svg
	convert $SCRIPTDIR/images/unity-greeter/logo.svg /usr/share/unity-greeter/logo.png


	# BACKUP
	if [ ! -f /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override ]; then
		cp /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp
	fi

	# Adiciona o papel de parede do GAPH pra tela de login
	cp $SCRIPTDIR/images/unity-greeter/night.png /usr/share/backgrounds/

	#===========================
	read -r -d '' GAPHCONF <<-EOM

	[com.canonical.unity-greeter]
	draw-user-backgrounds=false
	background='/usr/share/backgrounds/night.png'

	EOM
	#===========================

	echo "$GAPHCONF" >> /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
	glib-compile-schemas /usr/share/glib-2.0/schemas/

}

remove_cmd()
{
	echo "  - Reverting GAPH host customization"

	if [ -f /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp ]; then
		mv /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png
	fi

	if [ -f /usr/share/unity-greeter/logo.png.bkp ]; then
		mv /usr/share/unity-greeter/logo.png.bkp /usr/share/unity-greeter/logo.png
	fi

	if [ -f /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp ]; then
		mv /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
	fi
}

case $key in

	-i|--install)
	install_cmd
	exit 0
	;;

	-r|--remove)
	remove_cmd
	exit 0
	;;

	*)
	echo "Unknonw option"
	exit 1

esac
<commit_msg>Updating customization script<commit_after>#!/bin/bash

# LightDM Configuration (PRECISA REINICIAR PARA FUNCIONAR)
# <NAME> (<EMAIL>)

# This script configures the main login screen (LightDM)
# Features:
# - Enable manual login (for network users)
# - Enable the guest login
# - Hide logged users

# Some informations
# https://wiki.ubuntu.com/LightDM
# http://askubuntu.com/questions/155611/no-unity-greeter-conf-file-in-etc-lightdm

key="$1"

install_cmd()
{
	echo "  - Customizing GAPH host"

	SCRIPTDIR=$1

	# PLYMOUNTH BACKUP
	if [ ! -f /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp ]; then
		cp /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp
	fi

	sed -i /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.svg
	convert $SCRIPTDIR/images/plymouth/ubuntu-logo.svg /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png

	# UNITY-GREETER BACKUP
	if [ ! -f /usr/share/unity-greeter/logo.png.bkp ]; then
		cp /usr/share/unity-greeter/logo.png /usr/share/unity-greeter/logo.png.bkp
	fi

	sed -i "s|gaphl00|$(hostname)|g" $SCRIPTDIR/images/unity-greeter/logo.svg
	convert $SCRIPTDIR/images/unity-greeter/logo.svg /usr/share/unity-greeter/logo.png


	# BACKUP
	if [ ! -f /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override ]; then
		cp /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp
	fi

	# Adiciona o papel de parede do GAPH pra tela de login
	cp $SCRIPTDIR/images/unity-greeter/night.png /usr/share/backgrounds/

	#===========================
	read -r -d '' GAPHCONF <<-EOM

	[com.canonical.unity-greeter]
	draw-user-backgrounds=false
	background='/usr/share/backgrounds/night.png'

	EOM
	#===========================

	echo "$GAPHCONF" >> /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
	glib-compile-schemas /usr/share/glib-2.0/schemas/

}

remove_cmd()
{
	echo "  - Reverting GAPH host customization"

	if [ -f /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp ]; then
		mv /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png.bkp /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.png
	fi

	if [ -f /usr/share/unity-greeter/logo.png.bkp ]; then
		mv /usr/share/unity-greeter/logo.png.bkp /usr/share/unity-greeter/logo.png
	fi

	if [ -f /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp ]; then
		mv /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override.bkp /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
	fi
}

case $key in

	-i|--install)
	SCRIPTDIR=$1
	install_cmd $SCRIPTDIR
	exit 0
	;;

	-r|--remove)
	remove_cmd
	exit 0
	;;

	*)
	echo "Unknonw option"
	exit 1

esac

{'fraction_non_alphanumeric': 0.16067232965841316, 'fraction_numerical': 0.015723838785469003, 'mean_word_length': 3.8714788732394365, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2726197', 'n_tokens_mistral': 2396, 'n_tokens_neox': 2161, 'n_words': 322}