Aller au contenu principal

Fluxbox

Fluxbox is a window manager for X11. It is based on the fluxbox 0.61.1 code, but with significant enhancements. Fluxbox provides a number of window management features such as tabbing and grouping. All Fluxbox configuration is stored in plaintext files; however, some settings are exposed graphically in the configuration menu.

img

Installation

Once you finish installing Archcraft, Fluxbox can be installed on the top of it. It's pre-configured and ready to go. Open a terminal and run the following command to install Fluxbox :

$ sudo pacman -Sy archcraft-fluxbox

Configuration

Fluxbox is pre-configured in Archcraft. In this section, We'll see how the Fluxbox window manager is configured, what tools and utilities are used to make it look and work like a complete desktop environment.

Config Structure

The configuration structure of Fluxbox in Archcraft looks something like this:

~/.fluxbox         : fluxbox config directory
├── alacritty : terminal config
├── backgrounds : wallpapers
├── scripts : scripts used for fluxbox
├── styles : fluxbox styles/themes
├── theme : desktop theme (polybar, rofi configs)
├── apps : window configuration of specific apps
├── dunstrc : dunst config for notifications
├── init : main fluxbox configuration file
├── keys : fluxbox keyboard shortcuts file
├── menu : fluxbox menu config file
├── picom.conf : compositor config
├── startup : launch startup apps
├── windowmenu : config file for altering the window menu
└── xsettingsd : gtk themes, icons and fonts config file

Terminal

Alacritty is the default terminal. In the Fluxbox window manager, alacritty is launched with an alternative config file. If you need to change anything, make sure you modify the config files in ~/.fluxbox/alacritty directory. These are the following config files you can modify to change the behaviour of your terminal:

~/.fluxbox/alacritty/alacritty.toml : Main configuration file
~/.fluxbox/alacritty/colors.toml : Colors configurations
~/.fluxbox/alacritty/fonts.toml : Fonts configurations

If you need any help with alacritty config, run : man 5 alacritty in terminal.

Notification

Dunst is used as a notification daemon for notifications in Fluxbox. In the Fluxbox window manager, dunst is launched with an alternative config file, which is ~/.fluxbox/dunstrc. So, If you need to modify anything, make sure you edit this file.

If you need any help with dunst config, run : man 5 dunst in terminal.

Wallpaper

hsetroot sets the wallpaper in the Fluxbox. If you want to change the wallpaper, Edit ~/.fluxbox/startup script and add the path to your wallpaper :

# Restore wallpaper
hsetroot -cover '/path/to/your/wallpaper'

To change the wallpaper quickly, Right click on desktop and go to Fluxbox > Backgrounds

Statusbar

Polybar is used as the statusbar in Archcraft's Fluxbox window manager.

The configurations for polybar can be found inside the theme directory directory of Fluxbox ~/.fluxbox/theme

If you want to modify the polybar settings, or perhaps want to add/remove modules, then you need to edit the following files :

~/.fluxbox/theme/polybar/config.ini : Main config file
~/.fluxbox/theme/polybar/colors.ini : Colors config file
~/.fluxbox/theme/polybar/modules.ini : Modules config file

If you need any help with polybar config, visit : polybar wiki

astuce

If you want to use the default Fluxbox toolbar instead of polybar, Edit ~/.fluxbox/init file and enable it.

...
session.screen0.toolbar.visible: true
...

Also, edit ~/.fluxbox/startup script and disable polybar on startup.

Launchers and Applets

Rofi is used for application launchers, command runner and various applets. To modify the rofi config, edit ~/.config/rofi/config.rasi file.

If you need any help with rofi config, run : man rofi in terminal.

The scripts for rofi that are used in Fluxbox can be found it ~/.fluxbox/scripts directory. These are the following scripts that uses rofi to provide the launchers and applets in Fluxbox :

rofi_askpass : rofi based sudo frontend to get root password
rofi_asroot : applet to open apps as root
rofi_bluetooth : bluetooth applet to quickly connect to BT devices
rofi_launcher : an application launcher, cmd runner, file manager and task manager
rofi_music : music applet, that controls MPD with mpc
rofi_powermenu : power menu, with confirmation dialog
rofi_runner : quickly lets you run a command
rofi_screenshot : screenshot applet that works with maim
rofi_status : applet to show various system informations
rofi_windows : applet to manage opened windows

If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts above.

The configuration of each script can be found inside the theme directory of Fluxbox ~/.fluxbox/theme

Let's say you want to modify the looks of launcher, then you need to edit the ~/.fluxbox/theme/rofi/launcher.rasi file. Same goes for every other applet, Edit the respective file in the same directory.

If you need any help with rofi theming, run : man rofi-theme in terminal.

To change the colors and fonts of the launchers and applets, Edit the ~/.fluxbox/theme/rofi/shared/colors.rasi and ~/.fluxbox/theme/rofi/shared/fonts.rasi files.

Compositor

Picom is used for compositing. It's a lightweight compositor with shadowing, advanced blurring and fading. In Fluxbox, picom is launched with an alternative config file, which is ~/.fluxbox/picom.conf.

If you need to change anything related to picom, Edit this picom config file.

If you need any help with picom config, check the picom's default config file in /etc/xdg/picom.conf

info

If you're having screen-tearing issues, using glx backend can solve this issue.
If you're facing lagging, hangs and freezes, try switching between xrender and glx backend.

Window Manager

The configuration of Fluxbox is available in your home directory. To configure Fluxbox window manager, these are the files that are used :

apps : a configuration file for remembering the window configuration of specific apps
init : the main fluxbox resource configuration file
keys : the fluxbox keyboard shortcuts (hotkeys) file
menu : the fluxbox menu config
startup : where to launch startup apps
windowmenu : a configuration file for altering the Window Menu itself

If you need any help with fluxbox configuration, See the manpages. Also visit Fluxbox Wiki

Keybindings

Here's a list of some important keybinds you need to know for operating Fluxbox easily. If you want to view, modify or add new keybinds, Edit ~/.fluxbox/keys file.

Applications

KeysAction
super + ReturnOpen terminal (alacritty)
super + TOpen fullscreen terminal
super + FOpen file manager (thunar)
super + EOpen text editor (geany)
super + WOpen web browser (firefox)
KeysAction
superOpen application launcher
alt + F1Open application launcher
alt + F2Open command runner
super + ROpen command runner
super + NOpen network manager applet
super + BOpen bluetooth applet
super + MOpen music applet
super + XOpen powermenu applet
super + SOpen status applet
super + SpaceOpen fluxbox root menu
alt + SpaceOpen fluxbox window menu

Hardware Keys

KeysAction
PrintTake screenshot
alt + PrintTake screenshot in 5 seconds delay
shift + PrintTake screenshot in 10 seconds delay
ctrl + PrintTake screenshot of currently focused window
super + PrintTake screenshot of selected area
XF86AudioRaiseVolumeIncrease volume
XF86AudioLowerVolumeDecrease volume
XF86AudioMuteToggle mute speakers
XF86AudioMicMuteToggle mute microphone
XF86Audio + Next/Prev/Play/StopMedia controls (MPD)
XF86MonBrightnessUpIncrease display brightness
XF86MonBrightnessDownDecrease display brightness

Workspaces

KeysAction
super + 1..5Switch to respective workspace
super + shift + 1..5Send the current window to respective workspace
super + ctrl + 1..5Send the current window and change to respective workspace
super + shift + Left/RightSend the current window and follow it to previous/next workspace

Window Management

KeysAction
super + C/QClose focused window
super + DToggle show desktop
alt + F4Close window
alt + F5Minimize window
alt + F6Maximize window
alt + F7Toggle decorations
alt + F11Toggle fullscreen
alt + TabCycle opened windows
super + TabCycle through tabs in the current window
ctrl + 1..9Go to a specific tab in the current window
super + shift + DRemove the current tab from the tab group, placing it in its own window
ctrl + alt + Left/Right/Up/DownMove focused window
ctrl + super + Left/Right/Up/DownResize focused window
super + Left/Right/Up/DownWindow snapping
super + HArrange windows horizontally
super + VArrange windows vertically
super + shift + HArrange windows stack right
super + shift + LArrange windows stack left
super + shift + JArrange windows stack bottom
super + shift + KArrange windows stack top

Window Manager

KeysAction
ctrl + alt + DeleteQuit fluxbox
ctrl + alt + BackSpaceRestart fluxbox
ctrl + alt + RReconfigure fluxbox

Misc Keys

KeysAction
ctrl + alt + MRun ncmpcpp with album art
ctrl + alt + LTrigger lockscreen
super + PRun colorpicker
super + EscapeRun xkill

Screenshots

Here's few screenshots of Fluxbox desktop. These'll give you an idea of the experience of Fluxbox in Archcraft.

Desktop 1Desktop 2Desktop 3Desktop 4
imgimgimgimg
Desktop 5Desktop 6Desktop 7Desktop 8
imgimgimgimg
Desktop 9Desktop 10Desktop 11Desktop 12
imgimgimgimg

FAQs

How to update my config to new configs?

When a new version of Archcraft Fluxbox get released, And you update the system by sudo pacman -Syu or you update the Fluxbox package by sudo pacman -S archcraft-fluxbox, New config files get installed as ~/.fluxbox_pacnew_YYYY-MM-DD in your home directory.

To use new configs :

  • backup your old ~/.fluxbox directory
  • move ~/.fluxbox_pacnew_YYYY-MM-DD to ~/.fluxbox
  • logout and login again.
How to change GTK theme, icons and cursor?

To change GTK theme, icons and cursor in Fluxbox session, Edit ~/.fluxbox/xsettingsd file and restart Fluxbox to apply the changes.

Net/ThemeName "Arc-Dark"
Net/IconThemeName "Arc-Circle"
Gtk/CursorThemeName "Qogirr"
How to manage multiple monitors and resolution in Fluxbox?

If you use multiple monitors with Fluxbox window manager, you can manage them by running Manager Monitors or archcraft-randr app.

Why Alacritty is not working on my computer?

Since Alacritty is a OpenGL based terminal emulator, It may not work on some computer hardwares. You can make it work on such computers by following these methods :

  1. Open alacritty with LIBGL_ALWAYS_SOFTWARE=1 variable. Edit the keybindings/script launching alacritty and replace alacritty with LIBGL_ALWAYS_SOFTWARE=1 alacritty
  2. Edit /usr/share/applications/Alacritty.desktop desktop file and replace Exec=alacritty with Exec=env LIBGL_ALWAYS_SOFTWARE=1 alacritty