Termite does not work as scratchpad

Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Termite does not work as scratchpad

e.a.gebhart

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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as 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_emulator_factories . 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, <[hidden email]> 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
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad



--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

e.a.gebhart

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 <[hidden email]> writes:

> 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_emulator_factories
> . 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, <[hidden email]> 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
>> [hidden email]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>>
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

Brandon Allbery
On Tue, Oct 10, 2017 at 1:58 PM, <[hidden email]> 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.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

e.a.gebhart

It's part of XMonad.Util.Scratchpad

https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Util-Scratchpad.html

https://hackage.haskell.org/package/xmonad-contrib-0.13/docs/src/XMonad-Util-Scratchpad.html

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 <[hidden email]> writes:

> On Tue, Oct 10, 2017 at 1:58 PM, <[hidden email]> 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.
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

Brandon Allbery
On Wed, Oct 11, 2017 at 1:23 AM, <[hidden email]> 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.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

e.a.gebhart

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 <[hidden email]> writes:

> On Wed, Oct 11, 2017 at 1:23 AM, <[hidden email]> 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.
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Termite does not work as scratchpad

e.a.gebhart

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


[hidden email] 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 <[hidden email]> writes:
>
>> On Wed, Oct 11, 2017 at 1:23 AM, <[hidden email]> 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.
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad