summarylogtreecommitdiffstats
path: root/fish-ayu-theme.install
diff options
context:
space:
mode:
authorlmartinez-mirror2021-04-07 03:33:13 -0500
committerlmartinez-mirror2021-04-07 03:33:13 -0500
commitd003c7f2cd714ae7d8b90d09dbae12dd5f0f4ae9 (patch)
tree0fdbe9feeeb15011bb07eeab7760729d07a4c929 /fish-ayu-theme.install
parentdfe8cf5f57b0d9c3de932c41f09bd90c26843783 (diff)
downloadaur-fish-ayu-theme.tar.gz
add install script for fish variables
Diffstat (limited to 'fish-ayu-theme.install')
-rw-r--r--fish-ayu-theme.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/fish-ayu-theme.install b/fish-ayu-theme.install
new file mode 100644
index 000000000000..1ca67cb95157
--- /dev/null
+++ b/fish-ayu-theme.install
@@ -0,0 +1,24 @@
+post_install() {
+ echo ":: Setting up ayu_path..."
+ fish -Pc 'set -U ayu_path /etc/fish/'
+ echo ":: ayu_path has been set!"
+ echo ":: You must choose one of three options for your scheme: light, dark, or mirage"
+ echo ":: You can set the colorscheme with 'set -U ayu_variant {scheme}', then load it with 'load_ayu_theme'"
+}
+
+post_upgrade() {
+ echo ":: Checking for existing ayu_path..."
+ fish -Pc 'set -Uq ayu_path'
+ if [[ $? == 0 ]]; then
+ echo ":: ayu_path already set!"
+ else
+ echo ":: ayu_path not set!"
+ post_install
+ fi
+}
+
+pre_remove() {
+ echo ":: Removing ayu_path"
+ fish -Pc 'set -Uq ayu_path || set -Ue ayu_path'
+ echo ":: Removed ayu_path!"
+}