perf: Home-manager to module
feat: Optionise config
This commit is contained in:
12
modules/user/packages/drvs/ags/widget/elements/Keyboard.tsx
Normal file
12
modules/user/packages/drvs/ags/widget/elements/Keyboard.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { Variable, bind } from "astal"
|
||||
import Hyprland from "gi://AstalHyprland"
|
||||
|
||||
export default function Layout() {
|
||||
const hl = Hyprland.get_default();
|
||||
let layout = Variable("en");
|
||||
hl.connect("keyboard-layout", (_, __, l) => { layout.set(`${l}`.slice(0, 2).toLowerCase()) })
|
||||
|
||||
return <box className={bind(layout).as((l) => `Layout ${l}`)}>
|
||||
<label label={bind(layout)}/>
|
||||
</box>
|
||||
}
|
Reference in New Issue
Block a user