A design I made 😃

Design I made I would love an opinion

Finder

AutoFill and Paste

Playing now

Does not play

Language change

Control center

Google Chrome and Safari

YouTube

Safari

Google Chrome

soundcloud

Gmail

Twitch

Netflix

community.folivora

Spotify and Music

System Preferences

Notes

Messages

Calculator

App Store

BetterTouchTool

WhatsApp

Telegram

Photo Booth

Maps

What is the code you use for this? My Apple Scrip is based on UI Scripting and therefore id like to get away from this :slightly_smiling_face:

set activeKbdLayout to my getActiveKeyboardLayout()
on getActiveKeyboardLayout()
set plistPath to "~/Library/Preferences/com.apple.HIToolbox.plist"
try
do shell script "defaults read " & plistPath & " dummy"
end try
tell application "System Events"
repeat with pli in property list items of ¬
property list item "AppleSelectedInputSources" of ¬
property list file plistPath
try
return value of property list item "KeyboardLayout Name" of pli
end try
end repeat
end tell
end getActiveKeyboardLayout

if activeKbdLayout is "Hebrew" then
return ":israel:"
else if activeKbdLayout is "ABC" then
return ":us:"
end if

-- set IconPath to ((path to desktop folder from user Sagi) & "KeyboardInputs:" & activeKbdLayout & ".png") as string

-- return "{ "text":"" & "Current: " & activeKbdLayout & "", "icon_path":"" & (POSIX path of IconPath as text) & "" }"

Wow, I find this really appealing and useful! I don't like so much of the contextually dynamic set ups and thing you really got something here. Do you mind sharing the preset as a .btt?

It's not finished yet. When I'm done, I'll publish

2 Likes

There are new things you are welcome to see in the pictures

Imprint | Privacy Policy