crissNb/Dynamic-Island-Sketchybar

Does not work

Closed this issue · 10 comments

I have tried setuping dynamic island, but it does not work.
Processes are running and items are added to dynamic-island-sketchybar.
I tried restarting but it did not help.

System

Model: Macbook Pro 2021 16inch
OS: macOS 13.4.1 22F82 arm64
Sketchybar: sketchybar-v2.15.2
SIP: Enabled

My sketchybar config
#!/usr/bin/env bash


dynamic-island-sketchybar
My dynamic island config
##### DYNAMIC ISLAND USER CONFIG - MACBOOK PRO 2021 - 16 INCH #####

## These are the default values, you can choose to only include modified options in a clean file

#
### Main config
#

# Set this variable to "on", if you are going to use the dynamic island with macOS's menu bar
P_DYNAMIC_ISLAND_TOPMOST=on

# Which display should the dynamic island be available?
# Available options: All, Primary, Active
P_DYNAMIC_ISLAND_DISPLAY=Primary

# Needs to have Regular, Bold, Semibold, Heavy and Black variants
# Font icons may not load properly if not SF Pro
P_DYNAMIC_ISLAND_FONT="SF Pro"

# Enable/Disable Islands
P_DYNAMIC_ISLAND_MUSIC_ENABLED=1
P_DYNAMIC_ISLAND_APPSWITCH_ENABLED=1
export P_DYNAMIC_ISLAND_NOTIFICATION_ENABLED=1
P_DYNAMIC_ISLAND_VOLUME_ENABLED=1
P_DYNAMIC_ISLAND_BRIGHTNESS_ENABLED=1
P_DYNAMIC_ISLAND_WIFI_ENABLED=1
P_DYNAMIC_ISLAND_POWER_ENABLED=1

# Notch Size
P_DYNAMIC_ISLAND_MAX_HEIGHT=200
P_DYNAMIC_ISLAND_DEFAULT_HEIGHT=150
P_DYNAMIC_ISLAND_DEFAULT_WIDTH=200
P_DYNAMIC_ISLAND_DEFAULT_CORNER_RADIUS=16

# Animation Settings
P_DYNAMIC_ISLAND_SQUISH_AMOUNT=9


#
## App Switch Island config
#
P_DYNAMIC_ISLAND_APPSWITCH_EXPAND_WIDTH=152 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_APPSWITCH_MAX_EXPAND_WIDTH=285 # Max size when expanded
P_DYNAMIC_ISLAND_APPSWITCH_EXPAND_HEIGHT=100
P_DYNAMIC_ISLAND_APPSWITCH_CORNER_RAD=15 # Corner Radius
P_DYNAMIC_ISLAND_APPSWITCH_ICON_SIZE=0.4


#
## Volume Island config
#
P_DYNAMIC_ISLAND_VOLUME_EXPAND_WIDTH=192 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_VOLUME_MAX_EXPAND_WIDTH=250 # Max size when expanded
P_DYNAMIC_ISLAND_VOLUME_DEFAULT_HEIGHT=25
P_DYNAMIC_ISLAND_VOLUME_EXPAND_HEIGHT=30
P_DYNAMIC_ISLAND_VOLUME_CORNER_RAD=12 # Corner Radius
P_DYNAMIC_ISLAND_VOLUME_NORMAL_ICON_COLOR=0xffffffff
P_DYNAMIC_ISLAND_ICON_VOLUME_MAX=􀊩
P_DYNAMIC_ISLAND_ICON_VOLUME_MED=􀊧
P_DYNAMIC_ISLAND_ICON_VOLUME_LOW=􀊥
P_DYNAMIC_ISLAND_ICON_VOLUME_MUTED=􀊡

#
## Brightness Island config
#
P_DYNAMIC_ISLAND_BRIGHTNESS_EXPAND_WIDTH=192 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_BRIGHTNESS_MAX_EXPAND_WIDTH=250 # Max size when expanded
P_DYNAMIC_ISLAND_BRIGHTNESS_DEFAULT_HEIGHT=13
P_DYNAMIC_ISLAND_BRIGHTNESS_EXPAND_HEIGHT=16
P_DYNAMIC_ISLAND_BRIGHTNESS_CORNER_RAD=12 # Corner Radius
P_DYNAMIC_ISLAND_BRIGHTNESS_NORMAL_ICON_COLOR=0xffffffff
P_DYNAMIC_ISLAND_ICON_BRIGHTNESS_LOW=􀆫
P_DYNAMIC_ISLAND_ICON_BRIGHTNESS_HIGH=􀆭


#
## Music Island config
#
# Music Info
P_DYNAMIC_ISLAND_MUSIC_SOURCE="Spotify" # AVAILABLE OPTIONS (case sensitive): Music (apple music), Spotify
P_DYNAMIC_ISLAND_MUSIC_INFO_DEFAULT_HEIGHT=52
P_DYNAMIC_ISLAND_MUSIC_INFO_EXPAND_WIDTH=120 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_MUSIC_INFO_MAX_EXPAND_WIDTH=270 # Max size when expanded#
P_DYNAMIC_ISLAND_MUSIC_INFO_EXPAND_HEIGHT=120
P_DYNAMIC_ISLAND_MUSIC_INFO_CORNER_RAD=34 # Corner Radius
# Resume Info
P_DYNAMIC_ISLAND_MUSIC_RESUME_EXPAND_WIDTH=174 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_MUSIC_RESUME_MAX_EXPAND_WIDTH=270
P_DYNAMIC_ISLAND_MUSIC_RESUME_EXPAND_HEIGHT=65
P_DYNAMIC_ISLAND_MUSIC_RESUME_CORNER_RAD=15 # Corner Radius

#
## WIFI Island config
#
P_DYNAMIC_ISLAND_WIFI_EXPAND_WIDTH=152 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_WIFI_MAX_EXPAND_WIDTH=295 # Max size when expanded
P_DYNAMIC_ISLAND_WIFI_EXPAND_HEIGHT=100
P_DYNAMIC_ISLAND_WIFI_CORNER_RAD=15 # Corner Radius
P_DYNAMIC_ISLAND_ICON_WIFI_CONNECTED=􀙇
P_DYNAMIC_ISLAND_ICON_WIFI_DISCONNECTED=􀙈

#
## Battery Island config
#
P_DYNAMIC_ISLAND_BATTERY_EXPAND_WIDTH=152 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_BATTERY_MAX_EXPAND_WIDTH=295 # Max size when expanded
P_DYNAMIC_ISLAND_BATTERY_EXPAND_HEIGHT=100
P_DYNAMIC_ISLAND_BATTERY_CORNER_RAD=15 # Corner Radius
P_DYNAMIC_ISLAND_ICON_BATTERY_CONNECTEDAC=􀢋
P_DYNAMIC_ISLAND_ICON_BATTERY_ONBATTERY=􀺸

#
## Notification Island Config
#
P_DYNAMIC_ISLAND_NOTIFICATION_EXPAND_WIDTH=93 # This value should match the notch size, appearence wise
P_DYNAMIC_ISLAND_NOTIFICATION_MAX_EXPAND_WIDTH=260 # Max size when expanded
P_DYNAMIC_ISLAND_NOTIFICATION_EXPAND_HEIGHT=140
P_DYNAMIC_ISLAND_NOTIFICATION_CORNER_RAD=42 # Corner Radius
P_DYNAMIC_ISLAND_NOTIFICATION_MAX_ALLOWED_BODY=250 # Max allowed body for notification message

############# THESE VALUES SHOULDN'T BE UNTOUCHED #############

#
## Colors
# 
P_DYNAMIC_ISLAND_COLOR_WHITE=0xffffffff
P_DYNAMIC_ISLAND_COLOR_BLACK=0xff000000
P_DYNAMIC_ISLAND_COLOR_TRANSPARENT=0x00000000
P_DYNAMIC_ISLAND_COLOR_ICON_HIDDEN=$P_DYNAMIC_ISLAND_COLOR_BLACK

Also could i switch dynamic island to default bar?

I'm unable to reproduce the issue (from clean installing). Just to make sure, the userconfig.sh file must be placed right under the same ~/.config/dynamic-island-sketchybar directory.

Do you see the extra notch (for the Dynamic Island)? If not, try setting P_DYNAMIC_ISLAND_DISPLAY to All in your userconfig.sh. Otherwise, send me a log by running dynamic-island-sketchybar in terminal.

Also could i switch dynamic island to default bar?

Ideally, if you just want to have Dynamic Island (without SketchyBar's extra Bar), you'd run dynamic-island-sketchybar separately and not in sketchybarrc.

Logs

make: `islandhelper' is up to date.

Queries

`dynamic-island-sketchybar -m --query bar`
{
  "position": "top",
  "topmost": "off",
  "sticky": "on",
  "shadow": "off",
  "font_smoothing": "off",
  "blur_radius": 30,
  "margin": 10,
  "drawing": "on",
  "color": "0x0",
  "border_color": "0xffff0000",
  "border_width": 0,
  "height": 32,
  "corner_radius": 9,
  "padding_left": 18,
  "padding_right": 7,
  "y_offset": 0,
  "clip": 0.000000,
  "image": {
  	"value": "(null)",
  	"drawing": "off",
  	"scale": 1.000000
  },
  "items": [
  	 "island",
  	 "di_helper_listener"
  ]
}
`dynamic-island-sketchybar -m --query island`
{
  "name": "island",
  "type": "item",
  "geometry": {
  	"drawing": "on",
  	"position": "center",
  	"associated_space_mask": 0,
  	"associated_display_mask": 0,
  	"ignore_association": "off",
  	"y_offset": 0,
  	"width": 0,
  	"padding_left": 0,
  	"padding_right": 0,
  	"background": {
  		"drawing": "on",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 50,
  		"corner_radius": 0,
  		"padding_left": 0,
  		"padding_right": 0,
  		"y_offset": 9,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	}
  },
  "icon": {
  	"value": "",
  	"drawing": "on",
  	"highlight": "off",
  	"color": "0x0",
  	"highlight_color": "0xff000000",
  	"padding_left": 3,
  	"padding_right": 3,
  	"y_offset": 0,
  	"font": "::10.00",
  	"width": 0,
  	"align": "left",
  	"background": {
  		"drawing": "off",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 0,
  		"corner_radius": 0,
  		"padding_left": 0,
  		"padding_right": 0,
  		"y_offset": 0,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	},
  	"shadow": {
  		"drawing": "off",
  		"color": "0xff000000",
  		"angle": 30,
  		"distance": 5
  	}
  },
  "label": {
  	"value": "",
  	"drawing": "on",
  	"highlight": "off",
  	"color": "0x0",
  	"highlight_color": "0xff000000",
  	"padding_left": 3,
  	"padding_right": 3,
  	"y_offset": 0,
  	"font": "::10.00",
  	"width": 0,
  	"align": "left",
  	"background": {
  		"drawing": "off",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 0,
  		"corner_radius": 0,
  		"padding_left": 0,
  		"padding_right": 0,
  		"y_offset": 0,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	},
  	"shadow": {
  		"drawing": "off",
  		"color": "0xff000000",
  		"angle": 30,
  		"distance": 5
  	}
  },
  "scripting": {
  	"script": "(null)",
  	"click_script": "(null)",
  	"update_freq": 2,
  	"update_mask": 98304,
  	"updates": "when_shown"
  },
  "bounding_rects": {
  	"display-1": {
  		"origin": [ 863.000000, 0.000000 ],
  		"size": [ 14.000000, 32.000000 ]
  	}
  }
}
`dynamic-island-sketchybar -m --query di_helper_listener`
{
  "name": "di_helper_listener",
  "type": "item",
  "geometry": {
  	"drawing": "on",
  	"position": "center",
  	"associated_space_mask": 0,
  	"associated_display_mask": 0,
  	"ignore_association": "off",
  	"y_offset": 0,
  	"width": 3,
  	"padding_left": 3,
  	"padding_right": 0,
  	"background": {
  		"drawing": "off",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 0,
  		"corner_radius": 0,
  		"padding_left": 3,
  		"padding_right": 3,
  		"y_offset": 0,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	}
  },
  "icon": {
  	"value": "",
  	"drawing": "on",
  	"highlight": "off",
  	"color": "0x0",
  	"highlight_color": "0xff000000",
  	"padding_left": 3,
  	"padding_right": 3,
  	"y_offset": 0,
  	"font": "::10.00",
  	"width": 0,
  	"align": "left",
  	"background": {
  		"drawing": "off",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 0,
  		"corner_radius": 0,
  		"padding_left": 0,
  		"padding_right": 0,
  		"y_offset": 0,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	},
  	"shadow": {
  		"drawing": "off",
  		"color": "0xff000000",
  		"angle": 30,
  		"distance": 5
  	}
  },
  "label": {
  	"value": "",
  	"drawing": "on",
  	"highlight": "off",
  	"color": "0x0",
  	"highlight_color": "0xff000000",
  	"padding_left": 3,
  	"padding_right": 3,
  	"y_offset": 0,
  	"font": "::10.00",
  	"width": 0,
  	"align": "left",
  	"background": {
  		"drawing": "off",
  		"color": "0x0",
  		"border_color": "0x0",
  		"border_width": 0,
  		"height": 0,
  		"corner_radius": 0,
  		"padding_left": 0,
  		"padding_right": 0,
  		"y_offset": 0,
  		"clip": 0.000000,
  		"image": {
  			"value": "(null)",
  			"drawing": "off",
  			"scale": 1.000000
  		},
  		"shadow": {
  			"drawing": "off",
  			"color": "0xff000000",
  			"angle": 30,
  			"distance": 5
  		}
  	},
  	"shadow": {
  		"drawing": "off",
  		"color": "0xff000000",
  		"angle": 30,
  		"distance": 5
  	}
  },
  "scripting": {
  	"script": "/Users/olshamb/.config/dynamic-island-sketchybar/process.sh",
  	"click_script": "(null)",
  	"update_freq": 0,
  	"update_mask": 131072,
  	"updates": "when_shown"
  },
  "bounding_rects": {
  	"display-1": {
  		"origin": [ 866.000000, 0.000000 ],
  		"size": [ 14.000000, 32.000000 ]
  	}
  }
}
`dynamic-island-sketchybar -m --query events`
{
  "front_app_switched": {
  	"bit": 1,
  	"notification": "(null)"
  },
  "space_change": {
  	"bit": 2,
  	"notification": "(null)"
  },
  "display_change": {
  	"bit": 4,
  	"notification": "(null)"
  },
  "system_woke": {
  	"bit": 8,
  	"notification": "(null)"
  },
  "mouse.entered": {
  	"bit": 16,
  	"notification": "(null)"
  },
  "mouse.exited": {
  	"bit": 32,
  	"notification": "(null)"
  },
  "mouse.clicked": {
  	"bit": 64,
  	"notification": "(null)"
  },
  "system_will_sleep": {
  	"bit": 128,
  	"notification": "(null)"
  },
  "mouse.entered.global": {
  	"bit": 256,
  	"notification": "(null)"
  },
  "mouse.exited.global": {
  	"bit": 512,
  	"notification": "(null)"
  },
  "volume_change": {
  	"bit": 1024,
  	"notification": "(null)"
  },
  "brightness_change": {
  	"bit": 2048,
  	"notification": "(null)"
  },
  "power_source_change": {
  	"bit": 4096,
  	"notification": "(null)"
  },
  "wifi_change": {
  	"bit": 8192,
  	"notification": "(null)"
  },
  "media_change": {
  	"bit": 16384,
  	"notification": "(null)"
  },
  "dynamic_island_queue": {
  	"bit": 32768,
  	"notification": "(null)"
  },
  "dynamic_island_request": {
  	"bit": 65536,
  	"notification": "(null)"
  },
  "di_helper_listener_event": {
  	"bit": 131072,
  	"notification": "(null)"
  }
}

Also i do understand that this issue is hard to debug, but i don't understand why added items are not showing(dynamic island)

I am really confused.
Should i maybe create an issue in sketchybar?

also i aplied the setting you suggested
nothing changed

sketchy bar displays normally:

SCR-20230717-rwsw

It is more likely that the issue lies on either ~/.config/dynamic-island-sketchybar/userconfig.sh or the helper program. The item properties are initialized with the values from userconfig.sh. If this file isn't sourced during the initialization, the Dynamic Island will be created, but with invalid properties (with bunch of 0s, which causes the island to not be visible and not function). Absence of this file also causes the helper program to not function (helper program should usually print out the island queues).

I'm not sure why, but it could also be a problem with detecting this file. In item.sh, you'll notice how the Dynamic-Island is grabbing the userconfig file as well as the directory where it is stored in. One thing you could try is see if the island is really properly detecting the file.

Yep the issue was i didn't put userconfig.sh in root i put it in userconfigs

Maybe create better docs or installation script?(so you could chose the config?)