mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 09:58:03 +02:00
LM (macOS): adds support
This commit is contained in:
+1
-1
@@ -1050,7 +1050,7 @@ elseif(APPLE)
|
||||
src/detection/icons/icons_nosupport.c
|
||||
src/detection/initsystem/initsystem_linux.c
|
||||
src/detection/keyboard/keyboard_apple.c
|
||||
src/detection/lm/lm_nosupport.c
|
||||
src/detection/lm/lm_apple.m
|
||||
src/detection/loadavg/loadavg_bsd.c
|
||||
src/detection/libc/libc_apple.c
|
||||
src/detection/locale/locale_linux.c
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "lm.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
const char* ffDetectLM(FFLMResult* result) {
|
||||
ffStrbufSetStatic(&result->service, "loginwindow");
|
||||
ffStrbufSetStatic(&result->prettyName, "Login Window");
|
||||
|
||||
NSError* error;
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:@"/System/Library/CoreServices/loginwindow.app/Contents/Info.plist" isDirectory:NO]
|
||||
error:&error];
|
||||
|
||||
if (dict) {
|
||||
ffStrbufSetS(&result->version, ((NSString*) dict[@"CFBundleShortVersionString"]).UTF8String);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user