sunaku / wmiirc

Ruby configuration for WMII window manager
ISC License
82 stars 26 forks source link

Name of first tag #12

Closed adityam closed 13 years ago

adityam commented 14 years ago

Hi,

Right now, the first tag is named "1". Can you add a feature so that the name of the default tag can be changed in config.yaml?

Thanks, Aditya

nougad commented 14 years ago

It's probably not the best way to do this but it works:

script:
  - after: |
      focus_view "DEFAULT"
      fs.lbar.clear
      tags.each {|t| event 'CreateTag', t } 
      event 'FocusTag', "DEFAULT"
sunaku commented 14 years ago

We need to take care of clients that may already exist (started in xinitrc or from a previous wmii session---recovering from a wmii crash) when wmii has started. So a simpler solution might be to move all clients from tag 1 to the desired default tag.

The downside is that we may lose the exact arrangement of clients as a result of this move. But perhaps the solution to issue #3 can solve this side-effect as well.

adityam commented 14 years ago

Is it possible to just rename a tag? That might be useful independently.

sunaku commented 14 years ago

wmii does not support tag renaming at present. We have to move all clients from to the new tag name:

View.new(1).clients.each {|c| c.tag "THE NEW TAG"; c.untag 1 }
adityam commented 14 years ago

Hmm.. this means that we loose the exact arrangement, so this has the same drawback as nougad's solution. The advantage is that it will take care of the clients started by xinitrc etc.

sunaku commented 14 years ago

Correct. There is no way to perfectly preserve the exact arrangement via scripting right now. The perfect solution would be to hack wmii and add a tag renaming action so that everything is preserved intact.

sunaku commented 13 years ago

Closing this issue because there is (currently) no clean way to rename the initial tag while preserving the arrangement of pre-existing clients.