News

subtle: New config format in r2000

Added by Christoph Kappel over 7 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 [[tagging|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:

Hash

 1 COLORS = {
 2   :fg_panel => "#757575" 
 3 }
 4 
 5 TAGS = {
 6   "terms" => "xterm|[u]?rxvt",
 7   "float" => { :regex => "display", :float => true }
 8 
 9 }

DSL

1 color :fg_panel, "#757575" 
2 
3 tag "terms", "xterm|[u]?rxvt" 
4 
5 tag "float" do
6   regex "display" 
7   float true
8 end

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 over 7 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 almost 8 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 almost 8 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 almost 8 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 [[Grabs|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 almost 8 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 about 8 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 [[sublets|sublet]] in Sur has been updated accordingly.

Here is a small example for a new [[sublets|sublet]]:

1 configure :hello_world do |s|
2   s.interval = 120
3 end
4 
5 on :run do |s|
6   s.data = "Hello, World!" 
7 end

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 about 8 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 [[sublets|sublet]] as symbol in one of the two panel arrays in the config.

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

1 PANEL = {
2   :top       => [ :tray, :title, :spacer, :views ],
3   :bottom    => [ :clock, :spacer, :cpu ]
4 }

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

subtle: Window urgency

Added by Christoph Kappel about 8 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.

subtle: New gravity system

Added by Christoph Kappel about 8 years ago

I finally pushed the changes to the gravity system into the repo. It's a bit different and maybe harder to grasp, therefore I also updated the default config and added lots of comments and information into it. The main advantage of the new system is that gravities now can be fully customized in a suitable manner.

Please have a look at the new default config in /etc/xdg/subtle and also be aware that the :size property of tags is now :geometry. Subtler and subtlext have also been updated for the new system.

« Previous 1 2 3 4 5 Next »

Also available in: Atom