Improve launcher
This commit is contained in:
		| @@ -0,0 +1,31 @@ | ||||
| import { App, Astal, Gtk, Gdk } from "astal/gtk3" | ||||
| import { Variable } from "astal" | ||||
|  | ||||
| const time = Variable("").poll(1000, "date") | ||||
|  | ||||
| export default function AppLauncher(gdkmonitor: Gdk.Monitor) { | ||||
|     const { TOP, LEFT, RIGHT } = Astal.WindowAnchor | ||||
|  | ||||
|     return <window | ||||
|         className="Bar" | ||||
|         gdkmonitor={gdkmonitor} | ||||
|         exclusivity={Astal.Exclusivity.EXCLUSIVE} | ||||
|         anchor={TOP | LEFT | RIGHT} | ||||
|         application={App}> | ||||
|         <centerbox> | ||||
|             <button | ||||
|                 onClicked="echo hello" | ||||
|                 halign={Gtk.Align.CENTER} | ||||
|             > | ||||
|                 Welcome to AGS! | ||||
|             </button> | ||||
|             <box /> | ||||
|             <button | ||||
|                 onClicked={() => print("hello")} | ||||
|                 halign={Gtk.Align.CENTER} | ||||
|             > | ||||
|                 <label label={time()} /> | ||||
|             </button> | ||||
|         </centerbox> | ||||
|     </window> | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user