From e58f91cb9e1ec9a5fd95d01e6fd236e2e17f4378 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Sun, 25 Dec 2022 09:09:00 +0000 Subject: [PATCH] Update 9 files - /home/dot_local/bin/run_onchange_ensure-executable.tmpl - /home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl - /home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl - /home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl - /home/Library/Fonts/run_onchange_after_add-fonts.tmpl - /system/usr/share/run_onchange_after_setup-share-folder - /system/usr/local/share/run_onchange_after_setup-share-folder - /system/var/log/user/run_onchange_after-symlink-user-logs - /system/etc/default/modify_grub --- home/Library/Fonts/run_onchange_after_add-fonts.tmpl | 3 ++- home/dot_local/bin/run_onchange_ensure-executable.tmpl | 4 ++-- .../ansible/run_onchange_after_symlink-ansible-configs.tmpl | 3 +++ home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl | 3 ++- home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl | 4 ++-- system/etc/default/modify_grub | 3 +++ system/usr/local/share/run_onchange_after_setup-share-folder | 3 +++ system/usr/share/run_onchange_after_setup-share-folder | 3 +++ system/var/log/user/run_onchange_after-symlink-user-logs | 3 +++ 9 files changed, 23 insertions(+), 6 deletions(-) diff --git a/home/Library/Fonts/run_onchange_after_add-fonts.tmpl b/home/Library/Fonts/run_onchange_after_add-fonts.tmpl index 25d434a2..8c517cd1 100644 --- a/home/Library/Fonts/run_onchange_after_add-fonts.tmpl +++ b/home/Library/Fonts/run_onchange_after_add-fonts.tmpl @@ -1,6 +1,7 @@ #!/usr/bin/env bash -{{- includeTemplate "universal/logg" }} +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} {{ $fontFiles := (output "find" (joinPath .chezmoi.homeDir ".local" "share" "fonts") "-type" "f") -}} {{- range $fontFile := splitList "\n" $fontFiles -}} diff --git a/home/dot_local/bin/run_onchange_ensure-executable.tmpl b/home/dot_local/bin/run_onchange_ensure-executable.tmpl index d31075d2..54674743 100644 --- a/home/dot_local/bin/run_onchange_ensure-executable.tmpl +++ b/home/dot_local/bin/run_onchange_ensure-executable.tmpl @@ -1,7 +1,7 @@ #!/usr/bin/env bash -{{- includeTemplate "universal/profile" }} -{{- includeTemplate "universal/logg" }} +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} {{ $exeFiles := (output "find" (joinPath .chezmoi.homeDir ".local" "bin") "-mindepth" "1" "-maxdepth" "1" "-type" "f") -}} {{- range $exeFile := splitList "\n" $exeFiles -}} diff --git a/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl b/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl index fe824c80..c6d779ed 100644 --- a/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl +++ b/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl @@ -1,5 +1,8 @@ #!/usr/bin/env bash +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + ### Symlink the variables / files / inventories to ~/.config/ansible folders if they are present ### i.e. Changes to upstream will not impact the play if your configuration files are stored locally for TARGET in "files" "group_vars" "host_vars" "inventories" "templates"; do diff --git a/home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl b/home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl index c13ab8a8..5a0f8834 100644 --- a/home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl +++ b/home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl @@ -1,6 +1,7 @@ #!/usr/bin/env bash -{{- includeTemplate "universal/logg" }} +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} ### Ensure id_rsa is present and create one if it does not exist if [ ! -f "$HOME/.ssh/id_rsa" ]; then diff --git a/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl b/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl index 9b9c424c..f1c021f5 100644 --- a/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl +++ b/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl @@ -7,8 +7,8 @@ {{ end -}} {{- end }} -{{- includeTemplate "universal/profile" }} -{{- includeTemplate "universal/logg" }} +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} logg info 'Ensuring RSA public keys are present' diff --git a/system/etc/default/modify_grub b/system/etc/default/modify_grub index ca49a204..8eeeeb23 100644 --- a/system/etc/default/modify_grub +++ b/system/etc/default/modify_grub @@ -1,5 +1,8 @@ #!/usr/bin/env bash +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + SCREEN_WIDTH="$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)" SCREEN_HEIGHT="$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)" SCREEN_RATIO="$(awk -v height={{ screen_height.stdout }} -v width={{ screen_width.stdout }} 'BEGIN { print ((height / width) * 1000) }')" diff --git a/system/usr/local/share/run_onchange_after_setup-share-folder b/system/usr/local/share/run_onchange_after_setup-share-folder index a08e4fd3..fde27c61 100644 --- a/system/usr/local/share/run_onchange_after_setup-share-folder +++ b/system/usr/local/share/run_onchange_after_setup-share-folder @@ -1,5 +1,8 @@ #!/usr/bin/env bash +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + logg info 'Ensure /usr/local/share is a directory' sudo mkdir -p /usr/local/share diff --git a/system/usr/share/run_onchange_after_setup-share-folder b/system/usr/share/run_onchange_after_setup-share-folder index 00442686..eeabb055 100644 --- a/system/usr/share/run_onchange_after_setup-share-folder +++ b/system/usr/share/run_onchange_after_setup-share-folder @@ -1,5 +1,8 @@ #!/usr/bin/env bash +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + logg info 'Ensure /usr/local/share/grub/themes is a directory' sudo mkdir -p /usr/local/share/grub/themes diff --git a/system/var/log/user/run_onchange_after-symlink-user-logs b/system/var/log/user/run_onchange_after-symlink-user-logs index 2e039674..cd3661c1 100644 --- a/system/var/log/user/run_onchange_after-symlink-user-logs +++ b/system/var/log/user/run_onchange_after-symlink-user-logs @@ -2,6 +2,9 @@ # home directories: {{ output ("find" .host.homeParentFolder "-maxdepth" "1" "-type" "d" "|" "xargs" "echo") }} +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + find /home -maxdepth 1 -type d | while read HOME_DIR; do USER_FOLDER="$(echo "$HOME_DIR" | sed 's/\/\([^\/]*\)/\1/')" if [ ! -d "/var/log/user/$USER_FOLDER" ] && [ -d "$HOME_DIR/.local/log" ]; then