Update 2 files

- /home/dot_local/bin/executable_install-program
- /home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl
This commit is contained in:
Brian Zalewski 2023-01-09 02:35:05 +00:00
parent b3ac99fecc
commit 308219bae7
2 changed files with 40 additions and 20 deletions

View file

@ -40,36 +40,56 @@ async function loadGnomeSettings() {
}
async function applyGsettings(settings) {
for (const setting of settings) {
try {
await $`gsettings set ${setting.setting} ${setting.value}`
} catch (e) {
log('error', 'Gsettings Failure', 'Failed to apply gsetting')
console.error(e)
const gsettings = which.sync('gsettings', { nothrow: true })
if (gsettings) {
for (const setting of settings) {
try {
console.log(setting.setting)
console.log('-- val ---')
console.log(setting.value)
const gsetting = setting.setting
const gsettingVal = setting.value
await $`gsettings set ${gsetting} ${gsettingVal}`
} catch (e) {
log('error', 'Gsettings Failure', 'Failed to apply gsetting')
console.error(e)
}
}
} else {
log('info', 'Gsettings Not Installed', 'gsettings does not appear to be available')
}
}
async function applyXconfSettings(settings) {
for (const setting of settings) {
try {
const xfconfType = setting.value_type ? setting.value_type : 'string'
await $`xfconf-query --channel '${setting.channel}' --property '${setting.property}' --type ${xfconfType} --set ${setting.value}`
} catch (e) {
log('error', 'Xfconf Failure', 'Failed to apply gsetting')
console.error(e)
const xfconfQuery = which.sync('xfconf-query', { nothrow: true })
if (xfconfQuery) {
for (const setting of settings) {
try {
const xfconfType = setting.value_type ? setting.value_type : 'string'
await $`xfconf-query --channel '${setting.channel}' --property '${setting.property}' --type ${xfconfType} --set ${setting.value}`
} catch (e) {
log('error', 'Xfconf Failure', 'Failed to apply gsetting')
console.error(e)
}
}
} else {
log('info', 'xfconf-query Not Installed', 'xfconf-query does not appear to be available')
}
}
async function applyDconfSettings(settings) {
for (const setting of settings) {
try {
await $`dconf write ${setting.key} ${setting.value}`
} catch (e) {
log('error', 'Dconf Failure', 'Failed to apply dconf setting')
console.error(e)
const dconf = which.sync('dconf', { nothrow: true })
if (dconf) {
for (const setting of settings) {
try {
await $`dconf write ${setting.key} ${setting.value}`
} catch (e) {
log('error', 'Dconf Failure', 'Failed to apply dconf setting')
console.error(e)
}
}
} else {
log('info', 'Dconf Not Installed', 'dconf does not appear to be available')
}
}

View file

@ -1437,7 +1437,7 @@ async function pruneInstallOrders(installOrders) {
}
})
} else if (pkgManager === 'flatpak') {
const flatpakInstallation = await $`flatpak --installation`
const flatpakInstallation = await $`flatpak --installations`
newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => {
try {
await runSilentCommand(`test -d ${flatpakInstallation}/app/${pkg}`)