You are not logged in.

#376 2012-03-12 11:22:58

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: subtle - another tiling window manager

<WARNING> Unknown option `:font'
<WARNING> Unknown option `:font'
<WARNING> Unknown option `:separator'

It seems you're using the old conf file, did you copy over the the new subtle.rb from /etc/xdg/subtle/subtle.rb?

For example, this is how fonts are defined:

style :all do
  ...
  font	      "xft:Termsyn:pixelsize=12"
  #font        "-*-*-*-*-*-*-14-*-*-*-*-*-*-*"
  ...
end

There are some fair differences between the mercurial version and community regarding the conf file syntax. Have a look at the better, more complete wiki on Subtle: http://subforge.org/projects/subtle/wiki

Last edited by Earnestly (2012-03-12 11:24:44)

Offline

#377 2012-03-12 12:34:43

farben.rausch
Member
Registered: 2011-10-25
Posts: 16

Re: subtle - another tiling window manager

ok, thx, didn't see the different config. smile now subtle-hg running.

still I am not able to tag skype the way I want. I only got this information from skype:

farben.rausch wrote:

Chat window:

 xprop 
WM_NAME(STRING) = "usr|blabla - Skype Chat"
WM_CLASS(STRING) = "skype", "Skype"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0x12000a2
		window id # of group leader: 0x1200008
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 0, 16
		program specified location: 0, 16
		user specified size: 1119 by 876
		program specified size: 1119 by 876
		program specified minimum size: 500 by 300
		window gravity: NorthWest

and contact list

xprop 
WM_NAME(STRING) = "myusername - Skype (Beta)"
WM_CLASS(STRING) = "skype", "Skype"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0x1200012
		window id # of group leader: 0x1200008
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 0, 16
		program specified location: 0, 16
		user specified size: 1436 by 880
		program specified size: 1436 by 880
		program specified minimum size: 240 by 198
		window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = "myhostname"
WM_COMMAND(STRING) = { "skype" }

subtler -cl gives me

subtler -cl
...
 0x160008a - 0    0 x   16 + 1436 + 880        center ------ skype (Skype) //which one is chat?
...
 0x160000f - 0    0 x   16 + 1436 + 880        center ------ skype (Skype) //which one is contact list? ^^
....

What did not work so far:

#Skype
tag "skype_chat" do
  match :name => "*Chat"
  gravity :left75
  float false
end
tag "skype_main" do
  match :name => "myusername*"
  gravity :right25
  float false
end

view "skype" do
  match "skype_.*"
  dynamic true
end

Problem: Skype showing on default view with default gravity
changing view to:

view "skype" do
  match "skype_*"
  dynamic true
end

Problem: Skype showing on default view with default gravity
or
changing tag to

tag "skype_chat" do
  match "*Chat"
  gravity :left75
  float false
end

Problem: Skype showing on default view with default gravity
did not work.

1.: I was able to get skype off my term-view with a simple tag (tag "skype","skype"), which I added at the skype-view (match "skype_.*|skype"), to the desired view, but arranging it the way I want does still not work sad
2.: Closing skype with "C-q" crashes subtle and puts me back to slim.
Edit: Right klick and quit on Skype-Icon in task bar => crash. "sudo kill <processid>" works.
Starting skype via "skypetab-ng" results in an immediate crash

any guesses?

Last edited by farben.rausch (2012-03-12 12:40:37)

Offline

#378 2012-03-12 12:41:54

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

farben.rausch wrote:

Does this Error keep me from starting subtle?
"<ERROR> Cannot find a font definition for style `title'"
I am pretty sure I did not have it with subtle 0.10.3008. And what about this warnings?

Yep, <ERROR> is always fatal. You need to define a title style, check the default config in /etc/xdg/subtle for more info.

Offline

#379 2012-03-14 14:38:06

foggy
Member
Registered: 2012-01-25
Posts: 31

Re: subtle - another tiling window manager

I'm experiencing a weird bug with the tasks sublet (I know the author is probably not around here smile) and roxterm (I know the author is  proba... yea). If roxterm closes, it does not immediately disappear from the task list, I have to change to another view first to trigger it. All other applications seem to work fine, as far as I can tell.

Anyone an idea why this happens? Could it be a bug in subtle (or the sublet)? Roxterm works just fine with other WMs.

Offline

#380 2012-03-14 14:43:33

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

foggy wrote:

I'm experiencing a weird bug with the tasks sublet (I know the author is probably not around here smile) and roxterm (I know the author is  proba... yea). If roxterm closes, it does not immediately disappear from the task list, I have to change to another view first to trigger it. All other applications seem to work fine, as far as I can tell.

Well, I am the author of that sublet so I can prolly help here. wink

foggy wrote:

Anyone an idea why this happens? Could it be a bug in subtle (or the sublet)? Roxterm works just fine with other WMs.

That depends what roxterm actually does and the program itself works in subtle, otherwise you wouldn't use it right? Normally, when you close a window there's either an unmap or a delete event and subtle and the sublet get a callback to handle that. For subtle it means to unmanage the window, the sublet just has to re-read the client list and there might be race condition here. Need to check that myself, later.

Offline

#381 2012-04-03 20:55:08

foggy
Member
Registered: 2012-01-25
Posts: 31

Re: subtle - another tiling window manager

Just noticed I didn't answer smile

unexist wrote:

Well, I am the author of that sublet so I can prolly help here. wink

Now that is fortunate smile

the program itself works in subtle, otherwise you wouldn't use it right?

Yep, roxterm itself works flawlessly with subtle.

Need to check that myself, later.

Any news on this?

If you need more info about my system, tell me.

Offline

#382 2012-04-04 09:42:22

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

foggy wrote:

Any news on this?

If you need more info about my system, tell me.

Ah no, I am a bit busy lately and still need to check that, could you please add a ticket so won't forget it again?

Offline

#383 2012-04-04 10:40:50

foggy
Member
Registered: 2012-01-25
Posts: 31

Re: subtle - another tiling window manager

unexist wrote:

could you please add a ticket so won't forget it again?

Sure, no problem.

Offline

#384 2012-04-04 13:42:53

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

Hi I'm using subtle for the first time and have got it working well in my vm apart from some issues, my wallpaper will continually disappear after a reboot and i have to set it again.  On a related note I'm using Nitrogen and also have to set the folder that it looks in to find a background.

Was wondering if anyone would know what was happening?


meh

Offline

#385 2012-04-04 13:52:28

foggy
Member
Registered: 2012-01-25
Posts: 31

Re: subtle - another tiling window manager

chamber wrote:

Hi I'm using subtle for the first time and have got it working well in my vm apart from some issues, my wallpaper will continually disappear after a reboot and i have to set it again.  On a related note I'm using Nitrogen and also have to set the folder that it looks in to find a background.

Was wondering if anyone would know what was happening?


Im not using nitrogen, but subtle itself will not set your wallpaper. If nitrogen is not automagically restoring your wallpaper when subtle is (re)launching, then it will be gone. You need to write a script that sets your wallpaper and that is executed e.g. in your .xinitrc every time X/subtle starts.

Offline

#386 2012-04-04 14:09:09

bratmaxe
Member
From: Germany
Registered: 2010-11-07
Posts: 71

Re: subtle - another tiling window manager

I'm not using subtle at the moment, but there is a setting in subtle.rb which sets a background color.

# Style for subtle
style :subtle do
  margin      0, 0, 0, 0
  panel       "#202020"
  background  "#3d3d3d"
  stipple     "#757575"
end

Remove the background line from the above, then it should work.

Offline

#387 2012-04-04 14:23:28

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

bratmaxe wrote:

I'm not using subtle at the moment, but there is a setting in subtle.rb which sets a background color.

# Style for subtle
style :subtle do
  margin      0, 0, 0, 0
  panel       "#202020"
  background  "#3d3d3d"
  stipple     "#757575"
end

Remove the background line from the above, then it should work.

Hi,

I removed the background line but the background is now just black.

foggy wrote:

Im not using nitrogen, but subtle itself will not set your wallpaper. If nitrogen is not automagically restoring your wallpaper when subtle is (re)launching, then it will be gone. You need to write a script that sets your wallpaper and that is executed e.g. in your .xinitrc every time X/subtle starts.

Currently I am using nitrogen --restore & in my .xinitrc, would you mind saying how you handle your background?


meh

Offline

#388 2012-04-04 14:54:19

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

Got it working, used feh and set that to run in my .xinitrc.  I also realised that nitrogen would have worked if I hadn't been half asleep when setting it up and should have added it's entry ABOVE the exec subtle.  :goes off to bang head off wall and perhaps get some sleep:

Thanks


meh

Offline

#389 2012-05-13 22:04:14

kens
Member
Registered: 2011-11-11
Posts: 29

Re: subtle - another tiling window manager

Does anyone know why the borderless property doesn't work? I have this in my subtle.rb:

tag "browser" do
  match  "uzbl|opera|firefox|navigator|chromium"
  borderless true
end

# ...

view "www",   "browser"

But Chromium still has space around the edges and I can't push the mouse to the very top edge of the screen and click on a tab because of the tiny border. Any fix?

Offline

#390 2012-05-13 22:09:24

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

kens wrote:

But Chromium still has space around the edges and I can't push the mouse to the very top edge of the screen and click on a tab because of the tiny border. Any fix?

Hum, can you post a screenshot? subtle doesn't limit movement of the pointer to that sounds pretty odd. Is the space in the color of the client border?

Offline

#391 2012-05-13 22:22:20

kens
Member
Registered: 2011-11-11
Posts: 29

Re: subtle - another tiling window manager

Looks like I fixed it somehow, not sure how though... it fixed itself big_smile By the way unexist, I don't know if you wrote subtle but if you did, THANK YOU, subtle is simply the best, it's awesome.

Offline

#392 2012-05-13 22:27:02

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

kens wrote:

Looks like I fixed it somehow, not sure how though... it fixed itself big_smile By the way unexist, I don't know if you wrote subtle but if you did, THANK YOU, subtle is simply the best, it's awesome.

Heh, that always the best problems. wink

Nice to hear and yep, I am the developer of subtle, you are welcome.

Offline

#393 2012-05-14 17:13:45

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

I'm having an issue with my laptop. I just got it back after having the graphics card re flowed and am now abe to use the built in broadcom wireless as opposed to the realtek usb that I was using.  An unusual by product of this is that the weather_mod sublet now continually displays Connection Error even though I am connected to my wireless and able to go online update etc.  Restarting subtle doesn't help it.

└──>>iwconfig
lo        no wireless extensions.

eth1      IEEE 802.11abg  ESSID:"Sunnydale"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 94:44:52:41:62:00   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
eth0      no wireless extensions.

Anyone ever seen this?


meh

Offline

#394 2012-05-14 18:02:08

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

chamber wrote:
└──>>iwconfig
lo        no wireless extensions.

eth1      IEEE 802.11abg  ESSID:"Sunnydale"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 94:44:52:41:62:00   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          
eth0      no wireless extensions.

Hum, you are sure that you are online, although there is no info about the link quality or the Rx/Tx values int he output of iwconfig?

Offline

#395 2012-05-14 18:04:17

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

unexist wrote:

Hum, you are sure that you are online, although there is no info about the link quality or the Rx/Tx values int he output of iwconfig?

Browsing and replying at the minute and there's no wires attched. Sure makes me think I'm connected over the wireless


meh

Offline

#396 2012-05-14 18:06:22

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

chamber wrote:

Browsing and replying at the minute and there's no wires attched. Sure makes me think I'm connected over the wireless

Heh well, I am not the author of this particular sublet, so I cannot really say something here without having a look at the code.

Offline

#397 2012-05-14 18:12:23

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

# Weather sublet file
# Created with sur-0.2

require 'rexml/document'
require 'open-uri'
require 'iconv'

configure :weather_mod do |s|
    s.interval = s.config[:interval] || 7200
    
    s.locale = s.config[:locale] || 'en'
    s.units = s.config[:units] == 'c' ? { :unit => 'c', :cmp => 'SI' } : { :unit => 'f', :cmp => 'US' }
    
    s.location = s.config[:location] || 'Belfast'
    s.url = 'http://www.google.com/ig/api?weather=' + s.location + '&hl=' + s.locale

    s.direction = s.config[:direction] || 'right'
    s.forecast_length = s.config[:forecast_length] || 3
    s.hide_current = s.config[:hide_current] ? 1 : 0

    s.current_label = s.config[:current_label] || 'Now'
    s.temp_suffix = s.config[:temp_suffix] || ''
    s.sep = ' ' + (s.config[:sep] || '/') + ' '
    s.condition = ''
    s.icon = Subtlext::Icon.new("weather_cloud.xbm")	
    
    s.day_color = Subtlext::Color.new(s.config[:day_color] || '#757575')
    s.temp_color = Subtlext::Color.new(s.config[:temp_color] || '#B8B8B8')
    s.sep_color = Subtlext::Color.new(s.config[:sep_color] || '#FECF35')
    
    s.forecast = [ ]
    
    s.error = ''
end

helper do
    def convertUnits(n, u)
        if u == 'c'
            return ((5.0/9) * (n - 32)).round
        else
            return ((9.0/5) * (n + 32)).round
        end
    end
    
    def getWeather
        self.forecast.clear
        
        begin
            content = Iconv.iconv('UTF-8', 'ISO-8859-1', open(self.url, {:read_timeout => 1}).read)[0]
        rescue
            return self.error = 'Connection error.'
        end
        
        xml = REXML::Document.new(content)
        
        return self.error = 'Invalid location.' if xml.root.elements['//problem_cause']
        
        xml.elements.each('//forecast_conditions') do |f|
            high = f.elements['high'].attributes['data'].to_i
            low = f.elements['low'].attributes['data'].to_i
            self.condition = (File.basename f.elements['icon'].attributes['data'].to_s).sub(/.gif/, '')

            self.forecast << {
                :day   => f.elements['day_of_week'].attributes['data'],
                :temp  => ((high + low) / 2).to_s
            }

        end
        
        if self.units[:cmp] != xml.root.elements['//forecast_information/unit_system'].attributes['data']
            self.forecast.each { |f| f[:temp] = convertUnits(f[:temp].to_i, self.units[:unit]).to_s }
        end
        
        self.forecast.slice!(self.forecast_length - 4, 4 - self.forecast_length)
        
        if self.hide_current.zero?
            self.forecast.unshift(
                {
                    :day  => self.current_label,
                    :temp => xml.root.elements['//current_conditions/temp_' + self.units[:unit]].attributes['data']
                }
            )
            self.condition = (File.basename xml.root.elements['//current_conditions/icon'].attributes['data'].to_s).sub(/.gif/, '')
        end
        
        if self.direction ==  'left'
            self.forecast.reverse!
        end
    end

    def getIcon
        if ["cloudy", "mostly_cloudy", "partly_cloudy"].include?(self.condition)
            icon = "weather_cloud.xbm"
        elsif ["rain", "chance_of_rain"].include?(self.condition)
            icon = "weather_rain.xbm"
        elsif ["chance_of_storm", "thunderstorm"].include?(self.condition)
            icon = "weather_storm.xbm"
        elsif ["sunny", "mostly_sunny"].include?(self.condition)
            icon = "weather_sun.xbm"
        elsif ["mist"].include?(self.condition)
            icon = "weather_mist.xbm"
        else
            icon = "weather_unknown.xbm"
        end
        self.icon = Subtlext::Icon.new(icon)
    end
end

on :run do |s|
    getWeather
    getIcon
   
    return s.data = s.error if !s.error.empty?
    
    weather_string = ''
    
    s.forecast.each do |f|      
        weather_string << s.day_color + f[:day] + ' ' + s.temp_color + f[:temp] + s.temp_suffix
        
        if f != s.forecast.last
            weather_string << s.sep_color + s.sep
        end
    end
  
    s.data = s.icon + weather_string
end
# -*- encoding: utf-8 -*-
# Weather specification file
# Created with sur-0.2
Sur::Specification.new do |s|
    s.name        = 'Weather_Mod'
    s.authors     = [ 'Alexander Straube' ]
    s.date        = 'Mon Aug 20 13:37 EST 2011'
    s.contact     = 'Alexander.Straube@GoogleMail.com'
    s.description = 'Simple configurable weather sublet (extended with condition icons).'
    s.icons       = [ 'weather_cloud.xbm', 'weather_mist.xbm', 'weather_rain.xbm', 'weather_snow.xbm', 'weather_storm.xbm', 'weather_sun.xbm', 'weather_unknown.xbm' ]
    s.notes       = <<NOTES
Simple configurable weather sublet that pulls from Google's weather API.

('sur config weather_mod' for available options)
NOTES
    s.config      = [
        {
            :name        => 'interval',
            :type        => 'integer',
            :def_value   => '7200',
            :description => 'Update interval in seconds.'
        },
        {
            :name        => 'locale',
            :type        => 'string',
            :def_value   => 'en',
            :description => 'Desired locale for units and names. (en, de, etc.)'
        },
        {
            :name        => 'units',
            :type        => 'string',
            :def_value   => 'f',
            :description => 'Desired temperature unit. (c|f)'
        },
        {
            :name        => 'location',
            :type        => 'string',
            :def_value   => 'New-York',
            :description => 'Location, either zip code or city name.'
        },
        {
            :name        => 'direction',
            :def_value   => 'right',
            :type        => 'string',
            :description => 'Text direction. (left|right)'
        },
        {
            :name        => 'forecast_length',
            :type        => 'integer',
            :def_value   => '3',
            :description => 'Forecast length. (0-4)'
        },
        {
            :name        => 'hide_current',
            :type        => 'boolean',
            :def_value   => 'false',
            :description => 'Hide the current temperature.'
        },
        {
            :name        => 'current_label',
            :type        => 'string',
            :def_value   => 'Now',
            :description => 'Current temperature label.'
        },
        {
            :name        => 'temp_suffix',
            :type        => 'string',
            :def_value   => '\'\'',
            :description => 'Temperature suffix.'
        },
        {
            :name        => 'sep',
            :type        => 'string',
            :def_value   => '/',
            :description => 'Separator between days.'
        },
        {
            :name        => 'day_color',
            :type        => 'string',
            :def_value   => '#757575',
            :description => 'Day color.'
        },
        {
            :name        => 'temp_color',
            :type        => 'string',
            :def_value   => '#B8B8B8',
            :description => 'Temperature color.'
        },
        {
            :name        => 'sep_color',
            :type        => 'string',
            :def_value   => '#FECF35',
            :description => 'Seperator color.'
        }
    ]
    s.version     = '0.1.1'
    s.tags        = [ 'Config', 'Weather' ]
    s.files       = [ 'weather_mod.rb' ]
end

meh

Offline

#398 2012-05-14 18:15:56

unexist
Member
From: Germany
Registered: 2008-05-13
Posts: 300
Website

Re: subtle - another tiling window manager

Thanks, but I wrote subtle and most of the sublets. I am well aware how to load the sources of a sublet. Just still figuring out what might happen for you. tongue

The sublet basically just asks google weather, did you try to reach that manually?

s.url = 'http://www.google.com/ig/api?weather=' + s.location + '&hl=' + s.locale

So something like: http://www.google.com/ig/api?weather=New-York&hl=en

Offline

#399 2012-05-14 18:20:21

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

unexist wrote:

Thanks, but I wrote subtle and most of the sublets. I am well aware how to load the sources of a sublet. Just still figuring out what might happen for you. tongue

Thought I would save you some time tongue

I can get to the url no problem

Also the one for Belfast works too.

http://www.google.com/ig/api?weather=Belfast&hl=en

I can also download the xml file with wget and curl.


meh

Offline

#400 2012-05-14 18:32:27

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: subtle - another tiling window manager

Never mind, it appears that reboot number 4 did the charm. :rollseyes:

Put it down to my weird laptop.


meh

Offline

Board footer

Powered by FluxBB