aoifetch
Version:
A simple Neofetch style system info tool in Node.js, written entirely by gundalf-cli.
17 lines (15 loc) • 435 B
JavaScript
import { execSync } from 'child_process';
import { getPlatform } from './misc.js';
export function getWM() {
const platform = getPlatform();
if (platform === 'linux') {
try {
return execSync('echo $XDG_CURRENT_DESKTOP', { encoding: 'utf-8' }).trim() || 'unknown';
} catch {
return 'unknown';
}
} else if (platform === 'win32') {
return 'Desktop Window Manager';
}
return 'N/A';
}