Project

General

Profile

unexist.dev

Assorted tidbits and projects

News

subtle: Long hibernation

Added by Christoph Kappel about 1 month ago

This project had a rather long hibernation, due to the fact that I was kind of forced to switch to mac work-wise and hadn't had any other personal machine.

This changed recently and behold - I am back on subtle and enjoy every second on it!

Since a lot has changed when I started this project there are going to some changes of the code-style and some overdues fixes for e.g. compatibility to upstream Ruby versions. I already fixed sur/surserver and sublets can be fetched again.

So stay tuned!

subtle: Server and redmine

Added by Christoph Kappel about 6 years ago

It was about time to update all the stuff here and while doing that I also moved it to a different server.

The overall process was a bit bothersome, since most of the software used including redmine was fairly outdated and migration of database entries is usually a mess and after a bit of a struggle I manually copied the data.

So far everything is looking good, just some minor notes:

  • Password hashing changed and you have to reset your password in order to log in
  • FAQ is missing and will probably be replaced by a simple wiki page
  • Layout is a bit weird - porting changes is always fun

If there are any problems just let me know.

subtle: Necromancy

Added by Christoph Kappel over 6 years ago

Well, looks like I couldn't keep the promise of the last news, but I recently found some time and joy to tinker with subtle again. There are still some things I'd like to change, but never nagged me enough to get my hands dirty again.

Apart from that, there are some uncommited changes like the virtual screen handling code and a bit overhaul of the panel configuration.

I've already added a new hook (client_rename) to make tagging of clients easier: Tagging is mostly based on client WM_NAME / WM_CLASS properties and some clients like Spotify tend to set or change them after the first mapping. Hooks to the rescue: This hook fires, when the WM_NAME property changes and can be used to trigger a re-tagging.

subtle: subtle isn't dead yet! (1 comment)

Added by Christoph Kappel over 10 years ago

Hey,

if anyone noticed, I couldn't make it to this year's FrOSCon, I rather spent the time sick in bed, so I hope you enjoyed it even without a subtle booth.

I took quite a long break from development, toying around with some Android ideas and dealing with some nasty project deadlines. Nevertheless, the project isn't dead yet, I actively use it daily and I am still very pleased and still want to go on.

There are some features that currently aren't pushed like virtual screen splitting, but I am eager to make them available once I finished the styling thing I have in my mind.

So be patient with me.

subtle: Spawn now belongs to Subtlext::Client

Added by Christoph Kappel over 11 years ago

TL;DR: I moved the .spawn method to the clients module so update subtle AND subtle-contrib

Previously the .spawn method belonged to Subtlext::Subtle, which was fine until I changed it to return a valid client object that is backed with some light event caching to make it useful for e.g. the launcher. Since it returns a real object I think it should belong to Subtlext::Client, end of story.

Edit: This change also breaks the scratchpad snippet, so make sure to change Subtlext::Subtle.spawn to Subtlext::Client.spawn in your config.

subtle: Tags with logic

Added by Christoph Kappel almost 12 years ago

Sometimes it can be pretty nasty to add tags, when you just need something stupid to move a certain window to a view. That can be done with a loop, but that also adds lots of tags and there cannot be more than 32 of them.

An easy way to bypass this is to add logic to tags and act differently for certain clients. The latest version of subtle extends the properties with on_match. This can be used to add a Ruby proc to a tag that is called whenever the tag is applied.

The tagging page already contains a simple example, here is a more complex one that I use in my config to tag GIMP windows:


Old way:

tag "gimp_image" do
  match    role: "gimp-image-window" 
  gravity  :gimp_image
end

tag "gimp_toolbox" do
  match    role: "gimp-toolbox$" 
  gravity  :gimp_toolbox
end

tag "gimp_dock" do
  match    role: "gimp-dock" 
  gravity  :gimp_dock
end

tag "gimp_scum" do
  match role: "gimp-.*|screenshot" 
end


New way:

tag "gimp" do
  match role: "gimp-.*" 

  on_match do |c|
    c.gravity = ("gimp_" + c.role.split("-")[1]).to_sym
  end
end

Both basically just sets the gravity of the matching client.

subtle: Separator and styles revamped (3 comments)

Added by Christoph Kappel over 12 years ago

According to my plan, to combine styling options ultimately in the styles it is now time to move the separator. A nice side effect, is that this allows different separators for views, sublets and the panel in case you ever wanted to do that.

Another change is the removal of the unoccupied style, it made no sense at all, TBH. Unoccupied views are just views and this is probably not worth a special state. Just make sure to think twice what values are inherited now and which one you need to overwrite. (Joy of inheritance)

TL;DR: You need to update your config, again. Move the separator config option to the separator style like this:

{{column(:start)}}

# Separator between sublets
set :separator, "|" 

# Style for separator
style :separator do
  foreground  "#757575" 
end

{{column(:mid)}}

# Style for separator
style :separator do
  foreground  "#757575" 
  separator   "|" 
end

{{column(:end)}}

Move the properties from the unoccupied style to the views style:

{{column(:start)}}

# Style for the views
style :views do

  # Style for the active views
  style :focus do
    foreground  "#fecf35" 
  end

  # Style for urgent window titles and views
  style :urgent do
    foreground  "#ff9800" 
  end

  # Style for occupied views (views with clients)
  style :occupied do
    foreground  "#b8b8b8" 
  end

  # Style for unoccupied views (views without clients)
  style :unoccupied do
    foreground  "#757575" 
  end
end

{{column(:mid)}}

# Style for the views
style :views do
  foreground  "#757575" 

  # Style for the active views
  style :focus do
    foreground  "#fecf35" 
  end

  # Style for urgent window titles and views
  style :urgent do
    foreground  "#ff9800" 
  end

  # Style for occupied views (views with clients)
  style :occupied do
    foreground  "#b8b8b8" 
  end
end

{{column(:end)}}

{{warn(The separator option and the unoccupied style have been removed, check for deprecation warnings)}}

(1-10/52)

Also available in: Atom