Skip to content
Discussion options

You must be logged in to vote

This is solvable, but it's worth knowing upfront - eww's image widget only takes a file path (:path), not a GTK icon-theme name. There's no :icon-name property in eww (image widget only supports path/image-width/image-height). So the actual icon resolution work has to happen in your script, not in eww itself.

Here is the full chain you need:

1. Get the app_id, not the title - that's the field icons key off of:

niri msg --json focused-window | jq -r '.app_id'

2. Map app_id -> an actual icon file path. This is the part eww can't do for you. The robust way: find the .desktop file matching that app_id (either by filename or its StartupWMClass= field), read its Icon= line, then resolve that ic…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Geobert
Comment options

Answer selected by Geobert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants