Termite does not work as scratchpad

Hello, I am interested in using the Termite terminal as my scratchpad but it doesn't actually work as a scratchpad and I'm wondering why. It seems unable to float. Gnome terminal has the same behavior for me and apparently Termite uses the same foundation as Gnome terminal. So I'm wondering if it is a short coming of the terminal or if there is something I can do to make it work. Has anyone got this working ? Thanks, Eric

Can you show how you're configuring the scratchpad?
In general, terminals --- especially the VTE-based ones --- have extra
"gotchas" as described at
https://wiki.haskell.org/Xmonad/General_xmonad.hs_config_tips#Terminal_emula...
. It takes some care to both get the scratchpad to behave *and* not have
every terminal be thought a scratchpad.
On Sun, Oct 8, 2017 at 10:01 AM,
Hello,
I am interested in using the Termite terminal as my scratchpad but it doesn't actually work as a scratchpad and I'm wondering why.
It seems unable to float. Gnome terminal has the same behavior for me and apparently Termite uses the same foundation as Gnome terminal.
So I'm wondering if it is a short coming of the terminal or if there is something I can do to make it work.
Has anyone got this working ?
Thanks,
Eric _______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

That's interesting. I don't see a --disable-factory option for
termite. I don't have gnome terminal installed at the moment to see
what it's options are.
Sure. Here's what I have. I'm used both named scratchpad and
scratchpad. I set myTerminal to urxvt which works fine.
If I set it to Termite it acts very strangely.
urxvt is currently hard coded for the regular scratchpad but it acts the
same way if I change it to termite.
scratchpadSize = W.RationalRect (1/4) (1/4) (1/3) (3/7)
mySPFloat = customFloating scratchpadSize
-- with a flexible location.
flexScratchpadSize dx dy = W.RationalRect (dx) (dy) (1/3) (3/7)
flexFloatSP dx dy = customFloating (flexScratchpadSize dx dy)
scratchpads =
[ NS "term" (myTerminal ++ " -title term") (title =? "term") (flexFloatSP (1/10) (1/10))
, NS "term2" (myTerminal ++ " -title term2") (title =? "term2") (flexFloatSP (1/3) (1/10))
, NS "ghci" (myTerminal ++ " -e ghci") (title =? "ghci") (flexFloatSP (2/3) (1/10))
--, NS "sync" (myTerminal ++ " -e sy") (title =? "sy") (flexFloatSP (1/10) (2/3))
, NS "top" (myTerminal ++ " -e htop") (title =? "htop") (flexFloatSP (1/4) (1/4))
, NS "calc" (myTerminal ++ " -e bc") (title =? "bc") (flexFloatSP (1/4) (1/4))
]
scratchToggle a = namedScratchpadAction scratchpads a >> bringMouse
namedScratchpadsKeymap = -- Scratch Pads
[ ("o", scratchToggle "term") -- Term
, ("e", scratchToggle "term2") -- Term2
, ("g", scratchToggle "ghci") -- ghci
, ("c", scratchToggle "calc") -- calc
, ("t", scratchToggle "top") -- top
, ("k", scratchToggle "mkb") -- matchbox Keyboard
, ("n", scratchpadSpawnActionTerminal "urxvt -background rgba:0000/0000/0200/c800") -- scratchpad
]
Brandon Allbery
Can you show how you're configuring the scratchpad?
In general, terminals --- especially the VTE-based ones --- have extra "gotchas" as described at https://wiki.haskell.org/Xmonad/General_xmonad.hs_config_tips#Terminal_emula... . It takes some care to both get the scratchpad to behave *and* not have every terminal be thought a scratchpad.
On Sun, Oct 8, 2017 at 10:01 AM,
wrote: Hello,
I am interested in using the Termite terminal as my scratchpad but it doesn't actually work as a scratchpad and I'm wondering why.
It seems unable to float. Gnome terminal has the same behavior for me and apparently Termite uses the same foundation as Gnome terminal.
So I'm wondering if it is a short coming of the terminal or if there is something I can do to make it work.
Has anyone got this working ?
Thanks,
Eric _______________________________________________ xmonad mailing list xmonad@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

On Tue, Oct 10, 2017 at 1:58 PM,
Sure. Here's what I have. I'm used both named scratchpad and scratchpad. I set myTerminal to urxvt which works fine. If I set it to Termite it acts very strangely.
xterm and urxvt have a -e option which takes a program to run. termite / VTE-based terminals usually call this option -x, and -e means something subtly different.
, ("n", scratchpadSpawnActionTerminal "urxvt -background rgba:0000/0000/0200/c800") -- scratchpad
Uhhh... can we see namedScratchpadActionTerminal? Beuase if it's what I think it is, it's your problem. You just wanted a normal scratchpad, or a program running in a scratchpad terminal like the other ones you have defined; but the definitions I've seen in the past for namedScratchpadActionTerminal (generally taken from someone else's config; it's not standard) will open a default terminal as the scatchpad, passing to it with -e a command to run urxvt which will *not* be taken as a scratchpad. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

It's part of XMonad.Util.Scratchpad
https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Util-Scr...
https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/src/XMonad-Util...
The named scratchpads don't work with termite either. A couple of them
are just terminals with a shell.
Termite uses -e for exec. So that's ok.
Eric
Brandon Allbery
On Tue, Oct 10, 2017 at 1:58 PM,
wrote: Sure. Here's what I have. I'm used both named scratchpad and scratchpad. I set myTerminal to urxvt which works fine. If I set it to Termite it acts very strangely.
xterm and urxvt have a -e option which takes a program to run. termite / VTE-based terminals usually call this option -x, and -e means something subtly different.
, ("n", scratchpadSpawnActionTerminal "urxvt -background rgba:0000/0000/0200/c800") -- scratchpad
Uhhh... can we see namedScratchpadActionTerminal? Beuase if it's what I think it is, it's your problem. You just wanted a normal scratchpad, or a program running in a scratchpad terminal like the other ones you have defined; but the definitions I've seen in the past for namedScratchpadActionTerminal (generally taken from someone else's config; it's not standard) will open a default terminal as the scatchpad, passing to it with -e a command to run urxvt which will *not* be taken as a scratchpad.

On Wed, Oct 11, 2017 at 1:23 AM,
It's part of XMonad.Util.Scratchpad
Now I have to wonder if my browser is broken; I even did a search on the page to make sure.... In any case, the description confirms my suspicion: you do not want to use that here. The purpose of that action is to allow you to more easily run as a scratchpad something that requires a terminal --- not to use the terminal itself as a scratchpad. Use the normal scratchpadSpawnAction for that. In fact, you might want to use scratchpadSpawnActionTerminal for the other actions instead of this one. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

It doesn't seem to make any difference which call I use. It doesn't work
either way. It works both ways with urxvt.
All the other calls are actually using named scratchpad, and those calls
are the same as all the examples I've been able to find.
Here's one example. https://pbrisbin.com/posts/scratchpad_everything/
Eric
Brandon Allbery
On Wed, Oct 11, 2017 at 1:23 AM,
wrote: It's part of XMonad.Util.Scratchpad
Now I have to wonder if my browser is broken; I even did a search on the page to make sure....
In any case, the description confirms my suspicion: you do not want to use that here. The purpose of that action is to allow you to more easily run as a scratchpad something that requires a terminal --- not to use the terminal itself as a scratchpad. Use the normal scratchpadSpawnAction for that. In fact, you might want to use scratchpadSpawnActionTerminal for the other actions instead of this one.

I found the problem. It was actually really simple. urxvt takes a -title argument. termite takes a --title argument. My find function was (title =? "term"). That would fail so that the window was not recognized as a scratchpad. Adding the '-' and putting --title on the -e variants fixed all of my named scratchpads. Eric e.a.gebhart@gmail.com writes:
It doesn't seem to make any difference which call I use. It doesn't work either way. It works both ways with urxvt.
All the other calls are actually using named scratchpad, and those calls are the same as all the examples I've been able to find.
Here's one example. https://pbrisbin.com/posts/scratchpad_everything/
Eric
Brandon Allbery
writes: On Wed, Oct 11, 2017 at 1:23 AM,
wrote: It's part of XMonad.Util.Scratchpad
Now I have to wonder if my browser is broken; I even did a search on the page to make sure....
In any case, the description confirms my suspicion: you do not want to use that here. The purpose of that action is to allow you to more easily run as a scratchpad something that requires a terminal --- not to use the terminal itself as a scratchpad. Use the normal scratchpadSpawnAction for that. In fact, you might want to use scratchpadSpawnActionTerminal for the other actions instead of this one.
participants (2)
-
Brandon Allbery
-
e.a.gebhart@gmail.com