Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:fluxbox [2006/12/16 13:31]
cyril
linux:fluxbox [2013/09/19 16:40]
Line 1: Line 1:
-====== Fluxbox ====== 
  
-Fluxbox is a very light window manager, highly customizable (look, shortcuts, etc). 
- 
-===== Control your sound card with the keyboard and xosd ===== 
- 
-''amixer'' enables you to control your sound card, and the ''xosd'' package with ''osd_cat'' command enables you to print some stuff to the screen, even with a bar graph for the volume : 
- 
-<code> 
-Mod4 m :MacroCmd {ExecCommand amixer sset Master toggle} {ExecCommand amixer sset PCM toggle} {Exec sleep .1s} {Exec echo "Sound `amixer sget Master volume | grep Left: | cut -f 8 -d " "`" | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5} 
-Mod4 Shift m :MacroCmd {ExecCommand amixer sset PCM toggle} {Exec sleep .1s} {Exec echo "Sound PCM `amixer sget Master volume | grep Left: | cut -f 8 -d " "`" | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5} 
-Mod4 o :MacroCmd {ExecCommand amixer sset Master 1+}  {Exec sleep .1s}  {Exec osd_cat -d 1 -p middle -A center -s 1 -u blue -O 6 -b percentage -P `amixer sget Master volume | grep Left: | cut -f 7 -d " " | cut -c 2-4` -T "Master: `amixer sget Master volume | grep Left: | cut -c 24-50`"} 
-Mod4 i :MacroCmd {ExecCommand amixer sset Master 1-}  {Exec sleep .1s}  {Exec osd_cat -d 1 -p middle -A center -s 1 -u blue -O 6 -b percentage -P `amixer sget Master volume | grep Left: | cut -f 7 -d " " | cut -c 2-4` -T "Master: `amixer sget Master volume | grep Left: | cut -c 24-50`"} 
-#Mod4 o :MacroCmd {ExecCommand amixer sset Master 1+}  {Exec sleep .1s}  {Exec echo Master | osd_cat -d 1 -p middle -A center -s 1 -u blue -O2 -l1} {Exec amixer sget Master volume | grep Left: | cut -c 24-50 | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5 -l2} 
-#Mod4 i :MacroCmd {ExecCommand amixer sset Master 1-}  {Exec sleep .1s}  {Exec echo Master | osd_cat -d 1 -p middle -A center -s 1 -u blue -O2 -l1} {Exec amixer sget Master volume | grep Left: | cut -c 24-50 | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5 -l2} 
-Mod4 Shift o :MacroCmd {ExecCommand amixer sset PCM 1+}  {Exec sleep .1s}  {Exec osd_cat -d 1 -p middle -A center -s 1 -u blue -O 6 -b percentage -P `amixer sget PCM volume | grep Left: | cut -f 7 -d " " | cut -c 2-4` -T "PCM: `amixer sget PCM volume | grep Left: | cut -c 24-50`"} 
-Mod4 Shift i :MacroCmd {ExecCommand amixer sset PCM 1-}  {Exec sleep .1s}  {Exec osd_cat -d 1 -p middle -A center -s 1 -u blue -O 6 -b percentage -P `amixer sget PCM volume | grep Left: | cut -f 7 -d " " | cut -c 2-4` -T "PCM: `amixer sget PCM volume | grep Left: | cut -c 24-50`"} 
-#Mod4 Shift o :MacroCmd {ExecCommand amixer sset PCM 1+}  {Exec sleep .1s}  {Exec echo PCM | osd_cat -d 1 -p middle -A center -s 1 -u blue -O2 -l1} {Exec amixer sget PCM volume | grep Left: | cut -c 24-50 | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5 -l2} 
-#Mod4 Shift i :MacroCmd {ExecCommand amixer sset PCM 1-}  {Exec sleep .1s}  {Exec echo PCM | osd_cat -d 1 -p middle -A center -s 1 -u blue -O2 -l1} {Exec amixer sget PCM volume | grep Left: | cut -c 24-50 | osd_cat -d 1 -p middle -A center -s 1 -u blue -O5 -l2} 
- 
-Mod4 p :ExecCommand xmms -t 
- 
- 
- 
- 
-</code> 
- 
-===== 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 ([[linux:gentoo-portage|here]] is explained how to emerge a package and modify sources). 
- 
-But you just have to modify one line in ''Window.cc'' : 
-<code C++> 
-Window.cc:4084 
--  frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 
-+  frame().setOnClickTitlebar(maximize_cmd, 1, true); // doubleclick with button 1 
-</code> 
- 
-===== Make Meta-Tab switch between all windows ===== 
- 
-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> 
-FocusControl.cc:71 
--  (opts & FocusControl::CYCLESKIPSHADED) != 0 && win->isShaded() ||  
--  win->isFocusHidden() 
-+  (opts & FocusControl::CYCLESKIPSHADED) != 0 && win->isShaded() //||  
-+ //win->isFocusHidden() 
- 
-FocusControl.cc:122 
--  if (fbwin && !fbwin->isIconic() && 
-+  if (fbwin && /*!fbwin->isIconic() &&*/ 
-</code> 
- 
- 
-===== 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 ''src'' folder, and enter : 
-<code>patch -p0 < fluxbox.maximize.patch</code> 
- 
-The patch : 
-<code DIFF> 
-diff -r -U 3 src.orig/FocusControl.cc src/FocusControl.cc 
---- src.orig/FocusControl.cc 2006-07-08 01:00:05.000000000 +0200 
-+++ src/FocusControl.cc 2006-07-08 00:58:21.000000000 +0200 
-@@ -71,9 +71,9 @@ 
-     // skip if not active client (i.e. only visit each fbwin once) 
-     (opts & FocusControl::CYCLEGROUPS) != 0 && win->winClient().window() != winclient.window() || 
-     // skip if shaded 
--    (opts & FocusControl::CYCLESKIPSHADED) != 0 && win->isShaded() ||  
-+    (opts & FocusControl::CYCLESKIPSHADED) != 0 && win->isShaded() //||  
-     // skip if hidden 
--    win->isFocusHidden() 
-+ //   win->isFocusHidden() 
-     );  
- } 
-  
-@@ -122,7 +122,7 @@ 
-             break; 
-  
-         FluxboxWindow *fbwin = (*it)->fbwindow(); 
--        if (fbwin && !fbwin->isIconic() && 
-+        if (fbwin && /*!fbwin->isIconic() &&*/ 
-             (fbwin->isStuck()  
-              || fbwin->workspaceNumber() == m_screen.currentWorkspaceID())) { 
-             // either on this workspace, or stuck 
-diff -r -U 3 src.orig/Window.cc src/Window.cc 
---- src.orig/Window.cc 2006-07-08 01:00:06.000000000 +0200 
-+++ src/Window.cc 2006-07-08 00:58:21.000000000 +0200 
-@@ -4084,7 +4084,7 @@ 
-  
-     // setup titlebar 
-     frame().setOnClickTitlebar(raise_and_focus_cmd, 1, false, true); // on press with button 1 
--    frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1 
-+    frame().setOnClickTitlebar(maximize_cmd, 1, true); // doubleclick with button 1 
-     frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3 
-     frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2 
-</code> 
linux/fluxbox.txt ยท Last modified: 2013/09/19 16:40 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0