Fluxbox
From ArchWiki
| i18n |
|---|
| English |
| Italiano |
Contents |
[edit] Installing Fluxbox
Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.
pacman -Sy fluxbox fluxconf
Menumaker was moved to unsupported, to install you need download tarball from aur.
wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz tar xvf menumaker.tar.gz cd menumaker makepkg
Install it with:
pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz
Modify if necessary.
Remove fluxconf and menumaker if you want a more minimal install, usage of each will be covered but not required
[edit] Starting Fluxbox
[edit] Method 1: kdm/gdm
This will automaticly be added to the session types. Select fluxbox from the menu.
Note: you will have to have login manager enabled at first. For instructions how to do that, look here.
[edit] Method 2: xinitrc
In your home folder add the code below to your .xinitrc file
exec fluxbox
or if you like to use the 'startfluxbox' file use :
exec startfluxbox
It is better to use 'startfluxbox', because only then file ~/.fluxbox/startup file is used. Remember: there can only be one exec line in your .xinitrc file
Note : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. 1 Then you can start fluxbox with startx command.
[edit] Configuring Fluxbox
[edit] Menus
[edit] Fast method:
build in command :
fluxbox-generate_menu
this command will generate a .fluxbox/menu/ file based on your installed programms. There is also "helper / regenerate menu" in the fluxbox menu.
[edit] Archlinux xdg menu
Requires Archlinux xdg menu
xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu
Tip: replace default xterm/urxvt
sed -i 's/xterm/urxvt/g' ~/.fluxbox/menu
More info
xdg_menu --help
See also: Archlinux xdg menu
[edit] Creating a custom menu with fluxconf
To start the menu section of fluxconf run:
fluxmenu
In the window you will see three columns: Type, Title, & Command/Comment.
Clicking on an entry in this will allow you to edit it.
Clicking on "Add sub" will add a submenu.
Clicking on "Add exec" will add a command.
the type column has several valid options:
- begin, required to start the menu file. The title option is the menu header.
- submenu, a "folder" inside the menu. Title is the name of the submenu.
- exec, a command line. Title is what is shown and Command/Comment is the command to be executed.
- separator, a divider in the menu. No arguments to this one.
- workspaces, a list of workspaces and what applications are running on each. Title is what will be shown to the user.
- stylesdir, a directory containing styles. Title is the path to the dir. Recommended that you put this into its own subdirectory as it can get quite large. directories to use: /usr/share/fluxbox/styles ~/.fluxbox/styles .
- config, a menu with many options for configuring behavior of fluxbox. Title is the name of the menu shown to the user.
- reconfig, reloads the config file. Title is the title shown to the user.
- restart, restarts fluxbox. Title is the title shown to the user.
- exit, exit fluxbox, will drop back to the desktop manager or exit X depending on the startup method you used. Title is the title shown to the user.
Remember to hit save before closing
[edit] Manualy
Use comand:
nano ~/.fluxbox/menu
Then write lines in this style:
[exec] (name) {command}
If you want to make submenu write:
[submenu] (Name) ... ... [end]
Then done save and exit. There is no need to restart fluxbox.
[edit] Hotkeys
Fluxbox offers a basic hotkeys functionality. fluxbox key file is:
~/.fluxbox/keys
fluxconf offers a method of editing this in GUI with the command:
fluxkeys
The Mod1 button corresponds to Alt and Mod4 corresponds to Meta (not a standard key but many map meta to the win key)
The First text box is for a button and the second is for an action. select execCommand to set a command and put the name of the command into the 3rd text box.
More functions of this can be used from the 2nd text box (A drop down menu is available)
[edit] Workspaces
Fluxbox defaults to having four workspaces available to the user. available with the alt+F1-4 keys or the arrows on the toolbar next to where it says "one"
Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces.
Workspaces Menu:
Icons - shows minimized applications --separator-- Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop --separator-- New Workspace - Adds a workspace Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it
[edit] Background
Setting the background requires a background setter you will need to install one of these packages:
- eterm (recommended)
- feh (lacks menu transparency)
there are others but these are the most recommended two, to see others check out the fbsetbg documentation in the "Additional Links section" To set the background:
fbsetbg /path/to/background.image
Fluxbox however does not set your background on bootup however you can make it do so by adding the below code to a bootup script, covered below:
fbsetbg -l
(It is of use only if you have previously issued the command with a valid image)
You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:
session.screen0.rootCommand: fbsetbg /path/to/wallpaper
Or simply:
session.screen0.rootCommand: fbsetbg -l
Additional notes for people who like to change wallpaper a lot.
Place the following submenu in your fluxbox menu
[submenu] (Backgrounds) [wallpapers] (~/.fluxbox/backgrounds) [wallpapers] (/usr/share/fluxbox/backgrounds) [end]
Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.
[edit] Theming
Links to some theme sites are provided below.
To install a theme extract the archive to a stylesdir the default ones are:
- global - /usr/share/fluxbox/styles
- user only - ~/.fluxbox/styles
[edit] Autostarting Applications
xinitrc users should put all code into their .xinitrc. However, fluxbox provides functionality to autostart applications on its own.
The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself.
The # symbol denotes a comment.
a sample file:
fbsetbg -l # sets the last background set, very useful and recommended. # In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. # failure to provide them will cause fluxbox not to start. idesk & xterm & # exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately exec /usr/bin/fluxbox # or if you want to keep a log, uncomment the below command and comment out the above command: # exec /usr/bin/fluxbox -log ~/.fluxbox/log