Skip to content

Instantly share code, notes, and snippets.

@TheRealJunior
Created February 2, 2020 21:17
Show Gist options
  • Save TheRealJunior/810c1573216c88d4fa74d33c76a463b1 to your computer and use it in GitHub Desktop.
Save TheRealJunior/810c1573216c88d4fa74d33c76a463b1 to your computer and use it in GitHub Desktop.
i3 window manager

dmenu_run wasn't working for me. googling a bit this worked: ➜ ~ LC_ALL=en_US.UTF-8 dmenu_run

when i did dmenu_run without it i had a warning called no locale support, that solved it

@TheRealJunior
Copy link
Author

. Configuring i3
This is where the real fun begins ;-). Most things are very dependent on your ideal working environment so we can’t make reasonable defaults for them.

While not using a programming language for the configuration, i3 stays quite flexible in regards to the things you usually want your window manager to do.

For example, you can configure bindings to jump to specific windows, you can set specific applications to start on specific workspaces, you can automatically start applications, you can change the colors of i3, and you can bind your keys to do useful things.

To change the configuration of i3, copy /etc/i3/config to ~/.i3/config (or ~/.config/i3/config if you like the XDG directory scheme) and edit it with a text editor.

On first start (and on all following starts, unless you have a configuration file), i3 will offer you to create a configuration file. You can tell the wizard to use either Alt (Mod1) or Windows (Mod4) as modifier in the config file. Also, the created config file will use the key symbols of your current keyboard layout. To start the wizard, use the command i3-config-wizard. Please note that you must not have ~/.i3/config, otherwise the wizard will exit.

Since i3 4.0, a new configuration format is used. i3 will try to automatically detect the format version of a config file based on a few different keywords, but if you want to make sure that your config is read with the new format, include the following line in your config file:

@TheRealJunior
Copy link
Author

to reset config
i3-config-wizard

@TheRealJunior
Copy link
Author

to set windows as mod key set $mod Mod4

@TheRealJunior
Copy link
Author

resize mod $mod + R

@TheRealJunior
Copy link
Author

bindsym $mod+Shift+x exec i3lock --colour=ff66cc

lock screen

@TheRealJunior
Copy link
Author

@TheRealJunior
Copy link
Author

enable floating mode for all XTerm windows

for_window [class="XTerm"] floating enable

Make all urxvts use a 1-pixel border:

for_window [class="urxvt"] border pixel 1

A less useful, but rather funny example:

makes the window floating as soon as I change

directory to ~/work

for_window [title="x200: ~/work"] floating enable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment