Skip to content

Commit

Permalink
feat(bar): handle monocle containers in komorebi widget
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Sep 9, 2024
1 parent d6ccf4c commit 34d2431
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion komorebi-bar/src/komorebi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,18 @@ impl KomorebiNotificationState {
komorebi_client::Layout::Custom(_) => String::from("Custom"),
};

if let Some(container) = monitor.workspaces()[focused_workspace_idx].focused_container()
if let Some(container) = monitor.workspaces()[focused_workspace_idx].monocle_container()
{
if let Some(window) = container.focused_window() {
if let Ok(title) = window.title() {
self.focused_window_title.clone_from(&title);
self.focused_window_pid = Some(window.process_id());
let img = windows_icons::get_icon_by_process_id(window.process_id());
self.focused_window_icon = Some(img);
}
}
} else if let Some(container) =
monitor.workspaces()[focused_workspace_idx].focused_container()
{
if let Some(window) = container.focused_window() {
if let Ok(title) = window.title() {
Expand Down

0 comments on commit 34d2431

Please sign in to comment.