How to install i3wm + mate

Result:

i3 is a tiling window manager inspired by wmii that is primarily targeted at developers and advanced users(vim users).

i3 User's Guide

Installation
  1. Open your terminal.
  2. Install i3:
sudo apt install i3
sudo apt remove dunst
  1. Change your window manager to i3:
dconf write /org/mate/desktop/session/required-components/windowmanager "'i3'"
  1. Prevent desktop with icons to cover your windows:
dconf write /org/mate/desktop/background/show-desktop-icons false
  1. Log out and go back:

Tip: You can use dconf-editor(sudo apt install dconf-editor) to easily change dconf.

How to hide i3bar
  1. Open your i3 config(~/.config/i3/config) and replace(at the end of the config):
bar {
        status_command i3status
}

to:

#bar {
#        status_command i3status
#}
  1. Press SUPER+SHIFT+R:
Installation of picom

picom is a standalone compositor for Xorg, suitable for use with window managers that do not provide compositing. picom is a fork of compton, which is a fork of xcompmgr-dana, which in turn is a fork of xcompmgr.

It's necessary for some mate's desktop effects and to prevent some visual bugs.
Before:
image
After:
image

  1. Install picom:
sudo apt install picom
  1. Add exec --no-startup-id picom to your i3 config(~/.config/i3/config).
  2. Log out and go back.
Disable XDG autostart in i3 config to prevent double applications autostart

Open your i3 config(~/.config/i3/config) and replace:

# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3

to:

# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
#exec --no-startup-id dex --autostart --environment i3
How to change/disable brisk-menu hotkey

If you have WIN as your i3 modifier(SUPER) and brisk-menu as your applet, you will have bad experience with i3wm.

Open your terminal and write to disable:

dconf write /com/solus-project/brisk-menu/hot-key "''"

to change hotkey(<CTRL> - CTRL, <ALT> - ALT, <SHIFT> - SHIFT, <Mod4> - SUPER/WIN):

dconf write /com/solus-project/brisk-menu/hot-key "'<CTRL>P'"

to change to default:

dconf reset /com/solus-project/brisk-menu/hot-key

Tip: You can use dconf-editor(sudo apt install dconf-editor) to easily change dconf.

Fixing i3 border for firefox

Before:


After:

1.

2.

3.

4.

5.

Uninstallation

Open your terminal and paste:

sudo apt purge i3 i3-wm -y
dconf reset /org/mate/desktop/session/required-components/windowmanager
dconf reset /org/mate/desktop/background/show-desktop-icons
mate-session-save --force-logout 

Optional:

[details="How to replace "exit i3" to "exit mate" (log out dialog shortcut)"]

  1. Open your i3 config(~/.config/i3/config) and replace:
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

to:

#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec --no-startup-id "mate-session-save --logout-dialog"

or to(if you want a shut down dialog instead of a log out dialog):

#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec --no-startup-id "mate-session-save --shutdown-dialog"
  1. Press SUPER+SHIFT+R
    [/details]
How to add icons to titlebars
  1. Add for_window [all] title_window_icon padding 1px to your i3 config(~/.config/i3/config).

  2. Press SUPER+SHIFT+R

How to close windows by pressing the middle mouse button(scroll wheel) on i3 title bars
  1. Add bindsym --release --border button2 kill to your i3 config(~/.config/i3/config).

  2. Press SUPER+SHIFT+C

Fixing i3 borders for gnome 3 applications

Before:

After:

  1. Add for_window [window_type="normal"] border normal to your i3 config(~/.config/i3/config):

  2. Press SUPER+SHIFT+R

Ubuntu mate-like theme for i3 borders
  1. Add client.focused #87a556 #5f743c #ffffff #dfef9f #5f743c to your i3 config(~/.config/i3/config).

  2. Press SUPER+SHIFT+R

Bash scripts for switching window managers

How to run a bash script (I use bash SCRIPTNAME.sh)

Ideas how to use it
  1. Attach it to a shortcut ( open Control Center > Keyboard Shortcuts ).
  2. Run a bash script at startup ( open Control Center > Startup Applications ).
  3. Add scripts to your PATH or add aliases of your scripts to your shell config file.
  4. Attach it to mate-panel's launcher.

Switch to default(~/.scripts/switchtodefault.sh):

#!/bin/bash
pkill i3
pkill marco
pkill picom
marco &
disown
dconf reset /org/mate/desktop/session/required-components/windowmanager
dconf reset /org/mate/desktop/background/show-desktop-icons

Switch to i3(~/.scripts/switchtoi3.sh):

#!/bin/bash
killall marco
pkill -9 compiz
pkill i3
i3 &
disown
dconf write /org/mate/desktop/session/required-components/windowmanager "'i3'"
dconf write /org/mate/desktop/background/show-desktop-icons false

Toggle between two window managers(~/.scripts/togglewms.sh):

#!/bin/bash
pgrep i3 && bash ~/.scripts/switchtodefault.sh || bash ~/.scripts/switchtoi3.sh 

Use bash .scripts/togglewms.sh in mate's UI or bash ~/.scripts/togglewms.sh in terminal to toggle between marco and i3wm.

Tip: you can use mate-tweak --layout LAYOUTNAME to switch between mate's desktop layouts.

Useful links
  1. i3-resurrect - A simple but flexible solution to saving and restoring i3 workspaces.

  2. i3wsr - a small program that uses I3's IPC Interface to change the name of a workspace based on its contents.

  3. Application launchers: albert, rofi, synapse.

4 Likes

Welcome @Phantorm to the community!

1 Like

Thanks for this. I use it on all my installs.

I like to use Gnome Web. Mostly because it looks nicer on my Gnome installs. Do you know how I can fix this?

1 Like

Hello, just install picom

3 Likes

I did. I just need to have it start at the beginning. Thank you for the tip.

3 Likes