From: Alex K. <ale...@gm...> - 2016-06-09 13:06:50
|
Hi Niels, This works for me (I'm using it to indicate current keyboard layout): function set_tab_color(color) de.defstyle("tab", { de.substyle("active-selected", { background_colour=color, }) }) gr:refresh() end WBR, Alex Khmara Niels Doei wrote: > Hi, > > I've been playing around a bit and trying to set up my notion > configuration such that my most used applications (browser, > filemanager, etc...) each have differently coloured tab/titlebar. This > would help me to keep track of what I'm doing. > > I supposed that I should add a custom substyle to my look_*.lua, then > identify each new client window when it is created, and use > WFrame.set_grattr to set the appropriate substyle based on that > identification. > > However, I'm not sure if I'm on the right track. I can't directly set > the graphical attribute on the client window, but if I do something > like this: > > ioncore.get_hook("clientwin_mapped_hook"):add( > function(cwin) > local f = WFrame.parent(cwin) > f:set_grattr("differentcolour", "set") > end > ) > > ... then all the tabs of the frame get that colour scheme! > > How would you target a single title bar? Have I overlooked something, > or is this non-trivial? > > Thanks! > > - Niels > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > > > _______________________________________________ > Notion-general mailing list > Not...@li... > https://lists.sourceforge.net/lists/listinfo/notion-general |