[re previous] darcs patch: Proposal for themeable tabs (read desc before applying)

the real one with the template.
andrea
Wed Jun 13 16:51:42 CEST 2007 Andrea Rossato

On Wed, Jun 13, 2007 at 05:18:05PM +0200, Andrea Rossato wrote:
hunk ./Tabbed.hs 31 +import {-# SOURCE #-} Config (TabTheme(..), tabTheme)
I think we're much better off avoiding recursive imports... I wish xmonad itself would do this. Recursive imports restrict the user choice and add code complexity at the same time. A much better approach would be have no recursive imports, but instead export the type TabTheme (and a defaultTheme) and the function tabbed :: TabTheme -> Layour and then the user can have tabbed layouts with multible different themes in their defaultLayouts, they can create keybindings to modify the theme at runtime. Probably most users will never do any of these things (and maybe they shouldn't), but with the Combo layout (and I have some ideas how to fix it to work with tabbed once more) it might be reasonable to set different colors for different sub-tabbed layouts. Or a user might want instant visual recognition of which workspace they're in by changing the tab colors. Or they might want to dynamically reduce the tab size when they can't quite see enough of the pdf file they're reading. Anyhow, it simplifies the code and makes it more powerful. A win-win situation.
hunk ./Tabbed.hs 35 --- You can use this module with the following in your configuration file: +-- You can use this module with the following in your Config.hs file: hunk ./Tabbed.hs 42 +-- +-- > data TabTheme a = Integral a => +-- > TabTheme { bgColor :: Pixel +-- > , fgColor :: Pixel +-- > , focusColor :: Pixel +-- > , unfocusColor :: Pixel +-- > , textColor :: Pixel +-- > , tabSize :: a +-- > }
I'd just make the tabSize an Int. It simplifies things, at the cost perhaps of a couple of fromIntegrals in the code. It'd be nice to also have some font-configuration possibilities, but the last time I tried to mess with fonts I crashed xmonad. It should no longer crash, with the catchX patches in. The possibility of larger font is definitely a big user-interface win for folks with not-so-good eyesight. Another possibility would be something like data TabTheme = TabTheme { unfocussedConfigureGC :: Display -> Window -> GC -> X () , focussedConfigureGC :: Display -> Window -> GC -> X () , tabSize :: Int } This isn't quite so friendly to users, but is more powerful. With appropriate helper functions, non-haskell folks shouldn't have *too* much trouble doing this configurization. You'd *definitely* want to run these functions within a catchX, though. Another feature to add (which relates) is that we might want a third color, which is visibleButNotFocussedColor, which would be when the decorated window is the focussed window in the workspace, but doesn't actually have the keyboard focus (which is on another workspace, or a float window). -- David Roundy Department of Physics Oregon State University

On Wed, Jun 13, 2007 at 09:26:57AM -0700, David Roundy wrote:
I think we're much better off avoiding recursive imports...
[...] I'll take your suggestions as a starting point. If you don't mind I'd like to write something myself to be submit here. Hope I'm slowly starting to grasp some of those beast's interiors... andrea

On Wed, Jun 13, 2007 at 06:47:54PM +0200, Andrea Rossato wrote:
On Wed, Jun 13, 2007 at 09:26:57AM -0700, David Roundy wrote:
I think we're much better off avoiding recursive imports...
[...]
I'll take your suggestions as a starting point. If you don't mind I'd like to write something myself to be submit here. Hope I'm slowly starting to grasp some of those beast's interiors...
I'll be delighted for you to take charge of this, and will enjoy giving you feedback and ideas! -- David Roundy Department of Physics Oregon State University

droundy:
On Wed, Jun 13, 2007 at 06:47:54PM +0200, Andrea Rossato wrote:
On Wed, Jun 13, 2007 at 09:26:57AM -0700, David Roundy wrote:
I think we're much better off avoiding recursive imports...
[...]
I'll take your suggestions as a starting point. If you don't mind I'd like to write something myself to be submit here. Hope I'm slowly starting to grasp some of those beast's interiors...
I'll be delighted for you to take charge of this, and will enjoy giving you feedback and ideas!
Ok, so I take this as a 'needs more work' consensus. -- Don
participants (3)
-
Andrea Rossato
-
David Roundy
-
dons@cse.unsw.edu.au