Symbolic icons in special workspaces
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { bind, Variable } from "astal";
|
import { bind, Variable } from "astal";
|
||||||
import { Gtk, Widget } from "astal/gtk3"
|
import { Gtk, Widget } from "astal/gtk3"
|
||||||
import AstalHyprland from "gi://AstalHyprland";
|
import AstalHyprland from "gi://AstalHyprland";
|
||||||
import { getAppIcon } from "../../scripts/apps";
|
import { getSymbolicIcon } from "../../scripts/apps";
|
||||||
|
|
||||||
export const SpecialWorkspaces: (() => Gtk.Widget) = () => new Widget.EventBox({
|
export const SpecialWorkspaces: (() => Gtk.Widget) = () => new Widget.EventBox({
|
||||||
className: "special-ws-eventbox",
|
className: "special-ws-eventbox",
|
||||||
@@ -28,9 +28,7 @@ export const SpecialWorkspaces: (() => Gtk.Widget) = () => new Widget.EventBox({
|
|||||||
], (lastClient, focusedWorkspace) => focusedWorkspace?.id === workspace.id ?
|
], (lastClient, focusedWorkspace) => focusedWorkspace?.id === workspace.id ?
|
||||||
false : Boolean(lastClient))(),
|
false : Boolean(lastClient))(),
|
||||||
icon: bind(workspace, "lastClient").as((lastClient) =>
|
icon: bind(workspace, "lastClient").as((lastClient) =>
|
||||||
lastClient ?
|
getSymbolicIcon(lastClient) ?? "image-missing")
|
||||||
getAppIcon(lastClient.initialClass) || "image-missing"
|
|
||||||
: "image-missing")
|
|
||||||
} as Widget.IconProps)
|
} as Widget.IconProps)
|
||||||
} as Widget.BoxProps),
|
} as Widget.BoxProps),
|
||||||
onClickRelease: () => AstalHyprland.get_default().dispatch(
|
onClickRelease: () => AstalHyprland.get_default().dispatch(
|
||||||
|
|||||||
Reference in New Issue
Block a user