[AGS] Save for migration to GTK4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import AstalTray from "gi://AstalTray";
|
||||
import { bind } from "astal";
|
||||
import { bind, Variable } from "astal";
|
||||
import AstalHyprland from "gi://AstalHyprland";
|
||||
|
||||
const SysTray = () => {
|
||||
@@ -42,14 +42,25 @@ const Workspace = () => {
|
||||
const ActiveWindow = () => {
|
||||
const hypr = AstalHyprland.get_default();
|
||||
const focused = bind( hypr, "focusedClient" );
|
||||
let visible = Variable( false );
|
||||
|
||||
const toggleOverlay = () => {
|
||||
visible.set( !visible.get() );
|
||||
}
|
||||
|
||||
return <box className={"HyprlandFocusedClients"} visible={focused.as(Boolean)}>
|
||||
{focused.as( client => (
|
||||
client && <label label={bind( client, "title" ).as( String )} />
|
||||
))}
|
||||
<button onClicked={toggleOverlay}>
|
||||
{focused.as( client => (
|
||||
client && <label label={bind( client, "title" ).as( String )} />
|
||||
))}
|
||||
</button>
|
||||
<eventbox visible={bind(visible).as( v => v )} name="popover-container">
|
||||
<label label="This is a test"></label>
|
||||
</eventbox>
|
||||
</box>
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
Workspace,
|
||||
ActiveWindow,
|
||||
|
||||
Reference in New Issue
Block a user