From e09a8e9fbb580c38ba609eff7f76295226d09091 Mon Sep 17 00:00:00 2001
From: matt1432 <matt@nelim.org>
Date: Fri, 8 Sep 2023 14:21:31 -0400
Subject: [PATCH] feat(ags): add startup script when ags launches

---
 config/ags/bin/startup.sh | 10 ++++++++++
 config/ags/config.js      |  2 ++
 2 files changed, 12 insertions(+)
 create mode 100755 config/ags/bin/startup.sh

diff --git a/config/ags/bin/startup.sh b/config/ags/bin/startup.sh
new file mode 100755
index 00000000..af1ede43
--- /dev/null
+++ b/config/ags/bin/startup.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+## Make bluetooth status persistent between reboots
+if [[ ! -f "$HOME/.config/.bluetooth" ]]; then
+  echo 󰂲 > "$FILE"
+fi
+
+if grep -q 󰂲 "$HOME/.config/.bluetooth"; then
+  rfkill block bluetooth
+fi
diff --git a/config/ags/config.js b/config/ags/config.js
index 095e213a..1be9cc66 100644
--- a/config/ags/config.js
+++ b/config/ags/config.js
@@ -9,6 +9,8 @@ const css = ags.App.configDir + '/style.css';
 exec(`touch ${css}`);
 exec(`sassc ${scss} ${css}`);
 
+exec(`bash -c "$AGS_PATH/startup.sh"`);
+
 export default {
     style: css,
     windows: [