LAPTOP-DETECT(1)

๐Ÿ‘‘ LAPTOP-DETECT ๐Ÿ‘‘

okay bestie, so this is laptop-detect(1) from the User Commands section of the manual, and it's literally exactly what it sounds like ๐Ÿ’…


โœจ NAME โœจ

laptop-detect โ€” attempt to detect a laptop ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

laptop-detect [-h|--help|-v|--verbose|-V|--version|-D|--debug]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So laptop-detect is out here trying to figure out whether it's being run on a laptop or a desktop, and then it tells whoever called it what it found. That's it. That's the whole vibe. it's giving detective but make it chassis ๐Ÿ”โœจ


๐Ÿ’– OPTIONS ๐Ÿ’–

  • -h, --help โ€” spits out the help info and then dips. so helpful, so polite ๐ŸŽ€
  • -v, --verbose โ€” be verbose, bestie! the messages go to STDOUT ๐Ÿ—ฃ๏ธโœจ
  • -V, --version โ€” outputs the version info and then exits, iconic behavior ๐Ÿ‘‘
  • -D, --debug โ€” debug mode. we're getting into the weeds fr fr ๐Ÿ”ฅ

๐Ÿ’€ EXIT STATUS ๐Ÿ’€

  • 0 โ€” most likely running on a laptop ๐Ÿ’ปโœจ
  • 1 โ€” most likely NOT running on a laptop ๐Ÿ™ˆ
  • 2 โ€” usage error (you supplied arguments, and it did not care for that) ๐Ÿ˜ญ
lowkey important: that 2 only shows up when arguments get supplied, so mind your flags bestie ๐Ÿซถ

๐Ÿ“ FILES ๐Ÿ“

these are the little places it goes snooping, no cap:

  • /proc/acpi/battery
  • /proc/pmu/info
  • /dev/mem
  • /sys/devices/virtual/dmi/id/chassis_type
  • /sys/class/power_supply/*/type
  • /proc/apm

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

dmidecode(8) โ€” go read that one too, it's the main character of hardware snooping ๐Ÿงš


mwah ๐Ÿ’– this little page is from laptop-detect 0.14, dated March 2017 โ€” and the manpage itself is LAPTOP-DETECT(1). bye bestie, go touch grass (or don't, the laptop needs you) ๐ŸŒธ๐Ÿฆ‹