FelixKratz / SketchyBar

A highly customizable macOS status bar replacement
https://felixkratz.github.io/SketchyBar/
GNU General Public License v3.0
5.62k stars 86 forks source link

Transparent background turns opaque when focusing on second monitor #600

Open Felipe-9 opened 3 weeks ago

Felipe-9 commented 3 weeks ago

I have set the bar background with a transparent alpha which works fine but whenever the monitor is not focussed it turns opaque, i tried taking a printscreen but for some reason it still shows transparent.

colors.lua

local cat = require("catppuccin")
-- Catppuccin mocha palette

return {
  black   = cat.mocha.crust,
  white   = cat.mocha.text,
  red     = cat.mocha.red,
  green   = cat.mocha.green,
  blue    = cat.mocha.blue,
  teal    = cat.mocha.teal,
  yellow  = cat.mocha.yellow,
  orange  = cat.mocha.peach,
  magenta = cat.mocha.mauve,
  grey    = cat.mocha.overlay1,
  transparent = cat.invisible,

  bar = {
    bg = cat.with_alpha(cat.mocha.base,0.6),
    border = cat.mocha.overlay0
  },
  popup = {
    bg = cat.with_alpha(cat.mocha.base,0.9),
    border = cat.mocha.lavender,
  },
  bg1 = cat.with_alpha(cat.mocha.surface0,0.7),
  bg2 = cat.with_alpha(cat.mocha.surface1,0.9),

  with_alpha = cat.with_alpha
}
-- with_alpha = function(color, alpha)
--   if alpha > 1.0 or alpha < 0.0 then return color end
--   return (color & 0x00ffffff) | (math.floor(alpha * 255.0) << 24)
-- end

bar.lua

local colors = require("colors")

-- Equivalent to the --bar domain
sbar.bar({
  topmost = off,
  height = 25,
  border_width = 0,
  color = colors.bar.bg,
  boder_color = colors.bar.border,
  padding_right = 10,
  padding_left = 10,
  blur_radius = 5,
  corner_radius = 30,
  margin = 10,
  notch_width = 300,
  position = top,
  shadow = off,
  sticky = on,
  y_offset = 7,
})
FelixKratz commented 2 weeks ago

I can not reproduce this, which macOS version are you on?

Felipe-9 commented 2 weeks ago

Im using macOS 14.6.1 (23G93)

Also for clarity (and i already edited on the question) it turns opaque when focusing on second monitor. Would you need any more information to try to reproduce?