You are not logged in.
Btw, I'm curious, what's wrong with cairo, so that you're going to switch to xft? Iirc you're using cairo "toy api" (*_text functions, not *_glyph) ones. You may switch to the latter (together with pango to convert text to glyphs).
I'm not sure about this but here is an example. It took me only about 30 min and I added some legacy stuff to use Xft and look at the difference in rendering:
Can you figure out which is which? The one on the right is XFT. I can tell a noticeable difference.
Offline
Fixed the bugs with the font rendering. It had to do with DPI settings and I improved the whole thing to use Pango. Try your special fonts as I assume they will work now... Or I cross my fingers that they will..
As a side question: does pypanel properly handle your cyrillic characters?
Edit: I tested this and caw is now supporting cyrillic character.
As to your response about cairo:
Cairo give a lot of advantages as itI am in a way stuck with cairo. I think that Xft is old news but supposedly all I've read is that for performance, pango and cairo are pretty heavy duty, things like imlib and xft can perform a little bit faster. I don't know much about either of them but I am concerned about performance. I chose XCB because it was supposed to perform better than Xlib, but it kinda forces you to use cairo until Xft gets ported (probably never will) or something new comes along. It looks like even GTK2 isn't using cairo?
The other problem I have with pango/cairo is that it relies on glib2 so that throws another dependency in the mix. I'm not sure there is any system that doesn't have glib on it but maybe.
Regardless, if performance is an issue it should be discussed now because it is easy enough for me to switch to imlib/xft rather than pango/cairo.
Last edited by dcurtis (2009-08-11 20:33:15)
Offline
I have much interest in your app dcurtis! I've used pypanel for almost a year now, and it's a shame the project is discontinued. I was waiting eagerly for another pypanel-like panel (:
Subscribed!
personal page :: last.fm :: git :: delicious
Offline
Fixed the bugs with the font rendering. It had to do with DPI settings and I improved the whole thing to use Pango. Try your special fonts as I assume they will work now... Or I cross my fingers that they will..
....
The latest version is very nice, I really like the new font rendering
I only have a little suggestion, and noticed a bug with the Tasklist:
1. Panel x,y offset:
In caw.py change
self.x = 0
if kwargs.get('edge', 1):
self.y = self.screen.height_in_pixels - self.height
else:
self.y = 0
to:
self.x = kwargs.get('x_offset',0)
if kwargs.get('edge', 1):
self.y = kwargs.get('y_offset',0) + self.screen.height_in_pixels - self.height
else:
self.y = kwargs.get('y_offset',0)
So that in .config/caw/config.py this can be done (I have an NC10 with a 1024x600 display like Mr. Cat)
caw = Caw(
font_face='gelly',
font_size=12,
fg_color=0x636363,
bg_color=0x181818,
shading=256/4 * 3,
border_color=0x303030,
height=12,
border_width=1,
x_offset=0,
y_offset=600,
edge=0
)
2. Tasklist Bug
I still use LXDE, but I have it load Musca rather than Openbox as my WM, and if I minimize somthing from the taskbar caw crashes giving this error:
Traceback (most recent call last):
File "/home/peter/.config/caw/config.py", line 81, in <module>
caw.mainloop()
File "/usr/lib/python2.6/site-packages/caw/caw.py", line 341, in mainloop
self._fdhandlers[fd](eventmask)
File "/usr/lib/python2.6/site-packages/caw/caw.py", line 295, in _process_xevents
event = self.connection.poll_for_event()
xcb.xproto.BadMatch: <xcb.xproto.MatchError object at 0xb72cba7c>
If I start caw again and restore the window, caw crashes again and gives a very slightly different error:
Traceback (most recent call last):
File "/home/peter/.config/caw/config.py", line 81, in <module>
caw.mainloop()
File "/usr/lib/python2.6/site-packages/caw/caw.py", line 341, in mainloop
self._fdhandlers[fd](eventmask)
File "/usr/lib/python2.6/site-packages/caw/caw.py", line 295, in _process_xevents
event = self.connection.poll_for_event()
xcb.xproto.BadMatch: <xcb.xproto.MatchError object at 0xb71de964>
I'll try and play around with it a bit more under different WMs see if its something particular to Musca.
PS Thank you for your great work, caw is a really nice panel
====* -- Joke
O
\|/ --- Me
/ \ Whooooosh
Offline
dcurtis wrote:Right now the volume widgets allow you to scroll up and down to change the volume.
Btw, on my box I had to change the default volume step from 1 to 2 or 3 to make the scroll work.
I also had the same issue as Mr.Cat, I changed the step to 2 and the scroll works fine, otherwise it scrolls very slowly down to 94% from 100% and won't go further. This is only for the master volume though, a step of 1 works fine when controlling the PCM.
====* -- Joke
O
\|/ --- Me
/ \ Whooooosh
Offline
2. Tasklist Bug
I still use LXDE, but I have it load Musca rather than Openbox as my WM, and if I minimize somthing from the taskbar caw crashes giving this error:Traceback (most recent call last): File "/home/peter/.config/caw/config.py", line 81, in <module> caw.mainloop() File "/usr/lib/python2.6/site-packages/caw/caw.py", line 341, in mainloop self._fdhandlers[fd](eventmask) File "/usr/lib/python2.6/site-packages/caw/caw.py", line 295, in _process_xevents event = self.connection.poll_for_event() xcb.xproto.BadMatch: <xcb.xproto.MatchError object at 0xb72cba7c>
If I start caw again and restore the window, caw crashes again and gives a very slightly different error:
Traceback (most recent call last): File "/home/peter/.config/caw/config.py", line 81, in <module> caw.mainloop() File "/usr/lib/python2.6/site-packages/caw/caw.py", line 341, in mainloop self._fdhandlers[fd](eventmask) File "/usr/lib/python2.6/site-packages/caw/caw.py", line 295, in _process_xevents event = self.connection.poll_for_event() xcb.xproto.BadMatch: <xcb.xproto.MatchError object at 0xb71de964>
I'll try and play around with it a bit more under different WMs see if its something particular to Musca.
PS Thank you for your great work, caw is a really nice panel
**1) I'll take care of that soon.
**2) I had a similar problem in OpenBox and it's something to do with trying to set a value or get a state for a window that doesn't exist. Easily enough I can ignore those errors in the mainloop, but I'd rather figure out what is causing it. I know there is a bug when a system tray icon gets deleted, the way that events propogate after the window has been deleted causes some BadWindow requests which I think are fine to ignore as the tray sees the windows as being deleted.
**3) The volume problem is something with pyalsaaudio. It seems like on some systems (my laptop is the same), there is no 32 value. So, if stepping by 1, if the current volume is 31, it tries to set the volume to 32, but the pyalsaaudio won't let it, so it sets it back to 31. I should most likely set the default step to something higher and hopefully aleviate this problem.
SideNote: anyone else noticing flickering and have any idea hohw to fix it? I ontice it when i'm on slower machines. there must be some trick but I don't know what it is.
Offline
@makimaki
The latest git version supports the following additional parameters: above, xoffset, yoffset, width, height
above: specify of the taskbar should be on top of all other windows. there is still a bug with this, it doesn't stay below... don't know the exact atoms i need to set.
xoffset :: can be the number of pixels or a float specifying the fraction of pixels to offset,
yoffset :: may be positive or negative
width :: can be a negative to remove from the screen width. may also be a float representing a fractino of the total screen size.
There are a few details about setting WM struts so that windows don't cover the panel. basically if the panel is directly on an edge and "above"
Offline
Nice project! Btw, I just graduated from the UofI last week, glad to be out of there
Offline
Just wanted to let you all know I posted some new documentation for the project.
I haven't gotten around to doing the widgets yet (except a few have some documentation) but the main module is pretty well documented.
Offline
Still no success with cyrillic for me. Tasklist seems to call draw_text with an empty string as text when window title contains cyrillic letters (even when mixed with latin). Pypanel shows cyrillic letters fine.
Offline
Offline
The easiest way, I think, is to visit a web-site which puts nonlatin characters in the browser's title.
An example is http://www.yandex.ru/ (it's a popular russian search engine, those guys even mantain an archlinux mirror).
As an alternative, you may generate ru_RU.UTF8 locale and then run, say `LANG=ru_RU.UTF8 pidgin`. Its contact list title should be "Список собеседников".
Another way could be just running, say, urxvt with -name set to a cyrillic string, but... it works fine. Caw displays urxvt's name correctly.
I think, I should post a cople of shots:
Last edited by Mr.Cat (2009-08-12 23:50:18)
Offline
@dcurtis
wow that's a lot of work you put into the docs and the updates. I'm on holidays at the moment so I won't be able to bug test/try-to-break-your-code properly til next week
====* -- Joke
O
\|/ --- Me
/ \ Whooooosh
Offline
i generated a locale for ru_RU.UTF-8 but it didn't want to open Pidgin with russian translations. I don't know if I'm missing something or what. The website didn't work either. This may be a XCB issue or something like that. I'm not sure. I'll have to see what they do in Awesome. Will have more time later.
Offline
I like your new taskbar just installed it! How can I change the temperature from fahrenheit to celsius?
Offline
Hm.. Sorry. Seems, that pidgin does not respect LANG and i (dunno why) thought it does.
And what's wrong with the site? Is it down? That's strange, since in this country it has ~100% uptime.
Well, I'll try to figure out, where does caw lose the letters (it's unlikely I'll succeed, but I'll try).
The issue seems to be in GetProperty method for XA_WM_NAME. It returns zero value_lengh for strings with cyrillic. Unfortunately, I'm not good at X11 and couldn't move further. Maybe, XA_STRING imlplies not utf-8, but latin1 only? But why does urxvt -name ... work fine?
I wonder, whether anyone else has this issue.
Last edited by Mr.Cat (2009-08-14 21:58:35)
Offline
Hm.. Sorry. Seems, that pidgin does not respect LANG and i (dunno why) thought it does.
And what's wrong with the site? Is it down? That's strange, since in this country it has ~100% uptime.
Well, I'll try to figure out, where does caw lose the letters (it's unlikely I'll succeed, but I'll try).The issue seems to be in GetProperty method for XA_WM_NAME. It returns zero value_lengh for strings with cyrillic. Unfortunately, I'm not good at X11 and couldn't move further. Maybe, XA_STRING imlplies not utf-8, but latin1 only? But why does urxvt -name ... work fine?
I wonder, whether anyone else has this issue.
FIXED IT!
It was that there are some other atoms. _NET_WM_NAME uses UTF8_STRING and COMPOUND_STRING or something like that. It doesn't matter. Anyways, I request whatever there is and it seems to find the correct text!
We'll see how that all goes from now on. Give the newest push.
Offline
first, I promise what i'm about to say isn't going to happen again at least between major releases.
I changed the argument names for widgets and the main class to use a format that is more object-oriented and seem more logical to me....
for most widgets the colors are specified using fg/bg/border
There are a few widgets that have multiple colors based on state. For example the CPU widget has
fg as an alias for normal_fg
normal_border : normal foreground for the cpu stat
medium_fg : foreground for cpu when medium is met
high_fg : foreground for cpu when the high is met
medium : medium threshold
high : high threshold
this is opposed to the previous syntax: (fg_color, fg_medium, fg_high).
I am sorry to change the config syntax. I am alittle OCD so I wanted to finally pick something. Before it was just kinda random. Hope this isn't a deal breaker. Like I said, I won't do this again and everything else should conform to it. I'll write up some documentation about writing new widgets and naming parameters.
Fixed a lot of bugs too.
Last edited by dcurtis (2009-08-15 04:11:06)
Offline
I see a great future for your app, dcurtis :-)
If only I knew python, or had free time..
personal page :: last.fm :: git :: delicious
Offline
I'd initially tried this from AUR and liked it, so I decided to go the git route. I know nothing about how git works but I managed to clone the repository and build caw as directed in the README. My problem is I can't start caw with ./caw like the README says. Give a noob a break and tell me where I'm going wrong.
< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me
Offline
@Chokkan
First off, the README you're referring to is out of date so I updated it.
Basically, you need to export your PYTHONPATH to use the development directories.
32bit
export PYTHONPATH=$HOME/src/caw/build/lib.linux-i686-2.6
64bit
export PYTHONPATH=$HOME/src/caw/build/lib.linux-x86_64-2.6
Then you can just run 'caw' as normal (or bin/caw) OR you can just run your config file....
python $HOME/.config/caw/config.py
If you're going to develop, this is the way to do it. If not, I think just updating via AUR is the way to go. Right now there isn't a way to run directly from the source directory without building between edits. In other words, if you are doing development, setuptools builds everything and places it in that <src>/build/lib.linux-<arch>-2.6 directory.
Then I just run:
python setup.py build && python $HOME/.config/caw/config.py
Last edited by dcurtis (2009-08-18 22:11:40)
Offline
Hi Chokkan,
the AUR-Version is indeed a git-Version, too. So just use that, you get the newest version everytime you reinstall it via pacman. Way easier!
rich_o
Offline
Thanks to both of you. I think I'll stick to AUR and keep an eye out for updates.
< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me
Offline
Hi,
i have a bug with the tasklist. I post it here or do you prefer another place for bug reports?
Problem seems to occur when the window title contains those masked html stuff (how do you call that?) like Ü or — (i.e. on http://caw.milkbox.net/). The title line is pushed down.
Strange enough, when i wanted to take a screenshot of firefox with http://caw.milkbox.net opened, the bug was gone. So i took the screenshot of a local copy of "Documentation for CAW! — CAW! v.9 documentation.html", where it still exists as long as the — is in the title tag. After that, i reopened http://caw.milkbox.net and, well, the bug was back there. I really don't know...
My config.py (expires 2009-08-23 10:56:15) , using caw-git 20090820.
Last edited by rich_o (2009-08-20 09:43:25)
Offline