Add tablet lock toggle to quick settings
This commit is contained in:
@@ -57,6 +57,11 @@ const [stayAwake, setStayAwake] = pollBool(
|
|||||||
2000,
|
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(
|
const [recording] = pollBool(
|
||||||
"pgrep -f '^gpu-screen-recorder' >/dev/null && echo on || echo off",
|
"pgrep -f '^gpu-screen-recorder' >/dev/null && echo on || echo off",
|
||||||
2000,
|
2000,
|
||||||
@@ -219,6 +224,20 @@ function Toggles() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</box>
|
</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>
|
</box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
-- Extra autostart processes.
|
-- Extra autostart processes.
|
||||||
o.launch_on_start("ags run")
|
o.launch_on_start("ags run")
|
||||||
|
|
||||||
|
o.launch_on_start("omarchy-toggle-tablet-follow autostart")
|
||||||
|
|||||||
Reference in New Issue
Block a user