mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Update eww config
This commit is contained in:
parent
efe9388a41
commit
52213e5eed
6
home/.config/eww/scripts/temp
Executable file
6
home/.config/eww/scripts/temp
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck source=include
|
||||||
|
source "./scripts/include"
|
||||||
|
|
||||||
|
hyprland_ipc "workspace|createworkspace|destroyworkspace|activewindow"
|
|
@ -54,7 +54,7 @@ REMAP_RULES: list[RemapRule] = [
|
||||||
RemapRule(r"(?:\[\d+\] )?\*?WebCord - (.+)", " {}", "WebCord"),
|
RemapRule(r"(?:\[\d+\] )?\*?WebCord - (.+)", " {}", "WebCord"),
|
||||||
RemapRule(r"(.+) - Discord", " {}", "discord"),
|
RemapRule(r"(.+) - Discord", " {}", "discord"),
|
||||||
RemapRule(r"(.+) - mpv", " {}", "mpv"),
|
RemapRule(r"(.+) - mpv", " {}", "mpv"),
|
||||||
RemapRule(r"Stremio - (.+)", " Stremio - {}", "com.stremio.stremio"),
|
RemapRule(r"Stremio - (.+)", " Stremio - {}", "Stremio"),
|
||||||
RemapRule(r"Spotify", " Spotify", "Spotify"),
|
RemapRule(r"Spotify", " Spotify", "Spotify"),
|
||||||
RemapRule(r"pulsemixer", " Pulsemixer"),
|
RemapRule(r"pulsemixer", " Pulsemixer"),
|
||||||
RemapRule(r"(.*)", " {}", "Pcmanfm"),
|
RemapRule(r"(.*)", " {}", "Pcmanfm"),
|
||||||
|
|
|
@ -44,6 +44,7 @@ class MonitorInfo(TypedDict):
|
||||||
class OutputWorkspaceInfo(WorkspaceInfo):
|
class OutputWorkspaceInfo(WorkspaceInfo):
|
||||||
format_name: str
|
format_name: str
|
||||||
active: bool
|
active: bool
|
||||||
|
monitor_id: int
|
||||||
|
|
||||||
|
|
||||||
# workspace id -> remapped name
|
# workspace id -> remapped name
|
||||||
|
@ -94,6 +95,7 @@ def fill_blank_workspaces(open: list[OutputWorkspaceInfo]) -> list[OutputWorkspa
|
||||||
"lastwindowtitle": "N/A",
|
"lastwindowtitle": "N/A",
|
||||||
"active": False,
|
"active": False,
|
||||||
"format_name": format_name,
|
"format_name": format_name,
|
||||||
|
"monitor_id": 0,
|
||||||
}
|
}
|
||||||
lst.append(blank_ws)
|
lst.append(blank_ws)
|
||||||
|
|
||||||
|
@ -118,7 +120,8 @@ def get_workspaces() -> list[OutputWorkspaceInfo]:
|
||||||
continue
|
continue
|
||||||
format_name = REMAPS.get(workspace["id"], workspace["name"])
|
format_name = REMAPS.get(workspace["id"], workspace["name"])
|
||||||
active = workspace["id"] in active_workspaces
|
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 = fill_blank_workspaces(out)
|
||||||
out.sort(key=workspace_sort)
|
out.sort(key=workspace_sort)
|
||||||
|
|
Loading…
Reference in a new issue