Update file run_onchange_after_20-apply-settings.mjs.tmpl

This commit is contained in:
Brian Zalewski 2023-01-09 13:07:48 +00:00
parent 523f9b19e8
commit a16009c55e

View file

@ -68,7 +68,8 @@ async function applyXconfSettings(settings) {
for (const setting of settings) { for (const setting of settings) {
try { try {
const xfconfType = setting.value_type ? setting.value_type : 'string' const xfconfType = setting.value_type ? setting.value_type : 'string'
await $`xfconf-query --channel '${setting.channel}' --property '${setting.property}' --type ${xfconfType} --set ${setting.value}` const xfCmd = 'xfconf-query --channel \'' + setting.channel + '\' --property \'' + setting.property + '\' --type ' + xfconfType + ' --set ' + setting.value
execSync(xfCmd)
} catch (e) { } catch (e) {
log('error', 'Xfconf', 'Failed to apply gsetting') log('error', 'Xfconf', 'Failed to apply gsetting')
console.error(e) console.error(e)
@ -85,7 +86,7 @@ async function applyDconfSettings(settings) {
for (const setting of settings) { for (const setting of settings) {
try { try {
const dconfCmd = 'dconf write ' + setting.key + ' ' + setting.value const dconfCmd = 'dconf write ' + setting.key + ' ' + setting.value
await $(dconfCmd) execSync(dconfCmd)
log('success', 'Dconf', 'Changed ' + setting.key + ' to ' + setting.value) log('success', 'Dconf', 'Changed ' + setting.key + ' to ' + setting.value)
} catch (e) { } catch (e) {
log('error', 'Dconf', 'Failed to apply dconf setting') log('error', 'Dconf', 'Failed to apply dconf setting')