Skip navigation.

rantshoutwhisper

Posts tagged with "deco"

Fluxbox: The Deco Bitmask Mystery Solved!

, , ,

It took me ages to get this, and another discussion with mark-t on the IRC chat. Again, because I can't put this on the Fluxbox wiki [although there are signs this might be a menu option!] I'm sticking it here in the hope it helps someone out. In the apps file for Fluxbox you can control many variables. There's a pretty complete wiki page for this, but one of the things not fully explained is

[Deco] {NONE|NORMAL|TOOL|TINY|BORDER|TAB} Specify the decoration state. There are several predefined decoration sets:

  • NORMAL - standard decorations
  • NONE - no decorations
  • BORDER - like NONE except keep the X window border
  • TINY - titlebar with an iconify button
  • TOOL - titlebar only
  • TAB - like NONE except show external tabs only
A bitmask can also be used for fine-grained control. The bits are (from "1" to 1<<10): titlebar, handle/grips, border, iconify button, maximize button, close button, menu enabled, sticky button, shade button, tabbing enabled, focus enabled.

What's a bitmask? I kept asking. What does "1" to 1<<10 MEAN? What am I supposed to put? Each bit-property is given a value that's based on a power of 2 in ascending order:
Property Value
titlebar 1
handle/grips 2
border 4
minimize button (called iconify) 8
maximize button 16
close button 32
enable window menu 64
sticky button 128
shade button 256
enable tabbing 512
enable focus 1024
You pick the things you want and then add up the values. So if I wanted a titlebar with just a close button I'd do 1 + 32 = 33 and then enter [Deco] {33} in my apps file. Although I suspect it won't work if you've set where your titlebar buttons should be in a style... But as proof it DOES work, here's a picture of a terminal with just a border [exaggerated so you can see it: unfortunately I haven't found a way to set the border width per window]... and yes, I could have just used the keyword, but you just have to check these things sometimes.
Download Opera, the fastest and most secure browser