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

Open window as a scratchpad

asked 2012-12-31 17:11:26 +0000

bacardi55 gravatar image

Hi,

I'm trying to create a web app to handle my i3 configurations to autostart all the windows i need in the workspace I want. This app let me create several configs (home, work) in which i put all my workspaces (from my i3/config file, there will be a feature to autoread it) and then i set all the clients per workspace. I'm at the very early stage of this app, the code is dirty but it kinda works.

I did the web app (configs are save in a yaml file), and i did a cli php app (sorry, I'm a php dev ^^) to load the wanted configuration and launch your app in the right workspace. This works for now, so i just need to run a script and all my clients open where they belongs.

I now that i can do some similar stuff with the i3/config file but i didn't manage to do what i wanted. Plus i want to be able to manage several configs and manage splits and layout to really be able to run a script at startup and be ready to work.

At this point, the feature I'd like to add is the ability to open client as a scratchpad. Unfortunatly, I didn't find a way to open a client and setting it as a scratchpad with i3-msg.

Is there any way to do something like that with i3-msg (or smth else but not the config file) ?

Thanks for your help

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-01-02 18:45:37 +0000

Michael gravatar image

There are multiple ways to move a window to the scratchpad:

  1. Use for_window in the i3 config file with the "move scratchpad" command, e.g. for_window [class="URxvt" instance="cmus"] move scratchpad (untested). Obviously this requires you to find out unique criteria to match the specific window and it needs to be configured before you launch the application.
  2. Figure out the window’s ID and send a command with i3-msg, e.g. i3-msg '[con_id="0x12345678"] move scratchpad'after parsing the layout tree, see http://i3wm.org/docs/ipc.html
edit flag offensive delete link more

Comments

The command is 'move window to scratchpad' (without ticks), like: for_window [class="Emacs"] move window to scratchpad. Thanks for your answer @Michael, helped me search in the right direction.

msx gravatar imagemsx ( 2015-04-11 02:21:58 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2012-12-31 17:11:26 +0000

Seen: 2,844 times

Last updated: Jan 02 '13