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

hide status bar for particular workspace

asked 2014-02-19 12:20:20 +0000

onorua gravatar image

Is there any way/workaround to hide status bar for the particular workspace and keep it for the the rest? I was looking at the different bar configurations, but for the moment without much success. Maybe you could suggest the best approach for it? Thank you in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-02-19 13:46:21 +0000

Adaephon gravatar image

There are no configuration option to define per-workspace behaviour on the bar.

But there is the bar mode command which allows changing the display mode of the bar(s) during runtime. Also, the i3 IPC has events for workspace changes, so you could change visbility of the bar every time you enter or leave the workspace in question.

Here is a simple prototype using i3-py:

#!/usr/bin/env python

import i3
def wsch(e, d, s):
    if e['change'] == 'focus' and e['current']['name'] == 'special ws':
        i3.bar('mode', 'invisible')
    else:
        i3.bar('mode', 'dock')

s = i3.Subscription(wsch, 'workspace')

This will make the bar invisible every time you go to special ws and make it docked if you go anywhere else.

edit flag offensive delete link more

Comments

Thank you very much! I'll give it a try

onorua gravatar imageonorua ( 2014-02-20 10:31:13 +0000 )edit

An UnicodeDecodeError shows up only when I move to a NEW workspace. Meaning if I press $mod+5 when workspace 5 is not already present and is created by my pressing $mod+5. Also, I have replaced "special ws" by "1" in your script since I want it hidden only on workspace 1. It should work ,right?

saQi gravatar imagesaQi ( 2015-08-25 19:50:56 +0000 )edit

Changing the name should be no Problem. I can confirm the error, but it seems to originate form the i3-py library. Unfortunately it has not been updated for some years, so it may not be fully compatible with newer i3 versions. Perhaps another library works better: http://i3wm.org/docs/ipc.html

Adaephon gravatar imageAdaephon ( 2015-08-26 11:12:19 +0000 )edit

Question Tools

Stats

Asked: 2014-02-19 12:20:20 +0000

Seen: 827 times

Last updated: Feb 19 '14