[Astal] Start adding hyprland module
This commit is contained in:
		| @@ -11,6 +11,27 @@ window.Bar { | |||||||
|   /*     border-radius: 10px; */ |   /*     border-radius: 10px; */ | ||||||
|   /*     margin: 8px; */ |   /*     margin: 8px; */ | ||||||
|   /* } */ |   /* } */ | ||||||
|  |   .mode-status { | ||||||
|  |     &.windowing-mode { | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     &.workspace-mode { | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     &.launch-mode { | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     &.device-mode { | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     &.screenshotting-mode { | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|   .bar-button { |   .bar-button { | ||||||
|     border-radius: 20px; |     border-radius: 20px; | ||||||
|   | |||||||
| @@ -118,6 +118,23 @@ const ActiveWindow = () => { | |||||||
|     ); |     ); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | const ModeStatus = () => { | ||||||
|  |     const label = new Gtk.Label(); | ||||||
|  |     const map = { | ||||||
|  |         "device": "D", | ||||||
|  |         "launch": "L", | ||||||
|  |         "workspace": "W", | ||||||
|  |         "windowing": "M", | ||||||
|  |         "screenshotting": "S", | ||||||
|  |     } | ||||||
|  |     // TODO: Possibly add popover to it that lists binds | ||||||
|  |     hypr.connect("submap", (name: string) => { | ||||||
|  |         label.label = map[name]; | ||||||
|  |         label.cssClasses = ["mode-status", name + '-mode'] | ||||||
|  |     }) | ||||||
|  |     return  | ||||||
|  | } | ||||||
|  |  | ||||||
| const WindowPopoverBox = () => { | const WindowPopoverBox = () => { | ||||||
|     return <box vertical> |     return <box vertical> | ||||||
|         <label label={"Available Windows"} cssClasses={['title-2']}></label> |         <label label={"Available Windows"} cssClasses={['title-2']}></label> | ||||||
| @@ -144,4 +161,5 @@ export default { | |||||||
|     Workspace, |     Workspace, | ||||||
|     ActiveWindow, |     ActiveWindow, | ||||||
|     SysTray, |     SysTray, | ||||||
|  |     ModeStatus | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user