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

How do I make Firefox open a private browsing window on another workspace?

asked 2013-11-11 14:52:42 +0000

paramnesioid gravatar image

updated 2013-11-11 14:56:27 +0000

I've figured I can assign a private window to another workspace by loading Firefox with the private window option, but I was wondering if there is a way to do it by selecting the private window option in the Firefox menu.

The private window will always have '(Private Browsing)' on it, so I was wondering if I can get that using regex or something.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
5

answered 2014-01-13 16:19:33 +0000

TonyC gravatar image

Use the for_window command in your config. Whenever a window meets the selection criteria, it will execute the command.

for_window [title=".*\(Private Browsing\).*"] move to workspace "8:Christmas Shopping"
edit flag offensive delete link more
4

answered 2013-11-11 15:14:30 +0000

cee gravatar image

updated 2013-11-11 17:07:29 +0000

You could try something like that:

assign [class="Firefox" title="(?i)Private Browsing"] 5

This should assign any Private Browsing window from Firefox to workspace 5. Of course you can choose any workspace you want.
(?i) will make the regex match case insensitive. Maybe you have to play with the class/title parameters a little.

PS:
xprop (on linux commandline) gives information about the name/class etc. of any given x-window.

edit flag offensive delete link more

Comments

That doesn't work.

paramnesioid gravatar imageparamnesioid ( 2013-11-11 16:07:48 +0000 )edit

What does not work? I edited the answer: s/workspace 5/5/

cee gravatar imagecee ( 2013-11-11 17:05:10 +0000 )edit

Sorry, I should've given you a longer answer. The workspace bit is not the problem. It does work when I change 'title' to 'id' but then it sends normal Firefox windows there too. Maybe I need a more specific regex or is there something else I'm missing?

paramnesioid gravatar imageparamnesioid ( 2013-11-11 23:26:29 +0000 )edit

I don't have firefox installed so I couldn't check my answer. Maybe you could post the output from xprop so we could see the difference between a 'normal' firefox' window and a 'private browsing' one. There's a regex for everything as long as the title is distinctive.

cee gravatar imagecee ( 2013-11-12 07:17:29 +0000 )edit

http://pastebin.com/5HvTKbXS

paramnesioid gravatar imageparamnesioid ( 2013-11-12 11:52:14 +0000 )edit

Did you try again? I am not a regex-guru, but I think it should be matching. (?i) is not necessary. You could try to just match 'Private' (keep class="Firefox") to see if something changes.

cee gravatar imagecee ( 2013-11-14 06:33:40 +0000 )edit

Sorry, it doesn't work. Thanks anyway.

paramnesioid gravatar imageparamnesioid ( 2013-11-15 03:35:17 +0000 )edit

Question Tools

Stats

Asked: 2013-11-11 14:52:42 +0000

Seen: 983 times

Last updated: Jan 13 '14