How to place i3bar on top?

14

3

How can I set i3bar of i3 window manager on top of the screen rather than being placed on its default position, that is bottom.

I tried to examine the ~/.config/i3/config file but couldn't work it out by myself.

user373230

Posted 2016-11-16T16:42:00.973

Reputation:

Answers

26

You need to add position top

bar {
        position top
[original contents of "bar" goes here]
}

After adding this, you will need to refresh which is mod (windows key) + shift + r (unless you have changed it from the default).

devnull

Posted 2016-11-16T16:42:00.973

Reputation: 386

It doesn't work. I added it into config file, it doubled the bar, then I found and added it inside the already existing bar{} it didn't change anything. And I restarted i3 as well. Should I create and add it to another, say i3status or i3bar file, and what is the meaning of the open <snip> tag? I want to know where am I being wrong? – None – 2016-11-16T18:51:58.160

I removed the misadded : and it worked. I'm blaming [tag:CSS] for it :P But my questions are still in power, that is if I could add it into a separate i3bar file, and the meaning of unclosing <snip> tag. – None – 2016-11-16T18:54:45.143

1The snip is just something to show where I deleted out my own config for this post as its not related to the position variable. – devnull – 2016-11-17T09:35:12.220

In addition to answer, related part of the official doc: https://i3wm.org/docs/4.12/userguide.html#i3bar_position

– adem – 2019-09-18T09:39:25.537