numlockx enable for lightdm as PostTrtFct

This commit is contained in:
Francois B. (Makoto) 2020-07-04 19:46:16 +02:00
parent 2d3ba2fb2e
commit 194e695b8a
6 changed files with 32 additions and 36 deletions

View file

@ -56,7 +56,6 @@ function showConfigMenu () {
--title "Yggdrasil $version - System Config" \
--menu "System Config" \
25 80 16 \
"Ufw" "Enable Firewall (ufw)" \
"TmpRAM" "/tmp stored in RAM" \
"screenfetch" "screenfetch added to .bashrc" \
"historyTS" "TimeStamp enabled in Shell History" \
@ -65,11 +64,6 @@ function showConfigMenu () {
"Back" "Back" 3>&1 1>&2 2>&3)
case $configMenuOptions in
"Ufw")
clear
enableUFW
pressKey
;;
"TmpRAM")
clear
enableTmpRAM

View file

@ -56,8 +56,6 @@ function showConfigMenu () {
--title "Yggdrasil $version - System Config" \
--menu "System Config" \
25 80 16 \
"Ufw" "Enable Firewall (ufw)" \
"NumLockX" "NumLock Enabled at boot time" \
"TmpRAM" "/tmp stored in RAM" \
"screenfetch" "screenfetch added to .bashrc" \
"historyTS" "TimeStamp enabled in Shell History" \
@ -66,11 +64,6 @@ function showConfigMenu () {
"Back" "Back" 3>&1 1>&2 2>&3)
case $configMenuOptions in
"Ufw")
clear
enableUFW
pressKey
;;
"TmpRAM")
clear
enableTmpRAM

View file

@ -1143,7 +1143,22 @@ flatpak;flatpak_PostTrtFct
gcc8;gcc8_PostTrtFct
ruby-dev;ruby-dev_PostTrtFct
virtualbox-6.1;virtualbox-6.1_PostTrtFct
gufw;gufw_PostTrtFct"
gufw;gufw_PostTrtFct
numlockx;numlockx_PostTrtFct"
#
# numlockx
#
function numlockx_PostTrtFct () {
if which lightdm >/dev/null; then
runCmd "sudo touch /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"creating lightdm config file if necessary"
runCmd "sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak" \
"backing up lightdm original config file"
runCmd "echo -e '\ngreeter-setup-script=/usr/bin/numlockx on' | sudo tee -a /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"enabling numlockx on in lightdm at boot"
fi
}
#
# ufw enablement + add rules

View file

@ -1023,7 +1023,22 @@ megasync;megasync_PostTrtFct
flatpak;flatpak_PostTrtFct
ruby-dev;ruby-dev_PostTrtFct
virtualbox;virtualbox_PostTrtFct
gufw;gufw_PostTrtFct"
gufw;gufw_PostTrtFct
numlockx;numlockx_PostTrtFct"
#
# numlockx
#
function numlockx_PostTrtFct () {
if which lightdm >/dev/null; then
runCmd "sudo touch /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"creating lightdm config file if necessary"
runCmd "sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak" \
"backing up lightdm original config file"
runCmd "echo -e '\ngreeter-setup-script=/usr/bin/numlockx on' | sudo tee -a /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"enabling numlockx on in lightdm at boot"
fi
}
#
# ufw enablement + add rules

View file

@ -10,21 +10,6 @@
# tools and config functions #
#-----------------------------------------------------------------------------#
#
# enable numlock by default on LightDM
#
function enableNumLockX () {
checkAndInstallDep apt numlockx numlockx
if which lightdm >/dev/null; then
runCmd "sudo touch /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"creating lightdm config file if necessary"
runCmd "sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak" \
"backing up lightdm original config file"
runCmd "echo -e '\ngreeter-setup-script=/usr/bin/numlockx on' | sudo tee -a /etc/lightdm/lightdm.conf.d/70-linuxmint.conf" \
"enabling numlockx on in lightdm at boot"
fi
}
#
# /tmp in RAM by modifying /etc/fstab
#TODO: add possibily to choose amount of ram

View file

@ -100,11 +100,8 @@ while getopts ":h,v,f,c,u,a,d,q,s,t,w,g,j,k,p" option; do
installAppsFromList webcam
updateMicrocode
msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc
enableHistoryTS
installUnattendedUpgrades
msg "Installing external apps"
installViber
installBoostnotes
@ -144,11 +141,8 @@ while getopts ":h,v,f,c,u,a,d,q,s,t,w,g,j,k,p" option; do
updateMicrocode
installAppsFromList cardreader
msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc
enableHistoryTS
installUnattendedUpgrades
installAppsFromList unbound
msg "Installing additional themes/icons"
installAppsFromList icons