diff --git a/home/.config/eww/scripts/temp b/home/.config/eww/scripts/temp new file mode 100755 index 0000000..5a7403b --- /dev/null +++ b/home/.config/eww/scripts/temp @@ -0,0 +1,6 @@ +#!/bin/bash + +# shellcheck source=include +source "./scripts/include" + +hyprland_ipc "workspace|createworkspace|destroyworkspace|activewindow" diff --git a/home/.config/eww/scripts/window_name.py b/home/.config/eww/scripts/window_name.py index 0c45445..cc3017d 100755 --- a/home/.config/eww/scripts/window_name.py +++ b/home/.config/eww/scripts/window_name.py @@ -54,7 +54,7 @@ REMAP_RULES: list[RemapRule] = [ RemapRule(r"(?:\[\d+\] )?\*?WebCord - (.+)", " {}", "WebCord"), RemapRule(r"(.+) - Discord", " {}", "discord"), RemapRule(r"(.+) - mpv", " {}", "mpv"), - RemapRule(r"Stremio - (.+)", " Stremio - {}", "com.stremio.stremio"), + RemapRule(r"Stremio - (.+)", " Stremio - {}", "Stremio"), RemapRule(r"Spotify", " Spotify", "Spotify"), RemapRule(r"pulsemixer", " Pulsemixer"), RemapRule(r"(.*)", " {}", "Pcmanfm"), diff --git a/home/.config/eww/scripts/workspaces.py b/home/.config/eww/scripts/workspaces.py index 6f3fb58..2273035 100755 --- a/home/.config/eww/scripts/workspaces.py +++ b/home/.config/eww/scripts/workspaces.py @@ -44,6 +44,7 @@ class MonitorInfo(TypedDict): class OutputWorkspaceInfo(WorkspaceInfo): format_name: str active: bool + monitor_id: int # workspace id -> remapped name @@ -94,6 +95,7 @@ def fill_blank_workspaces(open: list[OutputWorkspaceInfo]) -> list[OutputWorkspa "lastwindowtitle": "N/A", "active": False, "format_name": format_name, + "monitor_id": 0, } lst.append(blank_ws) @@ -118,7 +120,8 @@ def get_workspaces() -> list[OutputWorkspaceInfo]: continue format_name = REMAPS.get(workspace["id"], workspace["name"]) active = workspace["id"] in active_workspaces - out.append({**workspace, "format_name": format_name, "active": active}) + mon_id = [monitor["id"] for monitor in monitors if monitor["name"] == workspace["monitor"]][0] + out.append({**workspace, "format_name": format_name, "active": active, "monitor_id": mon_id}) out = fill_blank_workspaces(out) out.sort(key=workspace_sort)