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

Dropdown Terminal in i3

asked 2013-08-25 18:49:45 +0000

KJ44 gravatar image

updated 2013-08-25 18:57:49 +0000

I have been banging my head against the wall with this, so I thought I'd share what worked for me.

In the latest version of i3, moving a program to the scratchpad resizes the floating window to 75% of screen height and 50% of screen width.

I like the Yakuake drop down terminal emulator from KDE. It plays tricks to act as a drop down; one specifies the desired window size and it persists. If I use Yakuake with i3 and the scratchpad, resizing therefore doesn't work as expected, the effect is to crop the window.

Here's how I avoided the resize/crop issue: 'autostart-yakuake' is a script that uses DBUS to set up the Yakuake tabs with e.g. an emacs server and a couple of emacs clients.

exec --no-startup-id autostart-yakuake
for_window [instance="yakuake"] move scratchpad 
bindsym Print [instance="yakuake"] scratchpad show, fullscreen

So, a question - could we have an option to not resize scratchpad windows please?

edit retag flag offensive close merge delete

4 answers

Sort by » oldest newest most voted
4

answered 2013-09-29 16:59:07 +0000

lompy gravatar image

updated 2013-09-29 20:13:29 +0000

If it's still actual there were resemble question faq.i3wm.org/question/2598/cant-auto-move-float-scratchpad-windows/. In the answer move command is issued, but you can also use resize. For example my dropdown Urxvt config:

## quick terminal
exec --no-startup-id urxvt -name metask
for_window [instance="metask"] floating enable;
for_window [instance="metask"] move scratchpad; [instance="metask"] scratchpad show; move position 0px 22px; resize shrink height 300px; resize grow width 683px; move scratchpad
bindsym $mod+t [instance="metask"] scratchpad show

With that I always have terminal launched in scratchpad binded to Alt+T, positiond just beneath my system tray and resized to fit full screen width on my 1366 x 768 laptop monitor.

edit flag offensive delete link more

Comments

Excellent, thanks for sharing your solution!

joepd gravatar imagejoepd ( 2013-09-29 19:31:32 +0000 )edit

@lompy why do you need "move scratchpad" twice? can't you just resize and then move to scratchpad?

yoav gravatar imageyoav ( 2013-09-30 15:28:06 +0000 )edit

@yoav, you can read answer and comments in faq.i3wm.org/question/2598/cant-auto-move-float-scratchpad-windows/ . Without that we can't move and resize autoloaded scratchpad floating windows. You would have to move to scratchpad manually. Also can applay mensioned patch which I don't know how to do.

lompy gravatar imagelompy ( 2013-09-30 16:15:25 +0000 )edit

I've got this working with Terminator, thanks lompy.

KJ44 gravatar imageKJ44 ( 2014-02-26 19:18:43 +0000 )edit
0

answered 2013-09-29 17:39:17 +0000

For anyone who passes size values with their urxvtc window creation as I do I found that by passing the resize values of 10px it maintains those values pre-selected when you created your urxvtc instance.

edit flag offensive delete link more
0

answered 2013-08-27 06:52:34 +0000

Michael gravatar image

Not resizing scratchpad windows should be the default if you send a floating window to scratchpad. I don’t remember if the patch actually made it into i3 (check the source) or if somebody still needs to send one :).

edit flag offensive delete link more

Comments

I'm new to all this, but for me the bug crept in between 4.5.1 (no problem) and 4.6; I looked at the git changes and it looks like the following bugfix expects the window to be resized 50%W and 75%H. http://code.stapelberg.de/git/i3/commit/?id=1f8a860744e6abf4d660634d14775f17c73b6e99

KJ44 gravatar imageKJ44 ( 2013-08-27 17:26:14 +0000 )edit

I should add, that the resize happens when I do 'move scratchpad'; if I do 'scratchpad show' and then resize manually, the window size persists as I set it no matter how many times I subsequently hide/show it with `scratchpad show'.

KJ44 gravatar imageKJ44 ( 2013-08-27 17:30:51 +0000 )edit
0

answered 2014-02-26 19:22:15 +0000

KJ44 gravatar image

updated 2014-02-26 19:25:47 +0000

exec --no-startup-id terminator -l KJ
for_window [instance="terminator"] floating enable, move scratchpad, scratchpad show;
for_window [instance="terminator"] resize grow left 300, resize grow right 300, resize grow down 200, resize grow up 200, move scratchpad;
bindsym Control+Menu  [instance="terminator"] scratchpad show
bindsym Control+Print [instance="terminator"] scratchpad show

The above is a tested solution for Terminator.

Note the '-l KJ' used to load a profile. Terminator lets you define the number of tabs, their names, and the command to run in each tab. In that regard it is easier than using DBUS to achieve similar results with Yakuake

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-08-25 18:49:45 +0000

Seen: 3,440 times

Last updated: Feb 26 '14