From b9f248926b38d921d0e88bfcf478f4de18d1ab83 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Wed, 10 Dec 2025 14:57:20 -0500 Subject: [PATCH] feat: Updates to qcal configuration. --- env/.config/qcal/config.json | 12 ------------ env/qcal/config.json.gpg | 12 ++++++++++++ runs/after/calendar | 15 +++++++++++++-- 3 files changed, 25 insertions(+), 14 deletions(-) delete mode 100644 env/.config/qcal/config.json create mode 100644 env/qcal/config.json.gpg diff --git a/env/.config/qcal/config.json b/env/.config/qcal/config.json deleted file mode 100644 index 7c070f3..0000000 --- a/env/.config/qcal/config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Calendars": [ - { - "Url":"https://calendar.housh.dev/michael/08546d61-deca-cc2e-bb3a-cdb7dd10691b/", - "Username":"michael", - "Password":"", - "PasswordCmd": "/bin/gopass show --password Sites/calendar.housh.dev/calendar/michael" - } - ], - "Timezone": "America/New_York", - "DefaultNumDays":30 -} diff --git a/env/qcal/config.json.gpg b/env/qcal/config.json.gpg new file mode 100644 index 0000000..83214d1 --- /dev/null +++ b/env/qcal/config.json.gpg @@ -0,0 +1,12 @@ +-----BEGIN PGP MESSAGE----- + +hF4DAAAAAAAAAAASAQdAuiXPHaZd/bWttw/D3LtIXio0V9z5aKrqAKDCHofqDmow +F90ZOG8wwm3wsmoTSswSifiUUE8AK96ATgphvlxIf/bH+X9pVUPlgZRCPYR7hteI +0sBbAWWIYpJA43P5ndpuIUGiGwthRyxQLwWRVFkfZ5v5HLsf0FMVfO2f1azzape9 +i+0Dz6XoTkDzmApQO46NrOHoI83RUQ7Tbe+AElnDfJT6tj2YaajkCPnvnqO55z54 +38XOIP3t3eOt+JFugiJDblZCAI/fdzhxCAmqzyU0QZOR3Yl8B/d/8g1PQjPAObiG +F+spskYpIXZ0U+YNne4PWThhk0tMgq2rJUovQ6kCGjCnPnRR41UWBkGciXfvOR39 +BbrBK4wsBTRmrM3Hvs41sZlYkIc6mS/PEs1H7gId8vKt3BGqTHN39+qv6aoSwbi8 +GaNSRSuuMRsQnnUXBzgilXEnWA2oYncSD8pcorPDAe/gaRNV5+/dpQJrYjbYig== +=8rxb +-----END PGP MESSAGE----- diff --git a/runs/after/calendar b/runs/after/calendar index c8ce029..c759e6a 100755 --- a/runs/after/calendar +++ b/runs/after/calendar @@ -1,13 +1,24 @@ #!/usr/bin/env bash +DEV_ENV=${DEV_ENV:-""} +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} + install() { + + [[ -z $DEV_ENV ]] && echo -e "\e[031m[ERROR]:\e[0m 'DEV_ENV' not set." && exit 1 + + # Clone and build qcal locally, as it didn't work for me when downloading from the aur. mkdir ~/pkgbuilds &>/dev/null git clone https://github.com/psic4t/qcal.git ~/pkgbuilds/qcal - pushd ~/pkgbuilds/qcal || exit 1 + pushd ~/pkgbuilds/qcal &>/dev/null || exit 1 ( make && sudo make install ) - popd + popd &>/dev/null || exit 1 + + # Decrypt and copy configuration file for qcal. + mkdir "$XDG_CONFIG_HOME"/qcal &>/dev/null + gpg --output "$XDG_CONFIG_HOME"/qcal/config.json --decrypt "$DEV_ENV"/env/qcal/config.json.gpg } uninstall() {