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

How to set the new_window property for cherry-picked applications?

asked 2015-05-09 01:20:28 +0000

msx gravatar image

updated 2015-05-09 01:22:28 +0000

I use:

new_window 1pixel

As the default setting for border style. However for some applications that I use in floating mode I would like to have the window title shown, specially when working over messy windows in the background. I tried for example:

for_window [class="Emacs"] new_window normal
for_window [class="Copyq"] new_window normal

But it doesn't works. Is there a way I can set specific applications (preferably by their window classes, as title will vary) to show the title bar while keeping the rest honoring the global settings?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-05-10 01:38:41 +0000

drak3 gravatar image

take a look at this. it works for me if i put both:

new_window 1pixel
new_float normal

in my config, though like the docs say, it only works for windows starting out floating. launching something and making it floating doesn't seem to work.

edit flag offensive delete link more

Comments

So the man pages are useful after all? Just kidding, somehow I missed that. Works perfectly, thank you!

msx gravatar imagemsx ( 2015-05-10 20:00:43 +0000 )edit

np. I don't recall that being there before either. maybe it was updated somewhat recently?

drak3 gravatar imagedrak3 ( 2015-05-10 20:42:35 +0000 )edit

Can't tell @drak3 as I'm very new to i3wm. I'm currently running 4.9.something, however I plan to switch to i3-gaps 4.10.x soon :)

msx gravatar imagemsx ( 2015-05-10 21:50:37 +0000 )edit
0

answered 2015-05-11 07:37:40 +0000

Adaephon gravatar image

The issue here is that new_window is a configuration option and for_window expects a command. The command to change the border style is border.

So, in order to set the normal border style only for some applications, you want to use:

for_window [class="Emacs"] border normal
for_window [class="Copyq"] border normal

This will set the border of any (floating or tiled) window that matches the criteria. So Emacs will have a normal border even if it is tiled. But in contrast to the new_float option this will work even if the window does not start out as floating.

As you mentioned, that you use these applications in floating mode, you can even combine setting the border style with sending the window to the floating layer:

for_window [class="Emacs"] floating enable, border normal
for_window [class="Copyq"] floating enable, border normal

If you want to have certain windows to have another border style only when floating or if you want all floating windows to have the same border style (but differnt from tiled windows), you'll have to use i3's IPC interface and listen to window events sent when a window transitions from tiled to floating or vice versa.

edit flag offensive delete link more

Comments

Can't thank you enough for your thorough and kind reply, still I will try a lucky shot: thank you!

msx gravatar imagemsx ( 2015-05-15 01:05:44 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-09 01:20:28 +0000

Seen: 163 times

Last updated: May 11