Alias name for items

Author: naba-nyanCreated Jul 26, 2026Updated Jul 26, 2026

I recently started to use the allias feature, but I have two troubles.

  1. I notice that the item name obtained by sketchybar --query default_menu_items is unstable. For examle, the name for weather widget is Control Center, com.apple.weather.menu(5) right after logging in, but a few minutes later, it chages to Control Center,Item-0(3). Also, sometimes the name for it is Control Center,Item-0(3) right after logging in. Hence, sometimes the aslias component disappear since I configure it by the item name Control Center, com.apple.weather.menu(5).

  2. It is strange for me why sketchybar --query default_menu_items dumps item names with suffix (n). Probably, n denotes the order of items. If I launch some app containing a menubar item, then it breaks the order of them and hence a shift occurs in the suffix (n).

Is there a way to obtain a sysmem normalized alias name for each menubar item, or fix these issues?

The followings is name lists which sketchybar dumps.

"Control Center,(1)",
"Control Center,Clock(2)",
"Control Center,(3)",
"Control Center,BentoBox-0(4)",
"Control Center,com.apple.weather.menu(5)",
"Control Center,Item-0(6)",
"Control Center,Item-0(7)",
"Control Center,com.apple.TextInputMenuAgent(8)",
"Control Center,Item-0(9)",
"Control Center,com.apple.Spotlight(10)",
"Control Center,WiFi(11)",
"Control Center,(12)",
"Control Center,Bluetooth(13)",
"Control Center,(14)",
"Control Center,com.apple.Passwords.MenuBarExtra(15)",
"Control Center,Item-0(16)",
"WeatherMenu,(17)",
"AccessibilityVisualsAgent,(18)"

After a few minuets, I obtain the following one:

"Control Center,Clock(1)",
"Control Center,BentoBox-0(2)",
"Control Center,Item-0(3)",
"Control Center,Item-0(4)",
"Control Center,Item-0(5)",
"Control Center,WiFi(6)",
"Control Center,Bluetooth(7)",
"Control Center,Item-0(8)",
"WeatherMenu,(9)",
"AccessibilityVisualsAgent,(10)"