Fluxbox Tips & Tricks

From LQWiki
Jump to navigation Jump to search

Initial Set-up

First thing we need to do is edit some configuration files.Use your favorite text editor(I use midnight commander)and navigate to /home/username/.fluxbox

Lets make it so we can edit our menu.Open /home/username/.fluxbox/init and make sure it is;

session.menuFile:	~/.fluxbox/menu

or

session.menuFile:	/home/username/.fluxbox/menu

Sample /home/username/.fluxbox/init

session.screen0.toolbar.alpha:	255
session.screen0.toolbar.autoHide:	false
session.screen0.toolbar.maxOver:	false
session.screen0.toolbar.height:	0
session.screen0.toolbar.layer:	Desktop
session.screen0.toolbar.tools:	workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock
session.screen0.toolbar.widthPercent:	100
session.screen0.toolbar.placement:	BottomLeft
session.screen0.toolbar.onTop:	False
session.screen0.toolbar.visible:	true
session.screen0.toolbar.onhead:	0
session.screen0.overlay.lineWidth:	1
session.screen0.overlay.lineStyle:	LineSolid
session.screen0.overlay.joinStyle:	JoinMiter
session.screen0.overlay.capStyle:	CapNotLast
session.screen0.menu.alpha:	150
session.screen0.iconbar.iconWidth:	70
session.screen0.iconbar.usePixmap:	true
session.screen0.iconbar.mode:	Workspace
session.screen0.iconbar.deiconifyMode:	Follow
session.screen0.iconbar.wheelMode:	Screen
session.screen0.iconbar.iconTextPadding:	10l
session.screen0.iconbar.alignment:	Relative
session.screen0.tab.width:	64
session.screen0.tab.placement:	Top
session.screen0.tab.height:	16
session.screen0.tab.rotatevertical:	True
session.screen0.tab.alignment:	Left
session.screen0.slit.placement:	BottomRight
session.screen0.slit.autoHide:	false
session.screen0.slit.alpha:	255
session.screen0.slit.direction:	Vertical
session.screen0.slit.onhead:	0
session.screen0.slit.maxOver:	false
session.screen0.slit.onTop:	False
session.screen0.slit.layer:	Dock
session.screen0.window.focus.alpha:	255
session.screen0.window.unfocus.alpha:	166
session.screen0.focusLastWindow:	true
session.screen0.menuAlpha:	146
session.screen0.focusModel:	SloppyFocus
session.screen0.edgeSnapThreshold:	0
session.screen0.sloppywindowgrouping:	true
session.screen0.colPlacementDirection:	TopToBottom
session.screen0.rowPlacementDirection:	LeftToRight
session.screen0.fullMaximization:	false
session.screen0.windowMenu:	
session.screen0.showwindowposition:	true
session.screen0.clickRaises:	true
session.screen0.rootCommand:	
session.screen0.antialias:	true
session.screen0.desktopwheeling:	true
session.screen0.workspaceNames:	Gentoo.tux,two,three,four,
session.screen0.resizeMode:	Bottom
session.screen0.windowPlacement:	RowSmartPlacement
session.screen0.menuDelay:	0
session.screen0.workspacewarping:	true
session.screen0.workspaces:	4
session.screen0.strftimeFormat:	%l:%M %D
session.screen0.opaqueMove:	false
session.screen0.followModel:	Ignore
session.screen0.imageDither:	false
session.screen0.decorateTransient:	false
session.screen0.menuMode:	Delay
session.screen0.focusNewWindows:	true
session.screen0.autoRaise:	false
session.screen0.menuDelayClose:	0
session.titlebar.left:	Stick 
session.titlebar.right:	Minimize Maximize Close 
session.updateDelayTime:	0
session.keyFile:	~/.fluxbox/keys
session.autoRaiseDelay:	250
session.iconbar:	true
session.colorsPerChannel:	4
session.groupFile:	
session.styleFile:	/home/david/.fluxbox/styles/abbott
session.focusTabMinWidth:	0
session.ignoreBorder:	false
session.appsFile:	~/.fluxbox/apps
session.useMod1:	true
session.tabs:	true
session.menuFile:	~/.fluxbox/menu
session.tabsAttachArea:	Window
session.slitlistFile:	
session.tabPadding:	0
session.forcePseudoTransparency:	false
session.opaqueMove:	False
session.cacheMax:	200l
session.imageDither:	True
session.doubleClickInterval:	250
session.cacheLife:	5l
session.numLayers:	13

How To Edit Fluxbox Menu

Editing the menu in floxbox is easy. The menu is stored under ~/.fluxbox/menu. It has a basic template that goes something like this:

[begin](Fluxbox-0.9.12)
      [exec] (Shell) (xterm)
      [exec] (Browser) {firefox}
[end]

That will create a simple menu. Submenus are created like this:

[submenu] Net
      [exec] (R. Desktop) {grdesktop}
[end]

That is a submenu. Submenus can also have submenus. Continuning from the previous example:

[submenu] (Net)
[submenu] (Misc)
      [exec] (R. Desktop) {grdesktop}
[end]
[submenu] (Browsers)
      [exec] (Firefox) {firefox}
      [exec] (Lynx) {lynx}
[end]
[end]

That will create a basic menu with the title of Net, with two menus under that: Misc and Browser. Now lets stop for a minute to take a look at the syntax.

[begin] / [end] - Every begin statement must have an end statement. Simple as that. BEGIN begins a new menu, and is used ONCE in the entire menu.

[submenu] / [end] - Every submenu statement must have an end statement. Submenu can be used as many times as you please.

[exec] - This tells fluxbox that we're going to execute something ( ) - Something in parentheses is something that is shown in the menu { } - Something in brackets is something that is executed by Linux

So remember, when manually generating your menu, close all of your [submenu] 's with [end] 's and don't forget to use ( ) and { } properly!


The following are some tools to automagically generate you a menu or to edit your menu using a GUI:

Denu: http://denu.sourceforge.net (Automagically generates menus for flux and other common WMs)


http://devaux.fabien.free.fr/flux/ <- Contains GUI tools for configuration editing, menu editing and key binding editing. Highly recommended for those who are fearful of using console based text editors.

Fluxbox Menu Editor : http://fme.rhymux.info/ is another GUI to edit and generate your Fluxbox menu It's easy with Drag and Drop. You can add, edit, delete a row, create a menu and choose icon easily. You also can cancel and redo your actions.

Desktop Icons with idesk

adesklets

The .fluxbox keys file

Gentoo Fluxbox Guide

Fluxbox Installation and Configuration in Debian