Extract omarchy-hw-match
This commit is contained in:
@@ -3,4 +3,4 @@
|
|||||||
# Detect whether the computer is a Framework Laptop 16.
|
# Detect whether the computer is a Framework Laptop 16.
|
||||||
|
|
||||||
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] &&
|
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] &&
|
||||||
grep -q "Laptop 16" /sys/class/dmi/id/product_name 2>/dev/null
|
omarchy-hw-match "Laptop 16"
|
||||||
|
|||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Match against the computer's DMI product name (case-insensitive).
|
||||||
|
# Usage: omarchy-hw-match "XPS"
|
||||||
|
|
||||||
|
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
# Detect whether the computer is a Microsoft Surface device.
|
# Detect whether the computer is a Microsoft Surface device.
|
||||||
|
|
||||||
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] &&
|
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] &&
|
||||||
grep -q "Surface" /sys/class/dmi/id/product_name 2>/dev/null
|
omarchy-hw-match "Surface"
|
||||||
|
|||||||
Reference in New Issue
Block a user