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

Display dmenu inside i3bar, ideas?

asked 2012-09-16 16:28:49 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

Hello everybody,

scanf here with another question. So, I thought it would be cool to have dmenu display its text inside i3bar, instead of in a separate window (the stripe that comes up on top, I'm guessing that is an X window). I thought about it for a while, but found no obvious solution.

This is the "best" idea I has thus far:

  1. Bind $mod+d to enter dmenu_mode.
  2. In this mode, key presses write to a file, how I need to figure out yet (I would avoid binding every character key to a command).
  3. Meanwhile, a program which more or less replicates dmenu reads that file and produces a dmenu-like output, which is sent to i3bar.
  4. When the enter key is pressed, a special character is printed to the file, which signals the dmenu-like program to executes whatever it needs and clear the file. Pressing enter also makes us leave dmenu_mode.

First: any simpler solutions? Second: could it work?

Thanks in advance, Scanf

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2012-09-18 10:13:44 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

Ugh, why would you even want that?

  1. You are correct, the thing dmenu opens is an X11 window. Please consider that many GUI elements of toolkits such as GTK or Qt are also windows, and using one less window for dmenu is not going to make anything faster or more efficient.
  2. If it’s only for the visual effect, why don’t you just overlay dmenu over i3bar? You can change dmenu’s position and colors.
edit flag offensive delete link more

Comments

It is just for the visual effect. My convoluted approach was to avoid the dmenu window covering i3bar, which is again only for visual reasons. I have too much time on my hands... Anyway. I think I'll do as you suggest and try to constrain the dmenu window into the unused space of i3bar. Thanks

scanf gravatar imagescanf ( 2012-09-18 11:31:19 +0000 )edit

Question Tools

Stats

Asked: 2012-09-16 16:28:49 +0000

Seen: 725 times

Last updated: Sep 18 '12