From e44cc65f1f06cf870e154bdbb8410c1766e03671 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Thu, 16 Oct 2025 22:25:48 +0200 Subject: [PATCH] [Astal] Start adding hyprland module --- config/astal/components/bar/bar.scss | 21 +++++++++++++++++++ .../astal/components/bar/modules/Hyprland.tsx | 18 ++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/config/astal/components/bar/bar.scss b/config/astal/components/bar/bar.scss index 97deb83..0582112 100644 --- a/config/astal/components/bar/bar.scss +++ b/config/astal/components/bar/bar.scss @@ -11,6 +11,27 @@ window.Bar { /* border-radius: 10px; */ /* margin: 8px; */ /* } */ + .mode-status { + &.windowing-mode { + + } + + &.workspace-mode { + + } + + &.launch-mode { + + } + + &.device-mode { + + } + + &.screenshotting-mode { + + } + } .bar-button { border-radius: 20px; diff --git a/config/astal/components/bar/modules/Hyprland.tsx b/config/astal/components/bar/modules/Hyprland.tsx index 2339ed5..3014b31 100644 --- a/config/astal/components/bar/modules/Hyprland.tsx +++ b/config/astal/components/bar/modules/Hyprland.tsx @@ -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 = () => { return @@ -144,4 +161,5 @@ export default { Workspace, ActiveWindow, SysTray, + ModeStatus };