Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] yabai not detected with yabai --start-service #1087

Closed
alberto-lazari opened this issue Jul 11, 2024 · 10 comments
Closed

[BUG] yabai not detected with yabai --start-service #1087

alberto-lazari opened this issue Jul 11, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@alberto-lazari
Copy link

alberto-lazari commented Jul 11, 2024

General description of bug:

Yabai is not detected by the WM module.

I started it with yabai --start-service.
As shown in the screenshot yabai is clearly running, because I can create a custom module that tries to detect it by looking for its PID

Often helpful information:

Screenshot:
Screenshot 2024-07-11 at 08 46 52

The content of the configuration file you use (if any):

{
  "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
  "modules": [
    "host",
    "os",
    "wm",
    {
        "key": "Custom WM",
        "type": "command",
        // Detect yabai
        "text": "pgrep yabai &> /dev/null && echo yabai || echo Quartz Compositor"
    }
  ]
}

Output of fastfetch -c ci.jsonc --format json:

[
  {
    "type": "Title",
    "result": {
      "userName": "alberto",
      "hostName": "laz-macbook",
      "homeDir": "/Users/alberto/",
      "exePath": "/opt/homebrew/Cellar/fastfetch/2.18.1/bin/fastfetch",
      "userShell": "/bin/zsh"
    },
    "stat": 0
  },
  {
    "type": "Separator",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "OS",
    "result": {
      "buildID": "23F79",
      "codename": "Sonoma",
      "id": "macos",
      "idLike": "",
      "name": "macOS",
      "prettyName": "macOS",
      "variant": "",
      "variantID": "",
      "version": "14.5",
      "versionID": "14.5"
    },
    "stat": 1
  },
  {
    "type": "Host",
    "result": {
      "family": "MacBookAir10,1",
      "name": "MacBook Air (M1, 2020)",
      "version": "",
      "sku": "",
      "vendor": "Apple Inc.",
      "serial": "C02GF0KEQ6LW",
      "uuid": "C2E867F5-5281-566B-ABA5-697D143CC078"
    },
    "stat": 0
  },
  {
    "type": "Bios",
    "result": {
      "date": "Tue Apr 16 21:16:56 PDT 2024",
      "release": "",
      "vendor": "Apple Inc.",
      "version": "10151.121.1",
      "type": "iBoot"
    },
    "stat": 0
  },
  {
    "type": "Bootmgr",
    "result": {
      "name": "iBoot",
      "firmware": "/System/Library/CoreServices/boot.efi",
      "secureBoot": false
    },
    "stat": 0
  },
  {
    "type": "Board",
    "result": {
      "name": "J313AP",
      "vendor": "Apple Inc.",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Chassis",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Kernel",
    "result": {
      "architecture": "arm64",
      "name": "Darwin",
      "release": "23.5.0",
      "version": "Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103",
      "displayVersion": "",
      "pageSize": 16384
    },
    "stat": 0
  },
  {
    "type": "InitSystem",
    "result": {
      "name": "launchd",
      "exe": "/sbin/launchd",
      "version": "7.0.0",
      "pid": 1
    },
    "stat": 4
  },
  {
    "type": "Uptime",
    "result": {
      "uptime": 2280051378,
      "bootTime": "2024-06-14T23:28:22.412+0200"
    },
    "stat": 0
  },
  {
    "type": "Loadavg",
    "result": [
      2.19091796875,
      2.42529296875,
      2.0498046875
    ],
    "stat": 0
  },
  {
    "type": "Processes",
    "result": 439,
    "stat": 0
  },
  {
    "type": "Packages",
    "result": {
      "all": 184,
      "apk": 0,
      "brew": 174,
      "brewCask": 10,
      "choco": 0,
      "dpkg": 0,
      "emerge": 0,
      "eopkg": 0,
      "flatpakSystem": 0,
      "flatpakUser": 0,
      "nixDefault": 0,
      "nixSystem": 0,
      "nixUser": 0,
      "pacman": 0,
      "paludis": 0,
      "pkg": 0,
      "pkgtool": 0,
      "macports": 0,
      "rpm": 0,
      "scoop": 0,
      "snap": 0,
      "winget": 0,
      "xbps": 0,
      "opkg": 0,
      "am": 0,
      "sorcery": 0,
      "guixSystem": 0,
      "guixUser": 0,
      "guixHome": 0,
      "pacmanBranch": ""
    },
    "stat": 1
  },
  {
    "type": "Shell",
    "result": {
      "exe": "zsh",
      "exeName": "zsh",
      "exePath": "/bin/zsh",
      "pid": 19503,
      "ppid": 19403,
      "processName": "zsh",
      "prettyName": "zsh",
      "version": "5.9",
      "tty": 4
    },
    "stat": 3
  },
  {
    "type": "Editor",
    "result": {
      "name": "vim",
      "path": "/usr/bin/vim",
      "exe": "vim",
      "version": "9.0"
    },
    "stat": 10
  },
  {
    "type": "Display",
    "result": [
      {
        "width": 2880,
        "height": 1800,
        "id": 1,
        "name": "Color LCD",
        "primary": true,
        "refreshRate": 60.0,
        "rotation": 0,
        "scaledHeight": 900,
        "scaledWidth": 1440,
        "type": "Builtin"
      }
    ],
    "stat": 15
  },
  {
    "type": "Brightness",
    "result": [
      {
        "name": "Color LCD",
        "max": 1.0,
        "min": 0.0,
        "current": 1.0
      }
    ],
    "stat": 1
  },
  {
    "type": "Monitor",
    "result": [
      {
        "hdrCompatible": true,
        "name": "Color LCD",
        "resolution": {
          "width": 2560,
          "height": 1600
        },
        "physical": {
          "height": 179,
          "width": 287
        },
        "manufactureDate": null,
        "serial": 4251086178
      }
    ],
    "stat": 10
  },
  {
    "type": "LM",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "DE",
    "result": {
      "processName": "",
      "prettyName": "Aqua",
      "version": ""
    },
    "stat": 0
  },
  {
    "type": "WM",
    "result": {
      "processName": "WindowServer",
      "prettyName": "Quartz Compositor",
      "protocolName": "",
      "pluginName": ""
    },
    "stat": 0
  },
  {
    "type": "WMTheme",
    "result": "Multicolor (Light)",
    "stat": 0
  },
  {
    "type": "Theme",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Icons",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Font",
    "result": {
      "display": ".AppleSystemUIFont [System], Helvetica [User]",
      "fonts": [
        ".AppleSystemUIFont",
        "Helvetica",
        ".AppleSystemUIFontMonospaced",
        "Menlo"
      ]
    },
    "stat": 3
  },
  {
    "type": "Cursor",
    "result": {
      "theme": "Fill - Black, Outline - White",
      "size": "32"
    },
    "stat": 0
  },
  {
    "type": "Wallpaper",
    "result": "/Users/alberto/Pictures/Wallpapers/Aurora.jpg",
    "stat": 1
  },
  {
    "type": "Terminal",
    "result": {
      "processName": "alacritty",
      "exe": "/Applications/Alacritty.app/Contents/MacOS/alacritty",
      "exeName": "alacritty",
      "exePath": "/Applications/Alacritty.app/Contents/MacOS/alacritty",
      "pid": 15357,
      "ppid": 1,
      "prettyName": "alacritty",
      "version": "0.13.2",
      "tty": ""
    },
    "stat": 6
  },
  {
    "type": "TerminalFont",
    "result": {
      "font": {
        "name": "alacritty",
        "size": "11",
        "styles": [],
        "pretty": "alacritty (11pt)"
      },
      "fallback": {
        "name": "",
        "size": "",
        "styles": [],
        "pretty": ""
      }
    },
    "stat": 0
  },
  {
    "type": "TerminalSize",
    "result": {
      "columns": 96,
      "rows": 26,
      "width": 1344,
      "height": 780
    },
    "stat": 1
  },
  {
    "type": "TerminalTheme",
    "result": {
      "fg": {
        "r": 73,
        "g": 75,
        "b": 83,
        "dark": true
      },
      "bg": {
        "r": 255,
        "g": 255,
        "b": 255,
        "dark": false
      }
    },
    "stat": 0
  },
  {
    "type": "CPU",
    "result": {
      "cpu": "Apple M1",
      "vendor": "Apple",
      "cores": {
        "physical": 8,
        "logical": 8,
        "online": 8
      },
      "frequency": {
        "base": null,
        "max": 3.204,
        "min": 0.6,
        "biosLimit": null
      },
      "coreTypes": [
        {
          "count": 4,
          "freq": 2
        },
        {
          "count": 4,
          "freq": 1
        }
      ],
      "temperature": null
    },
    "stat": 3
  },
  {
    "type": "CPUCache",
    "result": {
      "l1": [
        {
          "size": 196608,
          "num": 4,
          "lineSize": 0,
          "type": "instruction"
        },
        {
          "size": 131072,
          "num": 4,
          "lineSize": 0,
          "type": "data"
        },
        {
          "size": 131072,
          "num": 4,
          "lineSize": 0,
          "type": "instruction"
        },
        {
          "size": 65536,
          "num": 4,
          "lineSize": 0,
          "type": "data"
        }
      ],
      "l2": [
        {
          "size": 12582912,
          "num": 1,
          "lineSize": 0,
          "type": "unified"
        },
        {
          "size": 4194304,
          "num": 1,
          "lineSize": 0,
          "type": "unified"
        }
      ]
    },
    "stat": 0
  },
  {
    "type": "CPUUsage",
    "result": [
      0.0,
      9.523809523809524,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ],
    "stat": 205
  },
  {
    "type": "GPU",
    "result": [
      {
        "coreCount": 7,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": 5726633984,
            "used": 65536
          }
        },
        "driver": "com.apple.AGXG13G",
        "name": "Apple M1",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Apple",
        "platformApi": "Metal 3",
        "frequency": null,
        "deviceId": 4294969173
      }
    ],
    "stat": 20
  },
  {
    "type": "Memory",
    "result": {
      "total": 8589934592,
      "used": 6374014976
    },
    "stat": 0
  },
  {
    "type": "PhysicalMemory",
    "result": [
      {
        "size": 8589934592,
        "maxSpeed": 0,
        "runningSpeed": 0,
        "type": "LPDDR4",
        "locator": "",
        "formFactor": "",
        "vendor": "Hynix",
        "serial": "",
        "partNumber": "",
        "ecc": false
      }
    ],
    "stat": 79
  },
  {
    "type": "Swap",
    "result": {
      "total": 2147483648,
      "used": 1309605888
    },
    "stat": 0
  },
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 83455336448,
          "free": 83455336448,
          "total": 245107195904,
          "used": 161651859456
        },
        "files": {
          "total": 815397687,
          "used": 404167
        },
        "filesystem": "apfs",
        "mountpoint": "/",
        "mountFrom": "/dev/disk3s1s1",
        "name": "Macintosh HD",
        "volumeType": [
          "Regular",
          "Read-only"
        ],
        "createTime": "2024-05-07T09:01:44.000+0200"
      },
      {
        "bytes": {
          "available": 83455336448,
          "free": 83455336448,
          "total": 245107195904,
          "used": 161651859456
        },
        "files": {
          "total": 815976268,
          "used": 982748
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/Data",
        "mountFrom": "/dev/disk3s5",
        "name": "Data",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-08-05T04:17:11.404+0200"
      },
      {
        "bytes": {
          "available": 505315328,
          "free": 505315328,
          "total": 524288000,
          "used": 18972672
        },
        "files": {
          "total": 4934761,
          "used": 41
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/Hardware",
        "mountFrom": "/dev/disk1s3",
        "name": "Hardware",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T15:53:04.086+0200"
      },
      {
        "bytes": {
          "available": 83459084288,
          "free": 83459084288,
          "total": 245107195904,
          "used": 161648111616
        },
        "files": {
          "total": 815031255,
          "used": 1135
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/Preboot",
        "mountFrom": "/dev/disk3s2",
        "name": "Preboot",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T15:53:03.207+0200"
      },
      {
        "bytes": {
          "available": 83457536000,
          "free": 83457536000,
          "total": 245107195904,
          "used": 161649659904
        },
        "files": {
          "total": 815015071,
          "used": 71
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/Update",
        "mountFrom": "/dev/disk3s4",
        "name": "Update",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T15:53:05.217+0200"
      },
      {
        "bytes": {
          "available": 83441352704,
          "free": 83441352704,
          "total": 245107195904,
          "used": 161665843200
        },
        "files": {
          "total": 814856963,
          "used": 3
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/VM",
        "mountFrom": "/dev/disk3s6",
        "name": "VM",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T16:06:45.739+0200"
      },
      {
        "bytes": {
          "available": 505315328,
          "free": 505315328,
          "total": 524288000,
          "used": 18972672
        },
        "files": {
          "total": 4934754,
          "used": 34
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/iSCPreboot",
        "mountFrom": "/dev/disk1s1",
        "name": "iSCPreboot",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T15:53:03.797+0200"
      },
      {
        "bytes": {
          "available": 505315328,
          "free": 505315328,
          "total": 524288000,
          "used": 18972672
        },
        "files": {
          "total": 4934723,
          "used": 3
        },
        "filesystem": "apfs",
        "mountpoint": "/System/Volumes/xarts",
        "mountFrom": "/dev/disk1s2",
        "name": "xarts",
        "volumeType": [
          "Hidden"
        ],
        "createTime": "2021-09-15T15:53:03.941+0200"
      }
    ],
    "stat": 0
  },
  {
    "type": "Battery",
    "result": [
      {
        "capacity": 100.0,
        "manufacturer": "Apple Inc.",
        "manufactureDate": "2020-05-00",
        "modelName": "bq20z451",
        "status": "Discharging",
        "technology": "Lithium",
        "serial": "F5D1312281CPJYVAF",
        "temperature": null,
        "cycleCount": 313
      }
    ],
    "stat": 1
  },
  {
    "type": "PowerAdapter",
    "result": [],
    "stat": 0
  },
  {
    "type": "Player",
    "error": "MRMediaRemoteGetNowPlayingInfo() failed",
    "stat": 3
  },
  {
    "type": "Media",
    "error": "MRMediaRemoteGetNowPlayingInfo() failed",
    "stat": 0
  },
  {
    "type": "PublicIp",
    "result": "redacted"
    "stat": 0
  },
  {
    "type": "LocalIp",
    "result": "redacted"
    "stat": 0
  },
  {
    "type": "DNS",
    "result": "redacted"
    "stat": 0
  },
  {
    "type": "Wifi",
    "result": [
      {
        "inf": {
          "description": "en0",
          "status": "Power On"
        },
        "conn": "redacted"
      }
    ],
    "stat": 65
  },
  {
    "type": "DateTime",
    "result": "2024-07-11T08:49:14.218+0200",
    "stat": 0
  },
  {
    "type": "Locale",
    "result": "en_US.UTF-8",
    "stat": 0
  },
  {
    "type": "Vulkan",
    "error": "dlopen libvulkan.dylib failed",
    "stat": 1
  },
  {
    "type": "OpenGL",
    "result": {
      "version": "4.1 Metal - 88.1",
      "renderer": "Apple M1",
      "vendor": "Apple",
      "slv": "4.10",
      "library": "CGL 1.2"
    },
    "stat": 7
  },
  {
    "type": "OpenCL",
    "result": {
      "version": "1.2 (Apr 13 2024 11:09:23)",
      "name": "Apple",
      "vendor": "Apple",
      "gpus": [
        {
          "type": "Integrated",
          "vendor": "Apple",
          "name": "Apple M1",
          "driver": "1.0",
          "platformApi": "OpenCL 1.2",
          "coreCount": 8,
          "frequency": 1.0,
          "memory": {
            "dedicated": {
              "total": null,
              "used": null
            },
            "shared": {
              "total": 5726633984,
              "used": null
            }
          },
          "deviceId": 16940800
        }
      ]
    },
    "stat": 0
  },
  {
    "type": "Users",
    "result": [
      {
        "name": "alberto",
        "hostName": "",
        "sessionName": "console",
        "clientIp": "",
        "loginTime": "2024-06-15T10:01:56.620+0200"
      }
    ],
    "stat": 0
  },
  {
    "type": "Bluetooth",
    "result": [
      {
        "redacted"
      }
    ],
    "stat": 20
  },
  {
    "type": "Sound",
    "result": [
      {
        "active": true,
        "main": true,
        "volume": null,
        "name": "MacBook Air Speakers",
        "identifier": "76"
      }
    ],
    "stat": 44
  },
  {
    "type": "Camera",
    "result": [
      {
        "name": "FaceTime HD Camera",
        "vendor": "Apple Inc.",
        "colorSpace": "sRGB",
        "id": "EAB7A68F-EC2B-4487-AADF-D8A91C1CB782",
        "width": 1280,
        "height": 720
      },
      {
        "name": "OBS Virtual Camera",
        "vendor": "OBS Project",
        "colorSpace": "sRGB",
        "id": "7626645E-4425-469E-9D8B-97E0FA59AC75",
        "width": 1920,
        "height": 1080
      }
    ],
    "stat": 34
  },
  {
    "type": "Gamepad",
    "result": [],
    "stat": 0
  },
  {
    "type": "Weather",
    "result": "+23°C - Sunny (Grosseto, Italy)",
    "stat": 0
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "en0",
        "defaultRoute": true,
        "txBytes": 1024,
        "rxBytes": 2048,
        "txPackets": 12,
        "rxPackets": 9,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 467
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "APPLE SSD AP0256Q Media",
        "devPath": "/dev/disk0",
        "bytesRead": 1953792,
        "bytesWritten": 278528,
        "readCount": 210,
        "writeCount": 28
      }
    ],
    "stat": 1
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "APPLE SSD AP0256Q Media",
        "devPath": "/dev/disk0",
        "interconnect": "Apple Fabric",
        "kind": "SSD",
        "size": 251000193024,
        "serial": "0ba0160c402d3c10",
        "removable": false,
        "readOnly": false,
        "revision": "373.120.",
        "temperature": 40.0
      }
    ],
    "stat": 4
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "sysName": "Darwin",
      "architecture": "aarch64",
      "version": "2.18.1",
      "versionTweak": "",
      "cmakeBuiltType": "Release",
      "compileTime": "Jul 11 2024, 02:43:24",
      "compiler": "Apple clang 15.0.0 (15000309)",
      "debugMode": false,
      "libc": "libSystem 1345.100.2"
    },
    "stat": 0
  },
  {
    "type": "Break",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "Colors",
    "error": "Unsupported for JSON format",
    "stat": 0
  }
]

Output of fastfetch --list-features:

threads
vulkan
imagemagick7
chafa
zlib
sqlite3
@alberto-lazari alberto-lazari added the bug Something isn't working label Jul 11, 2024
@CarterLi
Copy link
Member

CarterLi commented Jul 11, 2024

What does ps aux | grep yabai print?

@alberto-lazari
Copy link
Author

alberto-lazari commented Jul 11, 2024

What does ps aux | grep yabai print?

alberto          19140   0.0  0.2 411265600  16736   ??  S<    8:40AM   0:10.83 /opt/homebrew/bin/yabai
alberto          20147   0.0  0.0 410724048   1328 s002  S+    9:32AM   0:00.00 grep yabai

@CarterLi
Copy link
Member

CarterLi commented Jul 11, 2024

I'm sorry, but I meant ps -ef | grep yabai. I need its parent pid

@alberto-lazari
Copy link
Author

  501 19140     1   0  8:40AM ??         0:16.40 /opt/homebrew/bin/yabai
  501 21133 21047   0 10:19AM ttys002    0:00.00 grep yabai

@CarterLi
Copy link
Member

What does fastfetch --wm-detect-plugin print?

@alberto-lazari
Copy link
Author

Hmm, this does return Quartz Compositor (with Yabai)

Is it the only command that shows plugins in the WM module or is there a native way to only show "yabai" as WM?

@CarterLi
Copy link
Member

Yabai doc reads yabai is a window management utility that is designed to work as an extension to the built-in window manager of macOS.

WM of macOS is always Quartz Compositor. It's not changeable unlike Linux.

@alberto-lazari
Copy link
Author

Sure, ok. I was only asking this because I liked the way neofetch worked: when a WM extension was used (rectangle, yabai, amethyst, ...) it showed that, instead of Quartz. I know that this is the proper way of specifying the WM in use.

Also, I feel like --wm-detect-plugin should be the default, why is it not? Performance reasons?

@CarterLi
Copy link
Member

CarterLi commented Jul 11, 2024

I feel like --wm-detect-plugin should be the default, why is it not? Performance reasons?

#984 (comment)

@alberto-lazari
Copy link
Author

I still feel like --wm-detect-plugin should be the default expected behavior, even if it's loosely implemented. Closing the issue as resolved though, because apparently this is not a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants