Differences
This shows you the differences between two versions of the page.
linux:fluxbox [2008/04/09 05:09] 127.0.0.1 external edit |
linux:fluxbox [2013/09/19 16:40] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Fluxbox ====== | ||
- | |||
- | Fluxbox is a very light window manager, highly customizable (look, shortcuts, etc). | ||
- | |||
- | ===== Links ===== | ||
- | |||
- | Installation guide for Gentoo :\\ | ||
- | [EN] [[http:// | ||
- | [FR] [[http:// | ||
- | |||
- | ===== Control your sound card with the keyboard and xosd ===== | ||
- | |||
- | '' | ||
- | |||
- | < | ||
- | # mute Master and PCM | ||
- | Mod4 m : | ||
- | Mod4 Shift m : | ||
- | |||
- | #volume Master | ||
- | Mod4 o : | ||
- | Mod4 i : | ||
- | |||
- | #volume PCM | ||
- | Mod4 Shift o : | ||
- | Mod4 Shift i : | ||
- | |||
- | Mod4 p : | ||
- | </ | ||
- | |||
- | The '' | ||
- | |||
- | ===== Configure TwinView/ | ||
- | |||
- | First, emerge fluxbox with the '' | ||
- | |||
- | It will work fine, except that your toolbar could be spread on both screens, then change in '' | ||
- | < | ||
- | screen0.toolbar.onhead : 2 | ||
- | </ | ||
- | |||
- | If you want to have different settings for the two screens, you can copy all '' | ||
- | |||
- | |||
- | |||
- | ===== Make double-click titlebar maximize the window ===== | ||
- | |||
- | Instead of shading the window. | ||
- | |||
- | For that, you have to modify the source code of fluxbox. Of course, it is easier if you use a source distribution such as Gentoo ([[gentoo-portage# | ||
- | |||
- | But you just have to modify two lines in '' | ||
- | <code C++> | ||
- | Window.cc: | ||
- | + CommandRef maximize_cmd(new WindowCmd(*this, | ||
- | | ||
- | Window.cc: | ||
- | - frame().setOnClickTitlebar(shade_cmd, | ||
- | + frame().setOnClickTitlebar(maximize_cmd, | ||
- | </ | ||
- | |||
- | ===== Make Meta-Tab switch between all windows ===== | ||
- | |||
- | NOTE: This is fixed in Fluxbox 1.0, this tip is useless now. | ||
- | |||
- | Instead of only switching between visible windows (not minimized). | ||
- | |||
- | One more time, you have to modify the source code, this time there are two lines : | ||
- | <code cpp> | ||
- | FocusControl.cc: | ||
- | - (opts & FocusControl:: | ||
- | - win-> | ||
- | + (opts & FocusControl:: | ||
- | + // | ||
- | |||
- | FocusControl.cc: | ||
- | - if (fbwin && !fbwin-> | ||
- | + if (fbwin && / | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ===== Reduce flickering ===== | ||
- | |||
- | ... during workspace switch. | ||
- | |||
- | Fluxbox deals with workspaces in a quite simple manner: when switching workspace, it hides all windows of the old workspace, and then draw all windows of the new workspace. | ||
- | |||
- | Most of the time when we switch workspace, we can see the background image, and then all new workspace windows displayed one after the other, what is very nasty. | ||
- | |||
- | First thing, show new workspace' | ||
- | <code cpp> | ||
- | Screen.cc: | ||
- | - currentWorkspace()-> | ||
- | Screen.cc: | ||
- | | ||
- | + wksp-> | ||
- | </ | ||
- | |||
- | Second thing, draw windows in their focusing order, in order to draw the front window first: | ||
- | <code cpp> | ||
- | void Workspace:: | ||
- | - Windows:: | ||
- | - Windows:: | ||
- | - for (; it != it_end; ++it) | ||
- | - (*it)-> | ||
- | |||
- | + FocusControl:: | ||
- | + FocusControl:: | ||
- | + int workspace = m_screen.currentWorkspaceID(); | ||
- | + | ||
- | + for (; it != it_end; ++it) { | ||
- | + if ((*it)-> | ||
- | + (int)(*it)-> | ||
- | + (*it)-> | ||
- | + } | ||
- | } | ||
- | </ | ||
- | |||
- | Third thing, only redraw what is necessary (seems to be faster, but I'm not completely sure, and I hope it doesn' | ||
- | |||
- | <code cpp> | ||
- | Workspace.cc: | ||
- | - (*it)-> | ||
- | + (*it)-> | ||
- | Window.hh: | ||
- | void deiconify(bool reassoc = true, bool do_raise = true); | ||
- | + void unwithdraw(); | ||
- | Window.cc: | ||
- | +void FluxboxWindow:: | ||
- | + if (numClients() == 0) | ||
- | + return; | ||
- | + | ||
- | + if (oplock) return; | ||
- | + oplock = true; | ||
- | + | ||
- | + bool was_iconic = iconic; | ||
- | + | ||
- | + m_blackbox_attrib.flags &= ~ATTRIB_HIDDEN; | ||
- | + | ||
- | + setState(NormalState, | ||
- | + | ||
- | + show(); | ||
- | + | ||
- | + oplock = false; | ||
- | +} | ||
- | </ | ||
- | |||
- | I have also tried to draw and clear windows in their general order of focusing, in replacement of the 2 first enhancements, | ||
- | <code cpp> | ||
- | Screen.cc: | ||
- | - currentWorkspace()-> | ||
- | |||
- | + int workspace = currentWorkspaceID(); | ||
- | |||
- | // set new workspace | ||
- | | ||
- | | ||
- | + FocusControl:: | ||
- | + FocusControl:: | ||
- | + | ||
- | + for (; it2 != it2_end; ++it2) { | ||
- | + if ((*it2)-> | ||
- | + { | ||
- | + if ((int)(*it2)-> | ||
- | + (*it2)-> | ||
- | + if ((int)(*it2)-> | ||
- | + (*it2)-> | ||
- | + } | ||
- | + } | ||
- | |||
- | - currentWorkspace()-> | ||
- | </ | ||
- | |||
- | ===== Full patch for previous tips ===== | ||
- | |||
- | ie double click maximizes and reducing flickering. | ||
- | |||
- | To apply the {{fluxbox.patch|patch}}, | ||
- | < | ||
- | |||