mlvwm
mlvwm copied to clipboard
Add support for `_NET_WM_ICON` X11 window property for automatic application icons
mlvwm currently requires that X11 application 16x16px XPM icons are specified in a Style...END block for every application. This requires a lot of extra configuration & downloading/maintaining icons (see the [mlvwmrc](https://github.com/morgant/mlvwmrc] project).
At this point, many (most?) X11 applications will provide a _NET_WM_ICON window property that provides the window's application icon at one or more size (often 16x16, 32x32, 48x48, 64x64, and 128x128). For example, the xprop output for a Firefox window (I removed all but the 16x16 size, for length):
_NET_WM_ICON(CARDINAL) = Icon (128 x 128):
(not shown)
...
Icon (16 x 16):
[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;143;135;43m██[38;2;223;210;67m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;112;102;31m██[38;2;255;239;76m██[38;2;255;240;76m██[38;2;143;132;40m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;0;0;0m██[38;2;48;31;4m██[38;2;32;21;3m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;239;210;60m██[38;2;255;234;72m██[38;2;255;237;74m██[38;2;255;233;72m██[38;2;96;86;25m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;48;25;4m██[38;2;239;143;18m██[38;2;96;62;8m██[38;2;143;88;33m██[38;2;128;90;29m██[38;2;0;0;0m██[38;2;64;51;13m██[38;2;255;211;56m██[38;2;255;223;64m██[38;2;255;230;69m██[38;2;255;230;69m██[38;2;255;226;67m██[38;2;143;126;41m██[38;2;48;43;14m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;223;108;26m██[38;2;255;138;22m██[38;2;239;138;24m██[38;2;255;154;43m██[38;2;137;83;39m██[38;2;98;30;124m██[38;2;172;77;167m██[38;2;208;116;164m██[38;2;224;160;124m██[38;2;255;219;62m██[38;2;255;222;64m██[38;2;255;223;66m██[38;2;255;221;70m██[38;2;223;197;65m██[38;2;16;14;4m██
[38;2;96;39;15m██[38;2;255;114;36m██[38;2;255;128;28m██[38;2;255;141;21m██[38;2;255;157;19m██[38;2;250;164;40m██[38;2;196;90;181m██[38;2;184;62;233m██[38;2;187;60;232m██[38;2;189;78;206m██[38;2;226;161;113m██[38;2;255;211;58m██[38;2;255;215;65m██[38;2;255;217;70m██[38;2;255;219;72m██[38;2;96;84;25m██
[38;2;175;63;32m██[38;2;255;104;42m██[38;2;255;141;28m██[38;2;255;165;29m██[38;2;255;173;32m██[38;2;255;173;29m██[38;2;255;181;35m██[38;2;235;163;93m██[38;2;185;84;215m██[38;2;180;75;224m██[38;2;239;191;94m██[38;2;255;216;61m██[38;2;255;202;63m██[38;2;255;205;70m██[38;2;255;216;72m██[38;2;175;150;47m██
[38;2;205;62;47m██[38;2;255;93;48m██[38;2;255;125;35m██[38;2;255;171;28m██[38;2;255;182;35m██[38;2;255;192;43m██[38;2;225;175;99m██[38;2;188;134;179m██[38;2;156;81;248m██[38;2;160;72;239m██[38;2;170;76;200m██[38;2;255;208;54m██[38;2;255;196;59m██[38;2;255;188;71m██[38;2;255;208;70m██[38;2;190;159;54m██
[38;2;249;57;74m██[38;2;255;82;55m██[38;2;255;93;48m██[38;2;255;103;42m██[38;2;246;168;41m██[38;2;133;84;189m██[38;2;118;88;231m██[38;2;125;94;242m██[38;2;136;87;246m██[38;2;144;74;237m██[38;2;145;55;215m██[38;2;255;194;44m██[38;2;255;185;53m██[38;2;255;166;74m██[38;2;255;206;60m██[38;2;190;146;56m██
[38;2;188;40;55m██[38;2;255;71;61m██[38;2;255;81;55m██[38;2;255;90;50m██[38;2;226;137;58m██[38;2;97;62;188m██[38;2;97;82;207m██[38;2;102;90;219m██[38;2;114;85;224m██[38;2;127;68;220m██[38;2;141;55;193m██[38;2;255;171;41m██[38;2;255;159;58m██[38;2;254;165;66m██[38;2;254;188;61m██[38;2;190;131;59m██
[38;2;147;14;62m██[38;2;255;60;68m██[38;2;255;69;63m██[38;2;255;77;58m██[38;2;255;109;44m██[38;2;151;98;119m██[38;2;88;65;182m██[38;2;90;74;192m██[38;2;99;69;196m██[38;2;112;54;194m██[38;2;205;99;98m██[38;2;255;136;51m██[38;2;254;140;60m██[38;2;255;168;53m██[38;2;253;163;67m██[38;2;157;97;51m██
[38;2;57;2;28m██[38;2;242;35;89m██[38;2;255;57;69m██[38;2;255;65;65m██[38;2;255;72;61m██[38;2;255;99;49m██[38;2;193;87;94m██[38;2;141;69;135m██[38;2;143;67;137m██[38;2;217;81;82m██[38;2;255;99;51m██[38;2;255;117;51m██[38;2;255;134;52m██[38;2;255;146;55m██[38;2;250;126;81m██[38;2;63;34;21m██
[38;2;0;0;0m██[38;2;172;11;81m██[38;2;247;44;83m██[38;2;254;54;73m██[38;2;255;59;68m██[38;2;255;65;65m██[38;2;255;71;61m██[38;2;255;75;59m██[38;2;255;79;56m██[38;2;255;82;55m██[38;2;255;85;53m██[38;2;255;93;54m██[38;2;255;107;57m██[38;2;247;97;77m██[38;2;170;67;62m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;14;0;7m██[38;2;184;10;87m██[38;2;238;34;89m██[38;2;252;50;78m██[38;2;254;54;73m██[38;2;255;57;69m██[38;2;255;61;67m██[38;2;255;65;65m██[38;2;255;67;63m██[38;2;255;69;62m██[38;2;253;68;64m██[38;2;243;54;82m██[38;2;197;45;78m██[38;2;15;4;6m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;0;0;0m██[38;2;14;0;7m██[38;2;170;8;81m██[38;2;226;19;99m██[38;2;237;34;88m██[38;2;243;42;82m██[38;2;250;49;77m██[38;2;251;51;75m██[38;2;246;46;76m██[38;2;240;38;83m██[38;2;233;23;98m██[38;2;176;13;80m██[38;2;15;1;6m██[38;2;0;0;0m██[38;2;0;0;0m██
[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;86;4;42m██[38;2;170;8;81m██[38;2;226;13;106m██[38;2;225;14;104m██[38;2;225;14;105m██[38;2;227;13;109m██[38;2;157;7;76m██[38;2;86;3;43m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██[38;2;0;0;0m██
[0m
Naturally, that doesn't copy nicely, so here's a screenshot: