[Tutorial] Easy Setup: Endeavour XFCE + i3 tiling window manager

Unless you pre determine and bind an application to a work space ----> terminal for example I believe is setup to always latch on wkspce1 ---- it will always open on your current desktop.

You can change and add all of that within your config file.

1 Like

Appreciate the explanation.

Might be worth mentioning that the custom i3 config invokes its own power manager by default, which will conflict with xfce’s. I fixed it by commenting out this line;

#set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600
1 Like

I will give this an install again shortly and take a look. If this is true, I’ll definitely add it to the tutorial.

You’re saying that by commenting this out, all of the xfce power management tools work correctly??

Thanks for giving this a go, and the feedback!!

2 Likes

I apparently cannot update the initial posting any longer. . . I have added another trick. I have removed blurlock and now use the normal xfce4 screen locker by commenting out blurlock and using xflock4 instead.

# Lock the system
# lock with a picture:
#bindsym $mod+l exec i3lock -i  ~/.config/i3/i3-lock-screen.png -p de>
# lock by blurring the screen:
#bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
#xfce-i3 lockscreen
bindsym $mod+l exec xflock4

I also combined this with the previous posting for power saving.

3 Likes

I have also taken my favorite part of KDE and added it to my i3. I can now use the caps lock button for most of my key bindings (I’m not quite sure why, but it doesn’t seem to work with the kill command - I use mod+shift+x. It does work with mod+shift+2 to move a window though. )

anyway, I followed the guide here:

From that:

Here is the relevant excerpt from my i3 config file, from when I was using just two mod keys:

set $mod Mod4                                                      
set $mod1 Mod1

And here is the xmodmap -pm command output (before repurposing the Caps Lock Key) showing the default assignments for mod1 through mod5:

xmodmap -pm
xmodmap:  up to 5 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock      
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Hyper_L (0x42),  Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

As you can see in the above output, mod3 is empty and mod4, in addition to the Super key, also includes the Hyper key.

The first thing I did was run the following setxkbmap command to change the Caps Lock key to the Hyper key:

setxkbmap -option caps:hyper

This might seem like enough, but it’s not; next a ~/.Xmodmap file needs to be created to clear out the mod4 designations, add the mod3 designation, and then re-add the mod4 designations. Here is the contents of the ~/.Xmodmap file I created:

clear mod4
keycode 66 = Hyper_L NoSymbol Hyper_L
add mod3 = Hyper_L
add mod4 = Super_L Super_R

Note: the keycode for the Caps Lock key can be obtained using the xev command like this:

xev -event keyboard

After creating the .Xmodmap file you either need to restart X or source the .Xmodmap file. Here is the command to source the new file:

xmodmap ~/.Xmodmap

After running that above command, re-running the xmodmap -pm command outputs the following:

xmodmap -pm
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock      
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3        Hyper_L (0x42),  Hyper_L (0xcf)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

As you can see mod4 now only includes Super, and mod3 is no longer empty, but contains Hyper.

Next (since I don’t run a display manager) I added the following to my ~/.xinitrc:

[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap

This will source my custom ~/.Xmodmap file when I run startx.

And the last thing I did was add the following to my i3 config file:

set $mod3 Mod3
exec_always --no-startup-id setxkbmap -option caps:hyper

For clarity, I put the set $mod3 Mod3 line in the same section of the file where I had set $mod and $mod4; and I put the exec –no-startup-id setxkbmap command in the section of the file where I put the programs that I want started when i3 starts up.

3 Likes

What are you changing now? Setting up special fbodymechanic keys?

Yessir. The fbody special - caps locks = super key

Make that boring caps key useful.

Oh wow, this is smart! I started using i3 a few weeks ago, and I am really enthusiastic about it, but I would like to be able to use the XFCE settings app for some config I only do rarely. Like adding a bluetooth device, or tinkering with the audio settings.
Thanks, I am going to give it a try.

Welcome to :enos: forums.

welcome

You should be able to adjust audio properties by clicking the speaker icon on i3 bar. Bluetooth is disabled as a default on EndeavourOS. Enabling it is easy just look it up in the wiki. Then find the commented out part of the config: ~/config/i3/.config and uncomment it then restart i3 (may require you to log out and back in).

I think it would be really helpful if this post is added to the wiki so that it can be updated when needed and easy to access. I have always felt hesitant using tiling window managers but using it along with Xfce which is a more familiar DE will lower the hesitancy for many people like me.

3 Likes

:smiley: I already did a cleanup and removed all comment lines. But I’ll find the default file back somewhere, no problem.

Then there is the ‘problem’ of switching between my headset and the system speakers. But that is a matter of finding out the correct pactl options, I think.

Anyway, this is exactly the reason that this mix of XFCE and i3 is attractive. Especially for beginners of i3. At the other hand… it costs me some more time now, but I learn a lot by investigating how to solve all these things without falling back to XFCE utilities.

3 Likes

With the latest release EndeavourOS_Atlantis_neo-21_5.iso @fbodymechanic have you tried this? Looking to ditch Gnome & try something new again lol.

# Lock the system
# lock with a picture:
#bindsym $mod+l exec i3lock -i  ~/.config/i3/i3-lock-screen.png -p de>
# lock by blurring the screen:
#bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
#xfce-i3 lockscreen
bindsym $mod+l exec xflock4
#set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600

Those the only 2 “New” things to add to the i3 config?

Thanks!

1 Like

Yes. Well, basically - you want to comment out out the power saving from the i3 config to use the xfce power settings.

And then to use the xfce lock screen you will need to bind it with whatever you want - I used mod+l because that’s what i3 lock was using.

But that’s all that’s new from the original post.

I did post how to make your caps lock another meta key - that’s what I use in virtually all DE’s - kde, gnome, mate, (cinammon I think?) . . So I added it here as well.

3 Likes

Thank you For this tutorial. I did this on my laptop last night and then spent hours tinkering with it last night, then ended up liking the results so much I spent half of today doing it to my Desktop (though I didn’t do a fresh install on the desktop I installed xfce and i3 on an already installed system on the desktop but used the i3 config file from my laptop as a starting point) If I had to do them all over again I would do the fresh install method described in this topic.

1 Like