From 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 23 Aug 2025 12:42:37 +0900 Subject: updates --- mac/.config/sketchybar.allapp/plugins/get_input_source.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 mac/.config/sketchybar.allapp/plugins/get_input_source.sh (limited to 'mac/.config/sketchybar.allapp/plugins/get_input_source.sh') diff --git a/mac/.config/sketchybar.allapp/plugins/get_input_source.sh b/mac/.config/sketchybar.allapp/plugins/get_input_source.sh new file mode 100755 index 0000000..89dab2b --- /dev/null +++ b/mac/.config/sketchybar.allapp/plugins/get_input_source.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# hangul and english item + +# Read the plist data +plist_data=$(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleSelectedInputSources) +current_input_source=$(echo "$plist_data" | plutil -convert xml1 -o - - | grep -A1 'KeyboardLayout Name' | tail -n1 | cut -d '>' -f2 | cut -d '<' -f1) + +if [ "$current_input_source" = "ABC" ]; then + sketchybar --set input_source icon="􀂕" +else + sketchybar --set input_source icon="􀂩" +fi -- cgit v1.2.3