Some people use the i3 window manager because they want a minimalistic environment and don’t want to run a full desktop. But I am stuck in between wanting a nice GUI design and something distraction-free and efficient to work. That’s why I decided to use i3 to replace only XFCE‘s window manager, xfwm, while keeping all the nice XFCE components.
Getting it to work
If you launch an i3 session and then launch xfce4-desktop
, you will find that the whole XFCE desktop shows up, along with its panels.
There are two ways of combining i3 with the XFCE components. One is to use the XFCE session manager to prevent the desktop and the panels to launch—which is useful if you want to use i3 all the time. But, if you want to be able to alternate between the regular XFCE session and the one with i3 as a window manager, you will need to launch the components separately.
Alternative one: creating a new XFCE session without the unnecesary components
Before starting the i3 session, you will need to open the session manager from the XFCE configuration, go into the Session tab, find xfce4-panel and xfdesktop, and on the last tab select Never. Then you should open your .i3/config
file and add a line containing exec xfce4-session
. After that, log out and log back in selecting the i3 session.
Now, if you ever want to get your regular XFCE desktop back, you will need to reverse that by going to the session manager, enabling those components back, and logging in with the XFCE session.
Alternative two: launching the components separately
This will allow you to select between both environments when you log in, being able to alternate between them without modifying settings each time (what I wanted to do). We need to be able to launch all the useful components, like the settings manager, the power manager and so on, but without the main GUI.
The components we want to launch are:
- xfconfd
- xfsettingsd
- xfce4-volumed
- xfce4-power-manager
- xscreensaver (with the -nosplash flag so that it doesn’t display a big splash window when i3 loads).
In order to do this, you will need to edit your .i3/config
file and add the following lines:
#XFCE4 components
exec xfconfd
exec xfsettingsd
exec xfce4-volumed
exec xfce4-power-manager
exec xscreensaver -nosplash
xfce4-terminal
To ease the transition and avoid having to choose a brand new terminal, I configured i3 to use xfce4-terminal as its default terminal emulator.
I use the following entry to launch it:
bindsym $mod+Return exec xfce4-terminal --hide-menubar --show-borders
That makes the terminal not show the display menus, saving precious screen real estate.
Wallpaper
Since xfdesktop is not running anymore, you won’t be able to change wallpapers from the XFCE settings. However, there is a simple program called Nitrogen that will allow you to select a wallpaper using a graphical interface.
To have the wallpaper loaded at start, you have to add the line nitrogen --restore
to i3’s config file.