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

scratchpads not working with st terminal #212

Open
aldevv opened this issue Jun 26, 2023 · 2 comments
Open

scratchpads not working with st terminal #212

aldevv opened this issue Jun 26, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@aldevv
Copy link

aldevv commented Jun 26, 2023

I have the following code in a default awesome wm config:

local term_scratch = bling.module.scratchpad:new {
  -- command                 = "alacritty --class spad",
  command                 = "st -c spad",
  rule                    = { instance = "spad" },
  sticky                  = false,
  autoclose               = false,
  floating                = true,
  geometry                = { x = 560, y = 240, height = 600, width = 800 },
  reapply                 = true,
  dont_focus_before_close = true,
}

local scratchpads = {
  awful.key({ modkey, }, "c", function()
    term_scratch:toggle()
  end, { description = "show mai scratchz", group = "awesome" })

}

and I add it to my keybindings like this:

globalkeys = gears.table.join(
  scratchpads[1],
  awful.key({ modkey, }, "s", hotkeys_popup.show_help,
  ...

the issue is that each time I press the keybinding a new terminal is opened instead of toggling the same terminal, i tested with alacritty and is working as expected, checked with xprop and the class in st is set correctly.

@Nooo37
Copy link
Member

Nooo37 commented Jun 30, 2023

-c sets the class name of st and not the instance name. Using -c the instance name keeps being "st-256color" or whatever.

You will have to make st change its instance name or you have to change the rule to match the class attribute instead.

@Nooo37 Nooo37 added the help wanted Extra attention is needed label Jun 30, 2023
@tsukki9696
Copy link

didn't wanna necrobump this, but for anyone with having the same issue you can set the name of the instance by passing the -n flag like this:

local spad = bling.module.scratchpad {
    command = "st -c spad -n spad",
    ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants