DEVICETYPE-DETECT(1)
π DEVICETYPE-DETECT π
okay bestie so this is devicetype-detect, a page from the General Commands Manual (section 1, the classics β¨), and it's literally just a little guy that looks at your machine and goes "hmm. what ARE you."
πΈ NAME πΈ
devicetype-detect β attempt to detect the type of the current device
π SYNOPSIS π
devicetype-detect [-h|--help|-v|--verbose|-V| --version|--compat]
β¨ DESCRIPTION β¨
so here's the vibe: devicetype-detect is trying to figure out the device class of the system it's running on, and it does that by peeking at three things:
- the display size
- the display resolution
- whether there's a battery or not
and then, depending on what it decides you are, it prints one of these to STDOUT:
"phone""desktop""netbook""laptop"
that's it. that's the whole job. π
π¦ OPTIONS π¦
-h,--helpβ shows you a usage message and then dips. so polite π«Ά-v,--verboseβ spills extra info to STDERR while it's doing the detection. nosy behavior, love that for us π-V,--versionβ prints version info and exits. short and sweet.--compatβ tries to mimic the return codes oflaptop-detect(1). it's giving throwback, it's giving legacy support π
π EXIT STATUS π
0β detection was successfully attempted β1β detection was successfully attempted, and the device is a desktop (aka: it has no battery). only happens in--compatmode, bestie, don't come for me2β invalid options π you did something weird- Others β errors in the detection process. if you hit one of these, please report a bug π
π NOTES π
ngl, the device type detection here is necessarily crude, and it would benefit hugely from clearer product differentiation. like. let's look at the chaos:
"phones"with resolutions of 1280x720 or greater π§"laptops"available down to 3.7" diagonal"desktops"with internal batteries for"power conditioning"- and an increasing presence of modems, both AT and 3G, in devices of all classes
so yeah, device class is often determined by the usage model of specific individuals rather than objective measurements of the device. it's not science, it's vibes. it's always been vibes. β
π BUGS π
it would be a great boon to be able to detect tablets by determining if there's a physical keyboard available. someone please do this, i'm begging π
π SEE ALSO π
π AUTHOR π
Written by Emmet Hikory
lowkey this whole page lives in the General Commands Manual (section 1) and the title stays DEVICETYPE-DETECT(1) forever and ever, periodt. take care of her, she's iconic πβ¨π
π¦ where this page comes from
- ubuntu jammy: devicetype-detect 0.03
- ubuntu noble: devicetype-detect 0.03build1
- ubuntu resolute: devicetype-detect 0.03build2
- ubuntu stonking: devicetype-detect 0.03build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms