FelixKratz / SbarLua

A Lua API for SketchyBar
GNU General Public License v3.0
155 stars 11 forks source link

icon.background.image property not updating as expected #39

Closed colmugx closed 3 months ago

colmugx commented 3 months ago

I'm trying to replace a shell script with an equivalent Lua script using sbarlua, but the Lua version is not working as intended.

shell code:

sketchybar --set $NAME label="$INFO" icon.background.image="app.$INFO"

lua code:

front_app:subscribe({ "front_app_switched" }, function(env)
  front_app:set({
    icon = {
      background = { image = { string = "app." .. env.INFO } }
    },
    label = { string = env.INFO }
  })
end)
colmugx commented 3 months ago

maybe i solved it.

make color transparent likes

front_app:set({
  icon = {
    background = { image = { string = "app." .. env.INFO }, color = 0xffffffff }
  },
  label = { string = env.INFO }
})