Living on Linux

My i3 config: Part two

In my previous post about my i3 configuration, I got the the first few lines explained. Let's keep going in this post!

Bindings galore!

I have a ton... well it sometimes feels like a ton of bindings I use. I use them in conjunction with a script I wrote, which enables me to either go to the application I tried to launch -if it is running- or launch it if it is not. I'll dive deeper into this at a later point. The next few lines help in explaining this a little more.

$1+1    workspace 1
$1+2 workspace 2
$1+3 workspace 3
$1+d $5 ferdi
$1+e $5 geary

So lines one to three will use the "$1" variable as explained in the previous post, to use the i3 binding to set "bindsym Mod4" plus the added number, to switch to a selected workspace.

One thing to note here is that anything can be set as a variable. If you, for instance want to make sure "exec" is always run as "exec --no-startup-id", you could set it up as a variable. I have. It's the "set $2" in the previous post

The fourth and fifth one are different. They add the $5, which would mean "exec --no-startup-id bin/SwitchLaunch", which calls a script that checks if the next parameter, ("ferdi" for line 4, or "geary" for line 5) is either running or not running. If it's running, it will switch to the desktop that's running the application, or when it's not, it will launch the application.

All of the other following lines use this same principle. Either switch to, or launch an application. How this script works, I'll get to in the next post.

My config has about 50 lines of bindings. Some to start an application and some to manage my system, like full-screening an application, or turning up the volume. I won't go over all of them, because that would be nonsense.

Auto starting applications

From line 78 to 88 you'll find my auto starts. These are all the applications, commands and scripts I want to be launched when my system starts.

$6 autotiling
$6 batsignal -b -i
$6 picom --config ~/.config/picom/picom.conf
$2 dunst
$6 feh --bg-scale ~/Pictures/mountain.jpg
$2 xset r rate 200 60
$2 unclutter -b
$2 bin/TrackpadOff
$2 parcellite -d -n
$2 nm-applet
$2 setxkbmap -option caps:none

I'll quickly go through these:

The bar

And finally, at the end we have the bar configuration.

bar {
status_command i3status
output eDP1
i3bar_command i3bar --transparency
workspace_buttons no
position bottom
mode dock
colors {
background #00000000
tray_output primary

I will not go through and explain what any of this does, as the i3 documentation does an excellent job at that already, so please have a look at that.