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

View file

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

View file

@ -1143,7 +1143,22 @@ flatpak;flatpak_PostTrtFct
gcc8;gcc8_PostTrtFct gcc8;gcc8_PostTrtFct
ruby-dev;ruby-dev_PostTrtFct ruby-dev;ruby-dev_PostTrtFct
virtualbox-6.1;virtualbox-6.1_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 # ufw enablement + add rules

View file

@ -1023,7 +1023,22 @@ megasync;megasync_PostTrtFct
flatpak;flatpak_PostTrtFct flatpak;flatpak_PostTrtFct
ruby-dev;ruby-dev_PostTrtFct ruby-dev;ruby-dev_PostTrtFct
virtualbox;virtualbox_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 # ufw enablement + add rules

View file

@ -10,21 +10,6 @@
# tools and config functions # # 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 # /tmp in RAM by modifying /etc/fstab
#TODO: add possibily to choose amount of ram #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 installAppsFromList webcam
updateMicrocode updateMicrocode
msg "Applying system customizations" msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc addScreenfetchBashrc
enableHistoryTS enableHistoryTS
installUnattendedUpgrades
msg "Installing external apps" msg "Installing external apps"
installViber installViber
installBoostnotes 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 updateMicrocode
installAppsFromList cardreader installAppsFromList cardreader
msg "Applying system customizations" msg "Applying system customizations"
enableUFW
enableNumLockX
addScreenfetchBashrc addScreenfetchBashrc
enableHistoryTS enableHistoryTS
installUnattendedUpgrades
installAppsFromList unbound installAppsFromList unbound
msg "Installing additional themes/icons" msg "Installing additional themes/icons"
installAppsFromList icons installAppsFromList icons