Skip to content

Commit

Permalink
bug fix: restored commented line in dconf_config.sh - was deleted whe…
Browse files Browse the repository at this point in the history
…n removing comments, but the line is changed to uncommented by other script
  • Loading branch information
mars4science committed Oct 28, 2023
1 parent 065ff30 commit f6b64c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions locales_change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ if [ ${#locales[@]} -ne 0 ] ; then

# set keyboard layouts
# was -gt 1 (if more than 1 locale) but realized in case default language changed need to change layout just in case
# make list with small letters of last parts separated by comma, quoted with single quotes and replace in dconf_config.sh line
# gsettings set org.gnome.libgnomekbd.keyboard layouts "['us', 'fr', 'de']"
layouts="gsettings set org.gnome.libgnomekbd.keyboard layouts "\""['"
# make list with small letters of last parts separated by comma, quoted with single quotes and replace in dconf_config.sh line containing: "gsettings set org.gnome.libgnomekbd.keyboard layouts"
layouts="gsettings set org.gnome.libgnomekbd.keyboard layouts "\""['" # need full command line in case need to be run below
for key in "${locales[@]}"; do layouts=$layouts$(echo "$key" | awk 'BEGIN {FS = "_"}{print tolower($2)}')"', '"; done
layouts=${layouts::-3}']"' # remove extra , '
layouts=${layouts::-3}']"' # remove extra comma space and single quotation mark (, '), add closing bracket and double quotation mark
if [ $running_system = "false" ]; then
sudo sed --in-place --regexp-extended -- "s/# gsettings set org.gnome.libgnomekbd.keyboard layouts.*/$layouts/" $liveiso_path_scripts_root/dconf_config.sh
perl -i -pe 's!^.*?gsettings set org.gnome.libgnomekbd.keyboard layouts.*?(#| #|\n)!'"${layouts/$/\\$}"'$1!' "${liveiso_path_scripts_root}/dconf_config.sh" # '?' for lazy matching, '/$/\\$' to escape possible '$' - make literal symbol
else
# as running "${layouts}" results in "command not found", using alias
alias gsettings_layouts="${layouts}"
Expand Down
1 change: 1 addition & 0 deletions to_iso_to_run_once_liveiso_boot/dconf_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ gsettings set org.cinnamon.desktop.a11y.applications screen-magnifier-enabled tr
gsettings set org.cinnamon.desktop.a11y.magnifier mouse-tracking push

gsettings set org.gnome.libgnomekbd.keyboard options "['grp\tgrp:win_space_toggle', 'grp\tgrp:ctrls_toggle', 'terminate\tterminate:ctrl_alt_bksp']" # set key combinations for changing keyboard layout and terminating GUI session (going to login screen)
# DO NOT DELETE, NOT A COMMENT gsettings set org.gnome.libgnomekbd.keyboard layouts "['fr', 'us', 'de']" # locales_change.sh script edits this line for liveISO (based on 'locales' array variable set in _make_custom_liveusb.sh)

gsettings set org.cinnamon.desktop.interface keyboard-layout-show-flags false
gsettings set org.cinnamon.desktop.interface keyboard-layout-use-upper true # change keyboard layout icon in cinnamon panel to upper font text
Expand Down

0 comments on commit f6b64c7

Please sign in to comment.