Update 2 files
- /home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl - /home/dot_local/bin/executable_install-program
This commit is contained in:
parent
42c53e5021
commit
6fb8cbbf3d
2 changed files with 7 additions and 3 deletions
|
@ -46,7 +46,8 @@ async function applyGsettings(settings) {
|
|||
try {
|
||||
const gsetting = setting.setting
|
||||
const gsettingVal = setting.value
|
||||
await $`gsettings set ` + gsetting + `${gsettingVal}`
|
||||
const gsettingCmd = 'gsettings set ' + gsetting + ' ' + gsettingVal
|
||||
await $gsettingCmd
|
||||
} catch (e) {
|
||||
log('error', 'Gsettings Failure', 'Failed to apply gsetting')
|
||||
console.error(e)
|
||||
|
@ -79,7 +80,8 @@ async function applyDconfSettings(settings) {
|
|||
if (dconf) {
|
||||
for (const setting of settings) {
|
||||
try {
|
||||
await $`dconf write ${setting.key} ` + setting.value
|
||||
const dconfCmd = 'dconf write ' + setting.key + ' ' + setting.value
|
||||
await $dconfCmd
|
||||
} catch (e) {
|
||||
log('error', 'Dconf Failure', 'Failed to apply dconf setting')
|
||||
console.error(e)
|
||||
|
@ -94,7 +96,6 @@ async function main() {
|
|||
const promises = [loadThemeSettings(), loadGnomeSettings()]
|
||||
const results = await Promise.all(promises)
|
||||
const themeSettings = results[0]
|
||||
console.log(themeSettings)
|
||||
const gnomeSettings = results[1]
|
||||
const settingsPromises = []
|
||||
if (themeSettings && themeSettings.gsetting_configs) {
|
||||
|
|
|
@ -635,6 +635,9 @@ async function beforeInstall(packageManager) {
|
|||
updateDone[packageManager] = true
|
||||
const logStage = 'Pre-Install Package Manager'
|
||||
if (packageManager === 'appimage') {
|
||||
if(!fileExists(`${process.env.HOME}/Applications)) {
|
||||
runSilentCommand(`mkdir -p "${process.env.HOME}/Applications"`)
|
||||
}
|
||||
} else if (packageManager === 'ansible') {
|
||||
log('info', logStage, `Temporarily enabling passwordless sudo for Ansible role installations`)
|
||||
await $`echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL" | sudo tee -a /etc/sudoers`
|
||||
|
|
Loading…
Reference in a new issue