[cwm] ability to autogroup kbfunc_menu_ssh clients

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

[cwm] ability to autogroup kbfunc_menu_ssh clients

Julien Steinhauser
Hello, I'm a heavy autogroup user and this is how I let clients
launched with kbfunc_menu_ssh comply with autogroup rules.

I'd love that or any other way to autogroup kbfunc_menu_ssh clients
to go mainline.

Regards,
Julien


Index: kbfunc.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v
retrieving revision 1.149
diff -u -p -r1.149 kbfunc.c
--- kbfunc.c 14 Jul 2017 18:01:46 -0000 1.149
+++ kbfunc.c 6 Nov 2017 20:05:49 -0000
@@ -646,7 +646,8 @@ menu:
     search_match_text, search_print_text)) != NULL) {
  if (mi->text[0] == '\0')
  goto out;
- l = snprintf(path, sizeof(path), "%s -T '[ssh] %s' -e ssh %s",
+ l = snprintf(path, sizeof(path),
+    "%s -class 'Ssh' -T '[ssh] %s' -e ssh %s",
     cmd->path, mi->text, mi->text);
  if (l == -1 || l >= sizeof(path))
  goto out;

Reply | Threaded
Open this post in threaded view
|

Re: [cwm] ability to autogroup kbfunc_menu_ssh clients

Julien Steinhauser
Please disregard previous mail:
https://marc.info/?l=openbsd-misc&m=151000897902424&w=2

The patch in there would break any terminal emulator which does not use
"-class" to set a class. Rereading the man page, I now see it is easy
to achieve the same behaviour from ~/.cwmrc:

        command term "xterm -class Ssh"

and override the binding with

        bind-key CM-Return xterm

so that every single terminal emulator spawned via the default shortcut
does not get a 'Ssh' class

Sorry for the noise.