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:
parent
b3ac99fecc
commit
308219bae7
2 changed files with 40 additions and 20 deletions
|
@ -40,17 +40,29 @@ async function loadGnomeSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function applyGsettings(settings) {
|
async function applyGsettings(settings) {
|
||||||
|
const gsettings = which.sync('gsettings', { nothrow: true })
|
||||||
|
if (gsettings) {
|
||||||
for (const setting of settings) {
|
for (const setting of settings) {
|
||||||
try {
|
try {
|
||||||
await $`gsettings set ${setting.setting} ${setting.value}`
|
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) {
|
} catch (e) {
|
||||||
log('error', 'Gsettings Failure', 'Failed to apply gsetting')
|
log('error', 'Gsettings Failure', 'Failed to apply gsetting')
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log('info', 'Gsettings Not Installed', 'gsettings does not appear to be available')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function applyXconfSettings(settings) {
|
async function applyXconfSettings(settings) {
|
||||||
|
const xfconfQuery = which.sync('xfconf-query', { nothrow: true })
|
||||||
|
if (xfconfQuery) {
|
||||||
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'
|
||||||
|
@ -60,9 +72,14 @@ async function applyXconfSettings(settings) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log('info', 'xfconf-query Not Installed', 'xfconf-query does not appear to be available')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function applyDconfSettings(settings) {
|
async function applyDconfSettings(settings) {
|
||||||
|
const dconf = which.sync('dconf', { nothrow: true })
|
||||||
|
if (dconf) {
|
||||||
for (const setting of settings) {
|
for (const setting of settings) {
|
||||||
try {
|
try {
|
||||||
await $`dconf write ${setting.key} ${setting.value}`
|
await $`dconf write ${setting.key} ${setting.value}`
|
||||||
|
@ -71,6 +88,9 @@ async function applyDconfSettings(settings) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log('info', 'Dconf Not Installed', 'dconf does not appear to be available')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|
|
@ -1437,7 +1437,7 @@ async function pruneInstallOrders(installOrders) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (pkgManager === 'flatpak') {
|
} else if (pkgManager === 'flatpak') {
|
||||||
const flatpakInstallation = await $`flatpak --installation`
|
const flatpakInstallation = await $`flatpak --installations`
|
||||||
newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => {
|
newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => {
|
||||||
try {
|
try {
|
||||||
await runSilentCommand(`test -d ${flatpakInstallation}/app/${pkg}`)
|
await runSilentCommand(`test -d ${flatpakInstallation}/app/${pkg}`)
|
||||||
|
|
Loading…
Reference in a new issue