betterdisplaycli 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/Device.ts +10 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "betterdisplaycli",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "TypeScript bindings for `betterdisplaycli`.",
5
5
  "author": "Lucas Garron <code@garron.net>",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "printable-shell-command": "^5.0.6"
18
+ "printable-shell-command": "^5.0.7"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@biomejs/biome": "2.3.9",
package/src/Device.ts CHANGED
@@ -48,17 +48,15 @@ class SingleDisplay extends Device {
48
48
  options?: QuietOption,
49
49
  ): Promise<boolean> => {
50
50
  switch (
51
- (
52
- await print(
53
- new PrintableShellCommand("betterdisplaycli", [
54
- "get",
55
- `--name=${this.info.name}`,
56
- `--${settingName}`,
57
- ]),
58
- { argumentLineWrapping: "inline" },
59
- options,
60
- ).text()
61
- ).trim()
51
+ await print(
52
+ new PrintableShellCommand("betterdisplaycli", [
53
+ "get",
54
+ `--name=${this.info.name}`,
55
+ `--${settingName}`,
56
+ ]),
57
+ { argumentLineWrapping: "inline" },
58
+ options,
59
+ ).text({ trimTrailingNewlines: "single-required" })
62
60
  ) {
63
61
  case "on": {
64
62
  return true;
@@ -115,7 +113,7 @@ class SingleDisplay extends Device {
115
113
  ]),
116
114
  { argumentLineWrapping: "inline" },
117
115
  options,
118
- ).text();
116
+ ).text({ trimTrailingNewlines: "single-required" });
119
117
  },
120
118
 
121
119
  set: async (