Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:fluxbox [2006/12/16 13:27] cyril |
linux:fluxbox [2013/09/19 16:40] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
Fluxbox is a very light window manager, highly customizable (look, shortcuts, etc). | Fluxbox is a very light window manager, highly customizable (look, shortcuts, etc). | ||
- | ===== Controlling | + | ===== Links ===== |
+ | |||
+ | Installation guide for Gentoo :\\ | ||
+ | [EN] [[http:// | ||
+ | [FR] [[http:// | ||
+ | |||
+ | ===== Control | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | # 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 '' | ||
+ | |||
+ | ===== Apps ===== | ||
< | < | ||
- | Mod4 m : | + | xprop |
- | Mod4 o : | + | |
- | Mod4 i : | + | |
- | Mod4 Shift | + | |
- | Mod4 Shift | + | |
- | Mod4 p : | + | |
</ | </ | ||
Line 18: | Line 52: | ||
Instead of shading 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 ([[linux:gentoo-portage|here]] is explained how to emerge a package and modify sources). | + | 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 | + | But you just have to modify |
<code C++> | <code C++> | ||
- | Window.cc:4084 | + | Window.cc:3954 |
- | - frame().setOnClickTitlebar(shade_cmd, | + | + CommandRef maximize_cmd(new WindowCmd(*this, |
- | + frame().setOnClickTitlebar(maximize_cmd, | + | |
+ | Window.cc: | ||
+ | - frame().setOnClickTitlebar(shade_cmd, | ||
+ | + frame().setOnClickTitlebar(maximize_cmd, | ||
</ | </ | ||
===== Make Meta-Tab switch between all windows ===== | ===== 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). | 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 : | One more time, you have to modify the source code, this time there are two lines : | ||
- | < | + | < |
FocusControl.cc: | FocusControl.cc: | ||
- (opts & FocusControl:: | - (opts & FocusControl:: | ||
Line 45: | Line 84: | ||
- | ===== Patch for double-click maximize and meta-tab ===== | ||
- | I've written to make the modifications for the two previous tips automatic. To apply the patch, copy it in the parent of the '' | + | ===== Reduce flickering ===== |
- | < | + | |
- | The patch : | + | ... during workspace switch. |
- | < | + | |
- | diff -r -U 3 src.orig/ | + | 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. |
- | --- src.orig/ | + | |
- | +++ src/ | + | 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. |
- | @@ -71,9 +71,9 @@ | + | |
- | // skip if not active client | + | First thing, show new workspace' |
- | (opts & FocusControl:: | + | < |
- | // skip if shaded | + | Screen.cc:1208 |
- | - (opts & FocusControl:: | + | - |
- | + | + | Screen.cc:1223 |
- | // skip if hidden | + | |
- | - win->isFocusHidden() | + | + wksp-> |
- | + // win->isFocusHidden() | + | </ |
- | ); | + | |
+ | Second thing, draw windows in their focusing order, in order to draw the front window first: | ||
+ | <code cpp> | ||
+ | void Workspace::showAll() { | ||
+ | - Windows:: | ||
+ | - | ||
+ | - for (; it != it_end; | ||
+ | - | ||
+ | |||
+ | + FocusControl:: | ||
+ | + | ||
+ | + int workspace | ||
+ | + | ||
+ | + for (; it != it_end; ++it) { | ||
+ | + if ((*it)-> | ||
+ | + (int)(*it)->fbwindow()->workspaceNumber() == workspace) | ||
+ | + (*it)->fbwindow()-> | ||
+ | + } | ||
} | } | ||
- | |||
- | @@ -122,7 +122,7 @@ | ||
- | | ||
- | |||
- | | ||
- | - if (fbwin && !fbwin-> | ||
- | + if (fbwin && / | ||
- | | ||
- | || fbwin-> | ||
- | // either on this workspace, or stuck | ||
- | diff -r -U 3 src.orig/ | ||
- | --- src.orig/ | ||
- | +++ src/ | ||
- | @@ -4084,7 +4084,7 @@ | ||
- | |||
- | // setup titlebar | ||
- | | ||
- | - frame().setOnClickTitlebar(shade_cmd, | ||
- | + frame().setOnClickTitlebar(maximize_cmd, | ||
- | | ||
- | | ||
</ | </ | ||
+ | |||
+ | 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}}, | ||
+ | < | ||
+ | |||
+ |