Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util.quake: how to toggle Alacritty when class_id is not set #536

Closed
lpanebr opened this issue Jul 10, 2022 · 3 comments
Closed

util.quake: how to toggle Alacritty when class_id is not set #536

lpanebr opened this issue Jul 10, 2022 · 3 comments
Labels

Comments

@lpanebr
Copy link

lpanebr commented Jul 10, 2022

I have two quake definitions and corresponding bindings:

  awful.key({ modkey, }, "v", function () qvolume:toggle() end),
  awful.key({ modkey }, "t", function () qtext:toggle() end),

Problem:

  1. The spad_volume works perfectly toggling
  2. The TextScratchpad opens but instead of closing it opens other instances.

Definitions:

local qvolume = lain.util.quake(
  {
    app = "alacritty",
    name = "spad_volume",
    argname = "-t volume",
    extra = "-o font.size=10 -e pulsemixer",
    followtag = true,
  }
)
local qtext = lain.util.quake(
  {
    app = "alacritty",
    name = "TextScratchpad",
    argname = "-t TextScratchpad",
    extra = "--working-directory /tmp/ -o font.size=8 -e nvim /tmp/tmp.txt",
    followtag = true,
  }
)

What am I missing?

Versions:

 > awesome -v
awesome v4.3 (Too long)
 • Compiled against Lua 5.3.3 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.6
 • LGI version: 0.9.2

~/tmp
> lua -v
zsh: permission denied: lua

It could be the "permission denied" but everything else works...

@lcpz
Copy link
Owner

lcpz commented Jul 11, 2022

In the second case, Alacritty is ignoring your name. You can solve it like this:

local qtext = lain.util.quake {
    app       = "alacritty",
    name      = "TextScratchpad",
    argname   = "-t TextScratchpad",
    extra     = "--class TextScratchpad --working-directory /tmp/ -o font.size=8 -e nvim /tmp/tmp.txt",
    followtag = true
}

A less verbose variant:

local qtext = lain.util.quake {
    app       = "alacritty",
    name      = "Alacritty",
    argname   = "",
    extra     = "-o font.size=8 -e nvim /tmp/tmp.txt",
    followtag = true
}

EDIT: Added a note to the wiki.

@lcpz lcpz changed the title quake binding opens another instance instead of toggling it util.quake: how to toggle Alacritty when class_id is not set Jul 11, 2022
@lpanebr
Copy link
Author

lpanebr commented Jul 11, 2022 via email

@lcpz lcpz closed this as completed Jul 11, 2022
@lcpz lcpz added the question label Jul 11, 2022
@lpanebr
Copy link
Author

lpanebr commented Aug 15, 2022

Hello. I've just updated my system and now the client is opening a new instance instead of toggling it.
Very few apps were updated, but alacritty is among them.

> sudo nala history info 2
======================================================================================================
 Upgraded
======================================================================================================
  Package:                          Old Version:          New Version:                         Size:
  alacritty                         0.10.1+1-20220721T02  0.10.1+1-20220814T02                1.8 MB
                                    0155~focal-ed4614d0   0338~focal-5549e9eb
  brave-browser                     1.41.100              1.42.88                           100.3 MB
  code                              1.69.2-1658162013     1.70.1-1660113095                  85.2 MB
  containerd.io                     1.6.6-1               1.6.7-1                            28.1 MB
  gh                                2.14.2                2.14.4                              8.1 MB
  gir1.2-javascriptcoregtk-4.0      2.36.4-0ubuntu0.20.0  2.36.6-0ubuntu0.20.0                 29 KB
                                    4.1                   4.1
  gir1.2-webkit2-4.0                2.36.4-0ubuntu0.20.0  2.36.6-0ubuntu0.20.0                 80 KB
                                    4.1                   4.1
  google-chrome-stable              103.0.5060.134-1      104.0.5112.79-1                    89.6 MB
  libgstreamer-plugins-bad1.0-0     1.16.2-2.1ubuntu1     1.16.3-0ubuntu1                     325 KB
  libjavascriptcoregtk-4.0-18       2.36.4-0ubuntu0.20.0  2.36.6-0ubuntu0.20.0                6.2 MB
                                    4.1                   4.1
  libnetplan0                       0.104-0ubuntu2~20.04  0.104-0ubuntu2~20.04                 82 KB
                                    .1                    .2
  libwebkit2gtk-4.0-37              2.36.4-0ubuntu0.20.0  2.36.6-0ubuntu0.20.0               15.2 MB
                                    4.1                   4.1
  linux-firmware                    1.187.32              1.187.33                          124.9 MB
  nala-legacy                       0.10.0                0.11.0                             12.1 MB
  netplan.io                        0.104-0ubuntu2~20.04  0.104-0ubuntu2~20.04                 88 KB
                                    .1                    .2

======================================================================================================

To try debugging I've left only this definition and tried changing things but nothing works:

local qVolume = lain.util.quake {
    app = "alacritty",
    name = "Volume",
    argname = "-t Volume",
    extra = "--class Volume -o font.size=10 -e pulsemixer",
    height = 0.3,
  }

What could it be? How may I debug this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants