1

I have a lock-screen script that I wish to execute upon a key combination such as Ctrl+L, but cannot seem to bind the script to the key combination.

Is such a thing possible? I gave the script a global alias 'lock' which runs fine from the shell.

This is what I have in my config file:

bindsym Ctrl+l exec lock

I refreshed the i3 environment after changing the config file. Is it because it's not running from a terminal?

2

First of all you can check ~/.xsession-errors for any errors in i3wm. In your case there probably will be that one:

/bin/sh: 1: lock: not found

Which means that you have defined your alias in config file which is not sourced when launching i3wm instance.

So here you can move your alias command to separate script and change config to:

bindsym Ctrl+l exec /full_path_to_script/lock

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.