From 130e628ab35de45226fb5b88f103c1938dacfc63 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:02:11 +0900 Subject: modified .gnupg/gpg-agent.conf, created sketchybar/ --- mac/.config/sketchybar/plugins/monitor_watcher.sh | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 mac/.config/sketchybar/plugins/monitor_watcher.sh (limited to 'mac/.config/sketchybar/plugins/monitor_watcher.sh') diff --git a/mac/.config/sketchybar/plugins/monitor_watcher.sh b/mac/.config/sketchybar/plugins/monitor_watcher.sh new file mode 100755 index 0000000..50868d3 --- /dev/null +++ b/mac/.config/sketchybar/plugins/monitor_watcher.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Source colors for consistent theming +source "$CONFIG_DIR/colors.sh" + +# Store current monitor state to detect changes +MONITOR_STATE_FILE="/tmp/aerospace_monitor_state" + +# Get current monitor state +CURRENT_MONITORS=$(aerospace list-monitors | awk '{print $1}' | sort | tr '\n' ' ') + +# Check if state has changed +if [ -f "$MONITOR_STATE_FILE" ]; then + PREVIOUS_MONITORS=$(cat "$MONITOR_STATE_FILE") + if [ "$CURRENT_MONITORS" != "$PREVIOUS_MONITORS" ]; then + # Monitor configuration changed, update display + "$CONFIG_DIR/plugins/aerospace_display.sh" + fi +else + # First run, create state file + "$CONFIG_DIR/plugins/aerospace_display.sh" +fi + +# Save current state +echo "$CURRENT_MONITORS" > "$MONITOR_STATE_FILE" \ No newline at end of file -- cgit v1.2.3