The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

How do I get to my ubuntu system settings in i3?

asked 2013-11-03 00:50:04 +0000

mandatory gravatar image

So I'm really loving i3! I moved to it from Cinnamon because I was sick of it never working with my laptop (plus I love being efficient!)

My real question is how can I get to the system settings? I want to turn off my touchpad/do other things with no way of doing so. My fn+key doesn't work any longer in i3 - can't find anything in the guide.

Any help is appreciated?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2013-11-04 09:52:33 +0000

Adaephon gravatar image

In your case [Fn]+<key> seems to send keycodes like any other key and some service inside cinnamon catches them and just does The Right Thing™. (On some laptops the [Fn]+<key> combinations act on a hardware-level and can change (hardware) settings without cooperation of the operating system (display brightness, volume, touchpad activation, etc.))


You could probably find out, which part of Cinnamon does that, and start it together with i3. But if you have problems with Cinnamon, chances are this will be affected, too. Also, you'll probably need to have loads of dependencies just for that part to work and that's anything but efficient.


A cleaner solution is to find out the keycodes, look for some command line program that does what you want and set up bindcode <keycode> exec <program> settings in your i3 configuration.

You can use xev -event keyboard to find out what keycodes and keysyms are generated by the [Fn]+<key> combinations (Most of the time [Fn] just changes the keycodes sent by the keyboard on a hardware level and does not send a keycode on it's own.) You need to start xev from a terminal, any key you press while the xev window is focused, will be logged to the terminal.

This is the output for the Help-key on my keyboard:

KeyRelease event, serial 28, synthetic NO, window 0x3e00001,
    root 0x25a, subw 0x0, time 1206988602, (107,235), root:(2898,668),
    state 0x0, keycode 146 (keysym 0xff6a, Help), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

The important information is on the third line: the keycode is 146, the keysym is 'Help'.

For your touchpad you can use xinput (from the package of the same name). xinput list gives you a list of your input devices. With xinput disable <device> you can turn a device of. You can use the name or the id (just the number without 'id=') for <device>, but I'd strongly suggest using the name, as the ID may change between restarts and when plugging in other devices. With xinput enable <device> you can turn it back on (BTW, this does not work if you turn of your keyboard ;-) )

So you could put this in your config:

bindsym Mod4+Shift+t exec --no-startup-id xinput disable 'Touchpad'
bindsym Mod4+t exec --no-startup-id xinput enable 'Touchpad'

[Win]+[Shift]+t turns the device named 'Touchpad' of, [Win]+t turns it back on. --no-startup-id prevents i3 from waiting for a window (see here).

As for the "do other things" part of your question, depending on the kind of other thing you can probably find the answer somewhere in this FAQ.

For volume control, for example, I suggest having a look at this Question. The highlighted answer (from Michael on Apr 7 '13) works well for me on Ubuntu 13.10.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-11-03 00:50:04 +0000

Seen: 2,248 times

Last updated: Nov 04 '13