Add tablet lock toggle to quick settings
This commit is contained in:
@@ -57,6 +57,11 @@ const [stayAwake, setStayAwake] = pollBool(
|
||||
2000,
|
||||
)
|
||||
|
||||
const [tabletFollow, setTabletFollow] = pollBool(
|
||||
"omarchy-toggle-tablet-follow status 2>/dev/null | grep -q '\"enabled\":true' && echo on || echo off",
|
||||
2000,
|
||||
)
|
||||
|
||||
const [recording] = pollBool(
|
||||
"pgrep -f '^gpu-screen-recorder' >/dev/null && echo on || echo off",
|
||||
2000,
|
||||
@@ -219,6 +224,20 @@ function Toggles() {
|
||||
}}
|
||||
/>
|
||||
</box>
|
||||
<box class="qs-tiles" spacing={8} homogeneous>
|
||||
<Tile
|
||||
icon={""}
|
||||
label="Tablet Lock"
|
||||
active={tabletFollow}
|
||||
tooltip={tabletFollow.as((on: boolean) =>
|
||||
on ? "Tablet follows focused monitor" : "Tablet spans all monitors",
|
||||
)}
|
||||
onClicked={() => {
|
||||
setTabletFollow(!tabletFollow.get())
|
||||
sh("omarchy-toggle-tablet-follow toggle")
|
||||
}}
|
||||
/>
|
||||
</box>
|
||||
</box>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user