FelixKratz / SketchyBar

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

Battery display and sound device switch go wrong suddenly . I even don't know what happened. #574

Closed xbunax closed 1 day ago

xbunax commented 6 days ago
image image

This is my sketchybar config https://github.com/xbunax/dotfile/blob/main/sketchybar/items/widgets/battery.lua which modify FelixKratz's lua config.

This is my system info and app version

sketchybar-v2.21.0
                   'c.          xbunax@MacBook-Air-4.local 
                 ,xNMM.          -------------------------- 
               .OMMMMo           OS: macOS 14.5 23F79 arm64 
               OMMM0,            Host: Mac14,2 
     .;loddo:' loolloddol;.      Kernel: 23.5.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 51 mins 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 1 (port), 275 (brew) 
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9 
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080, 1470x956 
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua 
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: yabai 
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    Terminal: /dev/ttys003 
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   CPU: Apple M2 
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   GPU: Apple M2 
    kMMMMMMMMMMMMMMMMMMMMMMd     Memory: 2363MiB / 16384MiB 
     ;KMMMMMMMWXXWMMMMMMMk.
       .cooc,.    .,coo:.                                
pkdevel commented 5 days ago

exact same problem here. just suddenly stopped working and i'm clueless i tried debugging: sbar.exec("pmset -g batt") -> empty result sbar.exec("echo test") -> expected result 'test'

xbunax commented 5 days ago

exact same problem here. just suddenly stopped working and i'm clueless i tried debugging: sbar.exec("pmset -g batt") -> empty result sbar.exec("echo test") -> expected result 'test'

Do you find some problem ? I have no idea to fix this for now.😭

pkdevel commented 5 days ago

i guess it's related to the lua version update mentioned here: https://github.com/FelixKratz/SbarLua/issues/29

i will give it try

edit: sorry for the late response, but it works ¯_(ツ)_/¯

xbunax commented 5 days ago

i guess it's related to the lua version update mentioned here: FelixKratz/SbarLua#29

i will give it try

I compile a lua5.4.4 but it's useless

xbunax commented 5 days ago

When I use lua 5.4.7 and with your lua config , the battery info seems to be wrong. image

So I recompile the lua with 5.4.4 image

and it works. image

Maybe we can export it to luarocks rock spec with spec version of lua

i guess it's related to the lua version update mentioned here: FelixKratz/SbarLua#29 i will give it try

I compile a lua5.4.4 but it's useless

I fix this, thank you