plasma-applet-tiledmenu
plasma-applet-tiledmenu copied to clipboard
[Request] Automatically color tile background
Instead of tiles being one default color by default, they should either automatically color themselves according to the app icon or have a one-click button.
The Unity DE did something similar: https://bazaar.launchpad.net/~unity-team/unity/trunk/view/head:/launcher/LauncherIcon.cpp#L279
This would be nice actually.
I've considered writing a unity taskmanager widget using this, but hadn't thought if applying it to the tiles.
Unfortunately, I don't see a way around the need for C++ code to generate the color. Luckily, this sounds like a useful feature to be used elsewhere in plasma. So it could be added to plasma-framework under PlasmaCore.IconItem.colorForIcon
or under PlasmaExtras.____
.
I wrote a demo C++ plugin to test Unity's implementation. I might lower the saturation since I think unity draws a glassy orb on top of this bg color (making it a lighter color).
Edit: More icons + using the Breeze icon theme:
This is very cool and nice.
Note to future self, the demo was in the zrenplugin
project.
https://gist.github.com/Zren/3cc9f2d312c093e1e4d74f388606994f
A quick demo in tiled menu on the autocolor branch.
I haven't done any performance tests. It will lazy load the colors though I think so it shouldn't be too bad.
I would need to make the app list icons smaller to have "tiles" in the app list like Windows10 and Simple10Menu. I actually prefer tiled menu with 28px icons, since there's less space between the app names, so I'll need to play around with that sometime.
Layout for future testing:
{ "fullscreen": false, "icon": "start-here-kde", "fixedPanelIcon": true, "searchResultsMerged": true, "showRecentApps": true, "recentOrdering": 1, "numRecentApps": 5, "sidebarShortcuts": [ "xdg:DOCUMENTS", "xdg:PICTURES", "org.kde.dolphin.desktop", "systemsettings.desktop" ], "defaultAppListView": "Alphabetical", "tileModel": [ { "x": 0, "y": 5, "w": 2, "h": 2, "url": "net.lutris.guild-wars-2-3.desktop" }, { "x": 2, "y": 0, "w": 2, "h": 2, "url": "atom.desktop" }, { "x": 0, "y": 0, "w": 2, "h": 2, "url": "clementine.desktop" }, { "x": 4, "y": 0, "w": 2, "h": 2, "url": "audacity.desktop" }, { "x": 0, "y": 2, "w": 2, "h": 2, "url": "bvnc.desktop" }, { "x": 2, "y": 2, "w": 2, "h": 2, "url": "org.gnome.Chess.desktop" }, { "x": 0, "y": 10, "w": 2, "h": 2, "url": "libreoffice-base.desktop" }, { "x": 2, "y": 10, "w": 2, "h": 2, "url": "libreoffice-calc.desktop" }, { "x": 4, "y": 10, "w": 2, "h": 2, "url": "libreoffice-draw.desktop" }, { "x": 6, "y": 10, "w": 2, "h": 2, "url": "libreoffice-impress.desktop" }, { "x": 8, "y": 10, "w": 2, "h": 2, "url": "libreoffice-math.desktop" }, { "x": 0, "y": 12, "w": 2, "h": 2, "url": "libreoffice-writer.desktop" }, { "x": 0, "y": 7, "w": 2, "h": 2, "url": "net.lutris.Lutris.desktop" }, { "x": 2, "y": 5, "w": 2, "h": 2, "url": "The Witcher 3 Wild Hunt.desktop" }, { "x": 4, "y": 2, "w": 2, "h": 2, "url": "net.lutris.uplay-2.desktop" }, { "x": 4, "y": 5, "w": 2, "h": 2, "url": "Warhammer 40,000 Dawn of War - Game of the Year Edition.desktop" }, { "x": 6, "y": 0, "w": 2, "h": 2, "url": "sublime_text.desktop" }, { "x": 6, "y": 2, "w": 2, "h": 2, "url": "quassel.desktop" }, { "x": 8, "y": 0, "w": 2, "h": 2, "url": "firefox.desktop" }, { "x": 6, "y": 5, "w": 2, "h": 2, "url": "net.lutris.overwatch-1.desktop" }, { "x": 8, "y": 5, "w": 2, "h": 2, "url": "Rocket League.desktop" }, { "x": 2, "y": 7, "w": 2, "h": 2, "url": "steam.desktop" } ], "tileMargin": 5, "tilesLocked": false, "defaultTileColor": "", "sidebarBackgroundColor": "", "searchFieldFollowsTheme": false, "sidebarFollowsTheme": false, "tileLabelAlignment": "left", "appDescription": "after", "menuItemHeight": 36, "searchFieldHeight": 50, "appListWidth": 350, "favGridCols": 13, "popupHeight": 1027, "sidebarButtonSize": 60, "sidebarIconSize": 30 }