News

Icons, colors and dynamic

Added by Christoph Kappel over 6 years ago

The current devel version (r2429) brings more changes to the config, sorry.

Icons

The first, harmless thing is an addition to the icons: Before, only X BitMaps were allowed, but it's possible to use X PixMaps now, too. subtle can detect the file type and handle it accordingly. This doesn't sound like a big improvement and generally besides colors there isn't a big difference between bitmaps and pixmaps at all, icons can just be colorful.

Colors

In case you just updated and the current active client (title) is black on black, this is caused by another color change:

Old color names

1 #
2 #
3 #
4 
5 color :panel_bg,     "#757575" 
6 color :panel_bg,     "#202020" 

 

*>
*>
*>

=>
=>

New color names

1 color :title_fg,     "#fecf35" 
2 color :title_bg,     "#202020" 
3 color :title_border, "#303030" 
4 
5 color :stipple,      "#757575" 
6 color :panel,        "#202020" 

Dynamic

Welcome back, old and controversial feature - views can be dynamic again:

Numbers: on /off1 view "dynamic" do
2   match   "xterm" 
3   icon    "icon.xpm" 
4   dynamic true
5 end

Panel padding and icons

Added by Christoph Kappel over 6 years ago

The latest changes (r2400) just bring a bit more eyecandy to subtle.

Padding

It's now possible to set the padding of the panel, additionally to the font size. This new option is named padding, the former padding option to reserve screenspace for e.g. additional panels was renamed to strut.

The order of padding values is: left, right, top, bottom

Icons

Also view buttons can now contain a pixmap icon, it basically uses the rendering of sublets and has therefore only a tiny overhead for users that don't need it. Views with icons can be defined in a similar way like properties in tags:

Numbers: on /off1 view "terms" do
2   match "terms" 
3   icon  "/usr/share/icons/icon.xbm" 
4 end

More colors

Added by Christoph Kappel over 6 years ago

The color names in subtle were a bit messy and without further explanation probably difficult to understand. r2260 comes with renamed color names, different border colors for every panel item and a new color for occupied views.

Occupied views are views with at least one visible client.

Here are the changes of the colors of the default color scheme:

Old color names

 1 color :fg_focus,      "#fecf35" 
 2 color :bg_focus,      "#202020" 
 3 #
 4 
 5 color :fg_urgent,     "#FF9800" 
 6 color :bg_urgent,     "#202020" 
 7 #
 8 
 9 #
10 #
11 #
12 
13 color :fg_views,      "#757575" 
14 color :bg_views,      "#202020" 
15 #
16 
17 color :fg_sublets,    "#757575" 
18 color :bg_sublets,    "#202020" 
19 #
20 
21 color :fg_panel,      "#757575" 
22 color :bg_panel,      "#202020" 
23 
24 color :border_focus,  "#303030" 
25 color :border_normal, "#202020" 
26 
27 color :border_panel,  "#303030" 
28 
29 color :background,    "#3d3d3d" 
30 color :separator,     "#757575" 

 

=>
=>
*>

=>
=>
*>

*>
*>
*>

=>
=>
*>

=>
=>
*>

=>
=>

=>
=>

<=

==
==

New color names

 1 color :focus_fg,         "#fecf35" 
 2 color :focus_bg,         "#202020" 
 3 color :focus_border,     "#303030" 
 4 
 5 color :urgent_fg,        "#ff9800" 
 6 color :urgent_bg,        "#202020" 
 7 color :urgent_border,    "#303030" 
 8 
 9 color :occupied_fg,      "#feb435" 
10 color :occupied_bg,      "#202020" 
11 color :occupied_border,  "#303030" 
12 
13 color :views_fg,         "#757575" 
14 color :views_bg,         "#202020" 
15 color :views_border,     "#303030" 
16 
17 color :sublets_fg,       "#757575" 
18 color :sublets_bg,       "#202020" 
19 color :sublets_border,   "#303030" 
20 
21 color :panel_fg,        "#757575" 
22 color :panel_bg,        "#202020" 
23 
24 color :client_active,   "#303030" 
25 color :client_inactive, "#202020" 
26 
27 #
28 
29 color :background,      "#3d3d3d" 
30 color :separator,       "#75757" 

Grabs in sublets

Added by Christoph Kappel almost 7 years ago

After a rewrite (r2204) of the ruby handling inside of subtle, sublets can now use grabs too. The syntax is almost the same as for grabs inside of the config. Please be aware that there is no checking for duplicates, the last one wins.

Here is a short example:

Numbers: on /off1 configure :grabby do |s|
2   s.interval = 5
3 end
4 
5 grab "A-b" do |s, c|
6   puts "sublet name: %s" % [ s.name ]
7   puts "pressed on : %s" % [ c.name ]
8 end

New multihead handling

Added by Christoph Kappel almost 7 years ago

Multihead

subtle finally has a proper screen handling, instead of using a hacky screen placement via tag properties, subtle displays a view per screen now. This also requires a more decent way to configure panel, because there are two panel per screen. The new config option comes in the usual DSL style:

Numbers: on /off1 screen 1 do
2   stipple false
3   top     [ :views, :title, :spacer, :tray, :sublets ]
4   bottom  [ ]
5 end

Due the changes in the handling of screens, the :WindowScreen grab and the screen property of tags are now obsolete.

The panel wiki page has been updated accordingly.

Dynamic views

Dynamic views have been removed from subtle, because the use of them is questionable and the overhead in the code just not acceptable.

Exclude match

Tags support exclude matching now, that means it's possible to exclude a certain window from getting this tag.

Numbers: on /off1 tag "exclude" do
2   match   "urxvt" 
3   exclude :instance => "irssi" 
4 end

The tagging wiki page has been updated accordingly.

SubtletsReload and SubtleReload

The complex panel layout makes it impossible to reload just the sublets, reload the config reloads the sublets anyway and therefore SubletsReload is obsolete.

Escape key

Added by Christoph Kappel almost 7 years ago

With r2166 there comes another way of defining grabs: The escape key.

Normally we would just add grabs with chains like grab "A-b", "urxvt" to get something that responds to a press of Alt-b. The drawback of this is that we need many different modifiers like using control, super etc. and we are probably limiting or even disturbing other programs and allows the usage of easier binds.

Now with the escape key we have a way to set a grab that needs to be pressed before any other grab can be used.

1 grab "C-y", :SubtleEscape
2 grab "Return", "urxvt" 
3 grab "n", :ViewNext
4 grab "b", :ViewPrev

This is optional and per default commented out, the docs of the wiki and the default config have been updated accordingly.

Configuration of sublets

Added by Christoph Kappel almost 7 years ago

Until now configuring a sublet was a silly task, you had to open the sublet itself and update the code. This changes with r2148: I've added a new DSL command that allows configuring of a sublet from the main config of subtle.

1 sublet :clock do
2   interval       30
3   format_string  "%H:%S" 
4 end

Currently there are only two sublets that support this new mechanism, but I will update my sublets asap. I will also add some more details in the notes section of the sublet to make it a b it easier to find what can be changed.

subtle and sur

Added by Christoph Kappel almost 7 years ago

Started as a side project sur evolved to be really useful over the time. There is no reason for sur to be a standalone package, only subtle users will install it anyway. I merged both packages in r2142 and updated some minor things that were of concern.

More config changes in r2089

Added by Christoph Kappel almost 7 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:

Old

 1 tag "test1" do
 2   regex "test1" 
 3   match [:role]
 4 end
 5 
 6 tag "test2" do
 7   regex "test2" 
 8   match [:instance, :class]
 9 end
10 
11 tag "test3a" do
12   regex "test3a" 
13 end
14 
15 tag "test3b" do
16   regex "test3b" 
17   match [:name]
18 end

New

 1 tag "test1" do
 2   match :role => "test1" 
 3 end
 4 
 5 tag "test2" do
 6   match [:instance, :class] => "test2" 
 7 end
 8 
 9 tag "test3" do
10   match "test3a" 
11   match :name => "test3b" 
12 end

And finally the type works like this:

1 tag "type" do
2   type :desktop
3 end

A complete list and updated docs can be found here.

New config format in r2000

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

« Previous 1 2 3 4 5 Next »

Also available in: Atom