15 lines
415 B
TypeScript
15 lines
415 B
TypeScript
import Hyprland from "gi://AstalHyprland"
|
|
import { bind } from "astal"
|
|
|
|
export default function FocusedClient() {
|
|
const hypr = Hyprland.get_default()
|
|
const focused = bind(hypr, "focusedClient")
|
|
|
|
return <box
|
|
className="Focused"
|
|
visible={focused.as(Boolean)}>
|
|
{focused.as(client => (
|
|
client && <label label={bind(client, "title").as(String)} />
|
|
))}
|
|
</box>
|
|
} |