Adding I3Lock to Config File

Adding I3Lock to Config File

I want to created a shortcut for locking my screen. Normally I lock my screen by typing the following in the terminal

i3lock -c 000000

I try adding to my config file by doing following but nothing works

  1. copy copy /etc/i3/config to ~/.i3/config
  2. $ vim .i3/config
  3. scroll down and add following line to file: bindsym Mod1+l i3lock -c 000000. I also tried variants such as bindsym Mod1+l exec i3lock -c 000000 and bindsym Mod1+l exec "i3lock -c 000000"
  4. Save file
  5. Reload i3 with Mod1+Shift+R
  6. Try login out with shortcut Mod1+l but it doesn't work. In fact Mod1+l simply change focus of my window to another window.
1

1 Answer

It turns out in addition to having the ~/.i3/config file, I also had a ~/.config/i3/config file. So even though I was editing ~/.i3/config, the system was not seeing my changes. So I went ahead and deleted ~/.config/i3/config. Now it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.