Project

General

Profile

unexist.dev

Assorted tidbits and projects

matching a instance-name

Added by Siggi Dünkel over 13 years ago

Hi there,
i have a gravity called 'right70', and i have grab that starts a console with an instance-name ("urxvt -name right-term").
The idea is to build a quickstarter for an urxvt-instance, which starts with my "right70"-gravity additional to a normal urxvt-starter. I thought the configuration-code for it would be that:

#define the gravity
gravity :right70, [30, 0, 70, 100]

#define the grab
grab "W-C-d", "urxvt -name rightterm" 

#construct tag to match instance-name and push to right70-grav.
tag "right-term" do
  match instance: "right-term" 
  gravity :right70
end

#define the standard-urxvt-tag
tag "terms", "urxvt" 

But it doesnt do its job, urxvt is started with 100% of width and height.


Replies (3)

RE: matching a instance-name - Added by Christoph Kappel over 13 years ago

Hi,

you need to consider two things:

  1. Tags only set a gravity for a tagged view
  2. The -name option just changes the instance name of urxvt, it retains the 'URxvt' class name and will therefore still match the terms tag.

Here's how to do what you have in mind:

{{hide}}# Just use the instance name for matching
tag "terms" do
  match instance: "urxvt" 
end

# Create a view that displays clients tagged either with terms or right-term
view "terms", "terms|right-term" 

RE: matching a instance-name - Added by Siggi Dünkel over 13 years ago

Wow, you are in turbo-mode. This does its job perfectly, thx a lot.

RE: matching a instance-name - Added by Christoph Kappel over 13 years ago

Heh, glad I could and yw.

    (1-3/3)