Closed jie17 closed 9 months ago
In macOS 13, lsappinfo front
returns something like ASN:0x0-14b14b:
as well.
What might have changed is what lsappinfo info -only bundleID (lsappinfo front)
returns.
@jie17 could you try that and share? Thanks!
@jie17 I've just tested done on macOS 14.0 and both done
and the command seem to be working properly. Any ideas?
I'm having the same issue on macOS 14.0 (23A344).
What might have changed is what
lsappinfo info -only bundleID (lsappinfo front)
returns.
This gives empty result on my machine. In fact lsappinfo info <ASN>
doesn't work at all (lsappinfo info <name>
still works though).
EDIT: after reading the discussion again I found this works:
diff --git a/conf.d/done.fish b/conf.d/done.fish
index 7a6cc23..d455fad 100644
--- a/conf.d/done.fish
+++ b/conf.d/done.fish
@@ -78,7 +78,7 @@ end
function __done_get_focused_window_id
if type -q lsappinfo
- lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
+ lsappinfo info -only bundleID (lsappinfo front | string replace ASN:0x0- 0x) | cut -d '"' -f4
else if test -n "$SWAYSOCK"
and type -q jq
swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id'
@kidonng your proposal works in macOS 13, so we could possibly go with that. I wonder if all apps start with the 0x0
prefix though. Could you try the following two variants and let me know if any of them work?
I would test them myself, but in my VM, the original command is working correctly.
lsappinfo info -only bundleID -long (lsappinfo front) | cut -d '"' -f4
lsappinfo info -only bundleID -app (lsappinfo front) | cut -d '"' -f4
Thanks!
lsappinfo info -only bundleID -long (lsappinfo front) | cut -d '"' -f4
lsappinfo info -only bundleID -app (lsappinfo front) | cut -d '"' -f4
Both commands return nothing in my environment.
Also, by callinglsappinfo processList
, I found that all apps start with 0x0:0x
, and then followed by 5 or 6 hex digits.
Fixed in v1.17.1
I'm not sure if the specs of
lsappinfo
has changed or not. However, in macOS 14.0,lsappinfo front
returns something likeASN:0x0-14b14b:
. To get the bundle id, the command should belsappinfo info -only bundleId 0x14b14b | cut -d '"' -f4
.lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
is not working.