Assorted tidbits and projects


subtle: More config changes in r2089

Added by Christoph Kappel almost 13 years ago

Over the time the complexity of tag properties steadily increased, it was time for a change. The new format combines regex and match properties and also adds the possibility to add more than one match to a tag.

Old configs are still useable, if there is a regex property found it will be used and a deprecation warning yielded.

Also it is now possible to set window types to tags, so subtle will treat this window as a window of specific type, e.g. as a desktop type window.

Here is a brief overview of the changes:



tag "test1" do
  regex "test1" 
  match [:role]

tag "test2" do
  regex "test2" 
  match [:instance, :class]

tag "test3a" do
  regex "test3a" 

tag "test3b" do
  regex "test3b" 
  match [:name]



tag "test1" do
  match :role => "test1" 

tag "test2" do
  match [:instance, :class] => "test2" 

tag "test3" do
  match "test3a" 
  match :name => "test3b" 


And finally the type works like this:

tag "type" do
  type :desktop

A complete list and updated docs can be found here.

subtle: New config format in r2000

Added by Christoph Kappel almost 13 years ago

Let's talk about the config in subtle:

Currently there are hashes, almost everything is a hash. This brings some benefits, especially for Ruby experts but also can be annoying for more complex things like a tag definition - even for me. On the contrary we have sublets with a fancy DSL so why not adding a DSL for the config too?

In fact there was a longer discussion about this topic in #subtle, there were votes for and votes against it but overall all agreed that there must be something new. After some thinking and talking there was and a consent and here is a comparison of the old and the new config:



  :fg_panel => "#757575" 

TAGS = {
  "terms" => "xterm|[u]?rxvt",
  "float" => { :regex => "display", :float => true }




color :fg_panel, "#757575" 

tag "terms", "xterm|[u]?rxvt" 

tag "float" do
  regex "display" 
  float true


The advantage of the new way should be clear, it's easy and even more readable. Another thing is the new DSL isn't limited to the config, it can also be used in sublets. So what about sublets that bring some own bindings?

Ok, but what does this mean for you?

It means migration from your old config to a new or using the new default config. This can be a annoying task, but to ease this there is a migration script that comes with subtle. It will be installed to /usr/share/subtle/scripts/migrate.rb and can be run like:

ruby /usr/share/subtle/scripts/migrate.rb

This will automatically migrate your config, please make sure with subtle -k that the new config is fine before starting subtle. This script should cover most of the trivial things and create a backup of the older config typically $XDG_CONFIG_HOME/subtle/subtle.rb.old or ~/.config/subtle/subtle.rb.old.

subtle: New hooking system in r1979

Added by Christoph Kappel almost 13 years ago

Before this update there were two different machanisms to use hooks: The hash way in the config and the on :event blocks inside of sublets. To make it easier both ways are merged now: This means that in both config and sublets have the same syntax, besides the order and number of arguments.

The hooks page and the default config have been updated accordingly and show the list of possible hooks with a small description and an example.

subtle: subtle 0.9

Added by Christoph Kappel about 13 years ago

We finally made it to 0.9 after more major changes, this time I moved the icon and color code for sublets into subtlext and fixed some other things. The master plan behind this is to be able colors and icons for Subtlext::Window too.

Sadly this has following consequences for the users: The current sublets aren't useable anymore and need to be upgraded if they use either colors or icons. To your help I added an upgrade function to sur (requires sur-0.2) that reduces this to one command: sur upgrade

Please also note that xft support has been removed again in favor for working multibyte support. The benefit of xft is too small to include this mess.

Sorry for the inconvenience but this is really worth the hazzle!

subtle: Font stuff

Added by Christoph Kappel over 13 years ago

Updates are complete, the latest addition is multibyte and optional xft support. I am well aware that the opinions about xft are very different, I myself don't like antialiased fonts at all.

Including xft was no big deal after all, had only a small impact on the code size and it can be disabled per compiletime.

So everyone can pick what he/she likes.

subtle: Update time

Added by Christoph Kappel over 13 years ago

I finally managed to complete the changes. There are many minor changes which won't affect anything besides improvement of the stability of subtle with sublets and some bugfixes too.

The noteable changes are:

  • Fixed spacer and separator placement in panel
  • New grab to reload sublets on the fly (:SubletsReload)
  • Two new mouse pointer events for sublets (:mouse_over, :mouse_out)
  • Renaming of :click to :mouse_down
  • Subtlext::Window for own custom windows in subtlext
  • Making Subtlext::Subtle a module to avoid instantiating and the hazzle of different calls inside and outside of subtle

subtle: Merry Christmas and a subtle new year!

Added by Christoph Kappel over 13 years ago

The fourth year of subtle - the fourth Christmas - but the first time I would like to thank everyone for using subtle and for the patience. There are some outstanding changes regarding especially subtlext and communication with subtle and one of the newer things will the possibility to create windows with subtlext and show them. I am not sure how much time I will have during the next days, but I am sure you will notice whenever I have some spare time. :)

I wish you and your families some nice Christmas days and a happy New Year's Eve!

subtle: New sublet format

Added by Christoph Kappel over 13 years ago

I postponed this update knowing that this will break existing sublets, but it's really worth the hazzle.

Instead of using the class approach I added a DSL which greatly increases the readability of the sublets. This means that older sublets will not be loaded anymore, but every sublet in Sur has been updated accordingly.

Here is a small example for a new sublet:

configure :hello_world do |s|
  s.interval = 120

on :run do |s| = "Hello, World!" 

Sorry, I hope this will limit the problems due migration, besides the improved readability there are many benefits internal for the code.

subtle: New sublet placement

Added by Christoph Kappel over 13 years ago

The current hg tip (1618) contains a new long awaited feature: Sublets can now be freely placed on both panels, to do so just insert the class name of sublet as symbol in one of the two panel arrays in the config.

So if you have the clock and the cpu sublet loaded you can do something like this:

  :top       => [ :tray, :title, :spacer, :views ],
  :bottom    => [ :clock, :spacer, :cpu ]

There is also the :sublets symbol to catch all unplaced sublets.

subtle: Window urgency

Added by Christoph Kappel over 13 years ago

Today I updated the handling of urgency in subtle, instead of making urgent windows automatically sticky the view and the window will just be highlighted. This only needs two more color options in the default config, please check your current config and add :fg_urgent and :bg_urgent. The default config contains the usual descriptions of this options.


Also available in: Atom