Fluxbox Tutorial

Status
Not open for further replies.

DaltonP

Solid State Member
Messages
15
Location
Nc
An older guide of mine, working on fixing it up.
Anyways heres my Fluxbox guide.

Desktop:
2h2e2b5.png


Laptop:
29ygojr.png




ive found out alot and figured i would make a guide out of it, firstly ill start with editing the menu file.


Editing The Menu FIle:

the menu file is what comes up when you right click on the desktop. it contains all of the applications that you wish to start.

Code:
heres a few of the codes that you can use in the file:
[begin] (name on top) <- begins the file and defines what the menu name will be, look at mine if your confused.

[exec] (name you want on menu) {the real command} <- allows you to exec a program.

[submenu] (name of menu) <-creates an extra menu that you can sort apps out by type or however you like, can be used twice inside of its self and needs to be ended with [end]

IE:

[submenu] (example)
[exec] (a cool program) {coolprogram}
[exec] (Another one) {anotherone}
[end]


[end] <- ends a sub menu and two in consistency ends the file

[separator] creates a serperator ie: --------------

[workspaces] (Workspaces) <- allows you to switch workspaces
		
[stylesdir] (/usr/share/fluxbox/styles) <-allows for you to pick themes from preinstalled styles
[stylesdir] (/dir/of/styles) <- allows you to pick styles that you have downloaded.
		
[config] (Configure) <- configuration setings for fluxbox
		
[reconfig] (Reconfig) <- reloadeds fluxbox setings

[restart] (Restart) <- causes total restart of fluxbox
[B][COLOR="Red"]make sure to put 2 ends at end of the file to end it![/COLOR][/B]
heres my menu:

Code:
[begin] (Apps)
	        [exec] (Terminal) {urxvt}
                [submenu] (Media)
		[exec] (Bmp) {beep-media-player}
                [exec] (Mirage) {mirage}
	        [end]
                [submenu] (Managers)
                [exec] (Gedit) {gedit}
                [exec] (Fm) {pcmanfm}
                [end]
                [submenu] (Network)
		[exec] (Pidgin) {pidgin}
		[exec] (X-Chat) {xchat}
                [exec] (Firefox){firefox}
                [end]
                [submenu] (Extra)
                [exec] (Xcalc) {xcalc}
                [exec] (NVIDIA X Server Settings) {nvidia-settings}
                [end]
	[separator]
	[submenu] (Setings)
		[workspaces] (Workspaces)
		[submenu] (Styles)
			[stylesdir] (/usr/share/fluxbox/styles)
			[stylesdir] (~/.fluxbox/styles)
		[end]
		[config] (Configure)
		[reconfig] (Reconfig)
		[restart] (Restart)
		[separator]
		[exit] (Exit)
	[end]
[end]

Theming Fluxbox:

best place for fluxbox themes: Here
putting theme's on fluxbox is fairly simple, you just need to make sure that you have your menu set up right to read off where you put the styles.

[stylesdir] (~/.fluxbox/styles) <-mine for example

to use a style just put it (uncompressed) in the folder of your choice and pick it off the menu.

How To Change The Time Display:
right click on the top bar and click edit clock format, there are many formats for this and you can google for them, mine is this:
%I %M %a %b %d
(shift for upper case only)


How to set a new background in Fluxbox:
this is fairly easy, you just need to use the command fbsetbg(need eterm)
ie:
fbsetbg /path/to/my/file.png
To Make it be there on next start:
add fbsetbg -l to your startup file(refer to Starting App's)

Starting App's When Fluxbox Starts:
for this you need to edit your startup file in .fluxbox, there should be a line that explains it but if not here:

# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
MAKE SURE exec fluxbox is after all the applications you decided to start

Making Certain Keys Do Things In Fluxbox:
this is for use of multimedia keys of ones that you might want to change what they do, for this we need to edit the keys file in .fluxbox.

for this we will need to find out what the keycode is using xev(x event viewer)

to add a key to fluxbox we need to figure out the keycode, heres an example of how:
press the key and look for the keycode, seen here:

ddml4n.jpg


after we know what the keycode we can add it to fluxbox, heres a few codes which use the key different way:

if you want to have it to do what you want without use of any other button then you would put it like this:

None 167 :ExecCommand commandyouwanttoexcute

you may also just do :Exec
-
now if you want to have a ctrl or alt added in then you need to put it like this:

alt-> Mod4 keycdoe :Exec whatyouwanttodo

or

ctrl-> Control keycode :Exec whatyouwanttodo

Heres my keys file:
Code:
# click on the desktop to get menus
OnDesktop Mouse1 :HideMenus
OnDesktop Mouse2 :WorkspaceMenu
OnDesktop Mouse3 :RootMenu

# scroll on the desktop to change workspaces
OnDesktop Mouse4 :PrevWorkspace
OnDesktop Mouse5 :NextWorkspace

# scroll on the toolbar to change workspaces
OnToolbar Mouse4 :PrevWorkspace
OnToolbar Mouse5 :NextWorkspace

# alt + left/right click to move/resize a window
OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
OnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}

# middle click a window's titlebar and drag to attach windows
OnTitlebar Mouse2 :StartTabbing

# double click on the titlebar to shade
OnTitlebar Double Mouse1 :Shade

# right click on the titlebar for a menu of options
OnTitlebar Mouse3 :WindowMenu

# alt-tab
Mod1 Tab :NextWindow {groups}
Mod1 Shift Tab :PrevWindow {groups}

# cycle through tabs in the current window
Mod4 Tab :NextTab
Mod4 Shift Tab :PrevTab

# go to a specific tab in the current window
Mod4 1 :Tab 1
Mod4 2 :Tab 2
Mod4 3 :Tab 3
Mod4 4 :Tab 4
Mod4 5 :Tab 5
Mod4 6 :Tab 6
Mod4 7 :Tab 7
Mod4 8 :Tab 8
Mod4 9 :Tab 9

# open a terminal
Mod1 F1 :Exec urxvt

# open a dialog to run programs
Mod1 F2 :Exec fbrun

# volume settings, using common keycodes
# if these don't work, use xev to find out your real keycodes
123 :Exec ossmix vmix0-outvol +5
122 :Exec ossmix -- vmix0-outvol -5
121 :Exec ossmix vmix0-outvol 0

# current window commands
Mod1 F4 :Close
Mod1 F9 :Minimize
Mod1 F10 :Maximize
Mod1 F11 :Fullscreen

# open the window menu
Mod1 space :WindowMenu

# exit fluxbox
Control Mod1 Delete :Exit

# change to a specific workspace
Control F1 :Workspace 1
Control F2 :Workspace 2
Control F3 :Workspace 3
Control F4 :Workspace 4
Control F5 :Workspace 5
Control F6 :Workspace 6
Control F7 :Workspace 7
Control F8 :Workspace 8
Control F9 :Workspace 9
Control F10 :Workspace 10
Control F11 :Workspace 11
Control F12 :Workspace 12

# send the current window to a specific workspace
Mod4 F1 :SendToWorkspace 1
Mod4 F2 :SendToWorkspace 2
Mod4 F3 :SendToWorkspace 3
Mod4 F4 :SendToWorkspace 4
Mod4 F5 :SendToWorkspace 5
Mod4 F6 :SendToWorkspace 6
Mod4 F7 :SendToWorkspace 7
Mod4 F8 :SendToWorkspace 8
Mod4 F9 :SendToWorkspace 9
Mod4 F10 :SendToWorkspace 10
Mod4 F11 :SendToWorkspace 11
Mod4 F12 :SendToWorkspace 12

# send the current window and change to a specific workspace
Control Mod4 F1 :TakeToWorkspace 1
Control Mod4 F2 :TakeToWorkspace 2
Control Mod4 F3 :TakeToWorkspace 3
Control Mod4 F4 :TakeToWorkspace 4
Control Mod4 F5 :TakeToWorkspace 5
Control Mod4 F6 :TakeToWorkspace 6
Control Mod4 F7 :TakeToWorkspace 7
Control Mod4 F8 :TakeToWorkspace 8
Control Mod4 F9 :TakeToWorkspace 9
Control Mod4 F10 :TakeToWorkspace 10
Control Mod4 F11 :TakeToWorkspace 11
Control Mod4 F12 :TakeToWorkspace 12

# extras
None 107 :ExecCommand scrot -d 2
XF86HomePage :Exec firefox < ignore, the way i stated is alot easier.
None 167 :ExecCommand beep-media-player -f
None 166 :ExecCommand beep-media-player -r
None 172 :ExecCommand beep-media-player -t
XF86Calculator :Exec xcalc < ignore, the way i stated is alot easier.

Using Gtk2.0 color Icon and mouse cursor themes on fluxbox:

best place for all of these: Here
Color:
put your file in .themes(create if not there yet) in your home directory and make a new file in your home named .gtkrc-2.0
and add this in:
gtk-theme-name="Themenamehere"

NOTE: this will only effect programs that use gtk: firefox, mirage, etc.
restart x and it should be in effect.

Icons:
put your icon theme in .icons in your home folder(create if not there yet)
then add this into .gtkrc-2.0(create if not there yet)

gtk-icon-theme-name="themename"

NOTE: this will only effect programs that use gtk-icons: pcmanfm, etc.
restart x for it to take effect.

Mouse Cursor:
put your mouse cursor theme in .icons in your home folder(create if not there yet) then add this to your .Xdefaults(create if not there yet)
(without quotes)
"Xcursor.theme: nameoftheme"

restart x for it to take effect.

Using Idesk For Icons On The Desktop:
Working On This Part Of The Tut Now.





Recomended Programs For Fluxbox:


Browser: Firefox(duh!)

im: pidgin(duh!)

Audio: Beep-Media-Player

Image Viewer: Mirage

FIle Manager: pcmanfm

Desktop Icons: idesk

System Manager: Conky (seen up top to tell me how much power my laptop has left but can be used for much much more.)
 
Status
Not open for further replies.
Back
Top Bottom