You are not logged in.

#51 2009-08-20 13:21:52

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: CAW!!! Python Taskbar / Panel / Systray

rich_o wrote:

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...

http://omploader.org/vMjZtZw/caw_title_bug.png

My config.py (expires 2009-08-23 10:56:15) , using caw-git 20090820.

I hate to say it but I think this is a font issue.  If you use a different font this problem goes away.  The origin of the problem is that -- is actually a UTF8 character that snap doesn't want to display.  I have the same problem with all fonts that are similar (mintsstrong, nu) and I'm not sure why.

Rich, as a comparison I loaded up PyPanel with the same font.  It doesn't even display the text properly (ie. doesn't display utf8 characters).  Tint2 displays it fine and I'm not sure what they are using to layout their text.  It looks like tint2 *is* using pango, so I'll dig through their source a bit and see if there is something I'm missing.  BUT, I think they are using xft+pango, not cairo+pango which is what CAW is using.  I'll see if I can fix this, but for the time being my suggestion is to using a different (more utf8 friendly) font.  That's not much of a solution!


CAW! Taskbar: AUR ;; forum ;; git

Offline

#52 2009-08-20 15:47:51

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: CAW!!! Python Taskbar / Panel / Systray

Huh,

that's kinda sad. I went so long with that font. Well, who cares. Welcome Terminus, my new true love.

rojo

Offline

#53 2009-08-20 16:16:52

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: CAW!!! Python Taskbar / Panel / Systray

rich_o wrote:

Huh,

that's kinda sad. I went so long with that font. Well, who cares. Welcome Terminus, my new true love.

rojo

one of use should write to artwiz and see if they can get updated...


CAW! Taskbar: AUR ;; forum ;; git

Offline

#54 2009-08-23 21:03:16

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: CAW!!! Python Taskbar / Panel / Systray

Added an mpd widget (mpdc)

doc:

http://caw.milkbox.net/reference/widget … .mpdc.html

Last edited by dcurtis (2009-08-23 21:03:39)


CAW! Taskbar: AUR ;; forum ;; git

Offline

#55 2009-09-01 22:01:23

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: CAW!!! Python Taskbar / Panel / Systray

/bump to see if anyone is still giving this a workout and if they've run into any problems...

I've intended to add icon support to the taskbar and to give some launcher plugins but I haven't gotten around to it atm.


CAW! Taskbar: AUR ;; forum ;; git

Offline

#56 2009-09-03 06:12:37

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: CAW!!! Python Taskbar / Panel / Systray

Oh this is wonderful! Is there anyway you can add support for displaying piped in text, as in dzen2 or xmobar?

Offline

#57 2009-09-03 20:38:37

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: CAW!!! Python Taskbar / Panel / Systray

Ah well, using FIFO I've managed to get the desired behaviour. However its unfortunately monocoloured.

Last edited by rizzix (2009-09-03 20:38:56)

Offline

#58 2009-09-03 21:11:38

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: CAW!!! Python Taskbar / Panel / Systray

rizzix wrote:

Ah well, using FIFO I've managed to get the desired behaviour. However its unfortunately monocoloured.

two possible options: 1) use multiple fifos. 2) I'll add an option to use pantos markup language. That way I don't have to write a text parser and you can get your multicolor IO.

I'll add the option sometime tonight and you can give it a shot later.

I'll warn you it's not the best markup in the world (read XML like) but I don't wan to get into the parsing business for performance reasons.


CAW! Taskbar: AUR ;; forum ;; git

Offline

#59 2009-09-04 02:31:44

linkmaster03
Member
Registered: 2008-12-27
Posts: 269

Re: CAW!!! Python Taskbar / Panel / Systray

This looks really awesome. If I was still using Openbox and not dwm, I'd probably replace tint2 with this. Keep it up! big_smile

Offline

#60 2009-09-04 09:51:43

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Re: CAW!!! Python Taskbar / Panel / Systray

I'm using it on my netbook. I've been trying it without a taskbar and you know, it's totally fine. I don't really miss it at all. I'm a convert.

If I want to keep an eye on network traffic when I'm using my USB modem, how would I go about it?


< 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

#61 2009-09-04 21:19:09

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: CAW!!! Python Taskbar / Panel / Systray

caw tends to crash now and then on my laptop because of a div-by-zero exception.

It has to do with the battery widget. In some cases the `rate` is reported to be 0. I have no idea why, but it does happen. Could you add a check to see if the rate is zero then set it to 1 or something.

In particular the exception occurs at line 92. However this check could be added everywhere timeleft is calculated.

Offline

#62 2009-09-07 05:33:10

efleming969
Member
Registered: 2007-03-14
Posts: 39

Re: CAW!!! Python Taskbar / Panel / Systray

I'm using musca wm with an nvidia card and seperate displays (no twinview or xinerama).  How can I launch CAW on both displays or a specific display?

The "DISPLAY=0.0; caw" did not work.

Offline

#63 2009-09-11 18:00:11

Crows
Member
From: Wales
Registered: 2008-09-05
Posts: 92

Re: CAW!!! Python Taskbar / Panel / Systray

I've been using CAW for a while now - great little panel. Thanks!

A few quick observations:

1) Some kind of command-execution for the battery widget would be nice. So you could get it to notify you on warn_battery, say. (I hacked together an imp of this in about three lines, but I'm sure it could be done better by someone with more programming knowledge).

2) When my battery reached 100% it gets displayed as =117= and just generally doesn't appreaciate it much. Any thoughts?

3) Quick feature request: how about adding Awesome-style desktop list stuff. So if you're using all desktops for the widget it will graphically display which of them has open windows. Maybe underlining or a different color?

Offline

#64 2009-09-18 16:41:14

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: CAW!!! Python Taskbar / Panel / Systray

When I try to start the panel I get following error:

Loading Config: /etc/xdg/caw/config.py

Resolution: -1.000000
Font Height: 8
Window: 37748737
X: 0
Y: 0
Width: 1680
Height: 14
updating struts
Wifi Error: path does not exist. /sys/class/net/ath0/wireless/link
Traceback (most recent call last):
  File "/etc/xdg/caw/config.py", line 108, in <module>
    caw.mainloop()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 378, in mainloop
    self._init_widgets()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 338, in _init_widgets
    w.init(self)
  File "/usr/lib/python2.6/site-packages/caw/widgets/battery.py", line 52, in init
    self.file = open('/proc/acpi/battery/%s/state' %self.battery, 'r')
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BAT0/state'

Last edited by x0rg (2009-09-18 16:43:39)

Offline

#65 2009-09-18 17:03:12

Crows
Member
From: Wales
Registered: 2008-09-05
Posts: 92

Re: CAW!!! Python Taskbar / Panel / Systray

x0rg wrote:

When I try to start the panel I get following error:

<error message>

2 likely reasons for that:

1) you don't have a battery in your machine. Remove the battery widget from config.py.

2) Your battery is under a different name. Most likely BAT1 - try that in config.py instead of BAT0.

Offline

#66 2009-09-18 19:52:19

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: CAW!!! Python Taskbar / Panel / Systray

Ok, I disabled all widgets that I don't need, but I want to keep the volume widget.
Sadly I get this error:

http://Loading Config: /etc/xdg/caw/config.py
Resolution: -1.000000
Font Height: 8
Window: 46137345
X: 0
Y: 0
Width: 1680
Height: 14
updating struts
Traceback (most recent call last):
  File "/etc/xdg/caw/config.py", line 108, in <module>
    caw.mainloop()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 378, in mainloop
    self._init_widgets()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 338, in _init_widgets
    w.init(self)
  File "/usr/lib/python2.6/site-packages/caw/widgets/volume.py", line 57, in init
    getattr(self, '_init_' + self.driver)()
  File "/usr/lib/python2.6/site-packages/caw/widgets/volume.py", line 66, in _init_oss
    self.device_mask = ossaudiodev["SOUND_MIXER_VOLUME"]
TypeError: 'module' object is unsubscriptable

Do I have to use OSS? Or Is there a way to use the widget with alsa?

Offline

#67 2009-09-18 20:41:30

makimaki
Member
From: Ireland
Registered: 2009-04-02
Posts: 109

Re: CAW!!! Python Taskbar / Panel / Systray

@x0rg
That's odd, I use alsa. Did you set vol = Volume(device='PCM')  ? (You don't have to use PCM, it a personal preference)

Here's my Caw config:

import socket

from caw import Caw
from caw.widgets.spacer import Spacer
from caw.widgets.text import Text
from caw.widgets.battery import Battery
from caw.widgets.volume import Volume
from caw.widgets.clock import Clock
from caw.widgets.cpu import CPU
from caw.widgets.systray import Systray
from caw.widgets.allornothing import AllOrNothing
from caw.widgets.desktop import Desktop
from caw.widgets.weather import Weather
from caw.widgets.tasklist import Tasklist
from caw.widgets.net import Net
from caw.widgets.wifi import Wifi
from caw.widgets.fifo import FIFO
from caw.widgets.mpdc import MPDC

hostname = socket.gethostname()

#font_face='mintsstrong'
font_face='snap'
#font_y_offset=-1
#font_face='monospace'
#font_face='tixus'
#font_face='DejaVu Sans Mono'
#font_face='Terminus'
font_size = 8
fg=0xc05e00
netdev = 'eth0'
bg=(0x4c3a11, 0x33260b)
shading=256/4 * 3
border_color=0x33260b


caw = Caw(
        font_face=font_face,
        font_size=font_size,
        #width = .8,
        #xoffset = .1,
        yoffset = 0,
        above = True,
        bg=bg,
        shading=shading,
        border_color=border_color,
        height=12,
        border_width=0,
        edge=0
        )

widgets = []
widgets.append(Spacer(3))
widgets.append(Desktop(current_fg=0x00ff00, showall=False))

widgets.append(Spacer(3))
widgets.append(AllOrNothing(
    Text(" :: "),
    Systray())
    )

widgets.append(Spacer(10))

widgets.append(Tasklist(alldesktops=False, minimized_fg=0xaaaaaa, normal_fg=0xaaaaaa, current_fg=0xffffff, normal_border=0xaaaaaa, current_border=0xffffff, minimized_border=0xaaaaaa, border_width=1))
#widgets.append(Spacer(-1))

widgets.append(CPU(1, normal_fg=0xdddddd))
widgets.append(Text("%", 0xaaaaaa))
widgets.append(Text(" :: ", 0x777777))
#widgets.append(CPU(2, normal_fg=0xdddddd))
#widgets.append(Text("%", 0xaaaaaa))

#widgets.append(Text(" :: "))

widgets.append(Net('wlan0', normal_fg=0xdddddd))
widgets.append(Text("k", 0x46a4ff))
widgets.append(Text(" : ", 0x777777))
widgets.append(Net('wlan0', normal_fg=0xdddddd))
widgets.append(Text("k", 0xff6565))
widgets.append(Text(" :: "))

widgets.append(Wifi(adapter='wlan0', normal_fg=0xdddddd))
widgets.append(Text("%", 0xaaaaaa))
widgets.append(Text(" :: "))


#widgets.append(Weather())

#widgets.append(Text(" :: "))

widgets.append(Battery(battery="BAT1",normal_fg=0x9f78ff))
widgets.append(Text(" :: "))
#widgets.append(MPDC(fg=0xaaaaaa))
vol = Volume(device='PCM')
widgets.append(vol)
widgets.append(Text("% ", 0xaaaaaa, button5=vol.button5, button4=vol.button4))
vol = Volume()
widgets.append(vol)
widgets.append(Text("% ", 0xaaaaaa, button5=vol.button5, button4=vol.button4))

widgets.append(Text(":: "))

widgets.append(Clock(format='%d.%m', fg=0xaaaaaa))
widgets.append(Text(" "))
widgets.append(Clock(format='%H:%M', fg=0xffffff))
widgets.append(Spacer(3))

caw.widgets = widgets

c

====* -- Joke
    O
    \|/ --- Me
    / \             Whooooosh

Offline

#68 2009-09-19 08:48:02

x0rg
Member
From: Switzerland
Registered: 2009-07-12
Posts: 116

Re: CAW!!! Python Taskbar / Panel / Systray

my config looks like this:

import socket

from caw import Caw
from caw.widgets.spacer import Spacer
from caw.widgets.text import Text
from caw.widgets.battery import Battery
from caw.widgets.volume import Volume
from caw.widgets.clock import Clock
from caw.widgets.cpu import CPU
from caw.widgets.systray import Systray
from caw.widgets.allornothing import AllOrNothing
from caw.widgets.desktop import Desktop
from caw.widgets.weather import Weather
from caw.widgets.tasklist import Tasklist
from caw.widgets.net import Net
from caw.widgets.wifi import Wifi
from caw.widgets.fifo import FIFO

hostname = socket.gethostname()

font_face='mintsstrong'
#font_face='nu'
#font_y_offset=-1
#font_face='gelly'
#font_face='Terminus'
#font_face='DejaVu Sans Mono'
font_size = 8
fg=0xc05e00
netdev = 'eth1'
bg=(0x4c3a11, 0x33260b)
shading=256/4 * 3
border_color=0x33260b


caw = Caw(
        font_face=font_face,
        font_size=font_size,
        #width = .8,
        #xoffset = .1,
        yoffset = 0,
        above = True,
        bg=bg,
        shading=shading,
        border_color=border_color,
        height=12,
        border_width=1,
        edge=0
        )

widgets = []
widgets.append(Spacer(3))
widgets.append(Desktop(current_fg=0x00ff00, showall=False))

widgets.append(Spacer(3))
widgets.append(AllOrNothing(
    Text(" :: "),
    Systray())
    )

widgets.append(Spacer(10))

#widgets.append(Tasklist(alldesktops=True, normal_fg=0xcccccc, current_fg=0x0000ff, normal_border=0x555555, current_border=0x00ff00, minimized_border=0xcccccc, border_width=0))
widgets.append(Spacer(-1))

#widgets.append(CPU(1, normal_fg=0xdddddd))
#widgets.append(Text("%", 0xaaaaaa))
#widgets.append(Text(" : ", 0x777777))
#widgets.append(CPU(2, normal_fg=0xdddddd))
#widgets.append(Text("%", 0xaaaaaa))

widgets.append(Text(" :: "))

widgets.append(Net(netdev, normal_fg=0xdddddd))
widgets.append(Text("k", 0x46a4ff))
widgets.append(Text(" : ", 0x777777))
widgets.append(Net(netdev, 'up', normal_fg=0xdddddd))
widgets.append(Text("k", 0xff6565))
widgets.append(Text(" :: "))

#widgets.append(Wifi(adapter='ath0', normal_fg=0xdddddd))
#widgets.append(Text("%", 0xaaaaaa))
widgets.append(Text(" :: "))


#widgets.append(Weather())

#widgets.append(Text(" :: "))

#widgets.append(Battery(normal_fg=0x9f78ff))
#widgets.append(Text(" :: "))

vol = Volume(device='PCM')
widgets.append(vol)
widgets.append(Text("% ", 0xaaaaaa, button5=vol.button5, button4=vol.button4))
vol = Volume()
widgets.append(vol)
widgets.append(Text("% ", 0xaaaaaa, button5=vol.button5, button4=vol.button4))

widgets.append(Text(":: "))

widgets.append(Clock(format='%Y.%m.%d', fg=0xaaaaaa))
widgets.append(Text(" "))
widgets.append(Clock(format='%H:%M:%S', fg=0xffffff))
widgets.append(Spacer(3))

caw.widgets = widgets

caw.mainloop()

Last edited by x0rg (2009-09-19 09:04:46)

Offline

#69 2009-10-18 18:57:06

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: CAW!!! Python Taskbar / Panel / Systray

Btw, any plans to add a "keyboard layout" widget?

PS: And where can I get that 'mintsstrong' font which is offered by config.py?

Last edited by Mr.Cat (2009-10-18 19:56:26)

Offline

#70 2009-10-18 22:51:45

wankel
Member
From: Iowa, USA
Registered: 2008-05-30
Posts: 218
Website

Re: CAW!!! Python Taskbar / Panel / Systray

Mr.Cat wrote:

Btw, any plans to add a "keyboard layout" widget?

PS: And where can I get that 'mintsstrong' font which is offered by config.py?

artwiz-fonts to get the mintsstrong font

Offline

#71 2009-10-21 17:56:46

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: CAW!!! Python Taskbar / Panel / Systray

Aha, thanks. Nice fonts, but seems they all lack cyrillic letters unfortunately.

By the way. I'm trying to switch from openbox to xmonad. How would I run caw in xmonad?

UPD: Made it work via ManageDocks, but caw fails to show tasklist (other widgets I use work fine):

Loading Config: /home/cat/.config/caw/config.py
Resolution: -1.000000
Font Height: 13
Window: 18874369
X: 0
Y: 0
Width: 1024
Height: 12
updating struts
Traceback (most recent call last):
  File "/home/cat/.config/caw/config.py", line 56, in <module>
    caw.mainloop()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 378, in mainloop
    self._init_widgets()
  File "/usr/lib/python2.6/site-packages/caw/caw.py", line 338, in _init_widgets
    w.init(self)
  File "/usr/lib/python2.6/site-packages/caw/widgets/tasklist.py", line 115, in init
    self._update_current_desktop()
  File "/usr/lib/python2.6/site-packages/caw/widgets/tasklist.py", line 145, in _update_current_desktop
    self.current_desktop = struct.unpack_from("I", currp.value.buf())[0]
struct.error: unpack_from requires a buffer of at least 4 bytes

UPD: Solved with ewmhDesktops but
1. Clicking on task list does not work: gives something like "Bad Match: 12582938 42"
2. Tasklist shows "minimized to tray" windows (like pidgin contact list).

Last edited by Mr.Cat (2009-10-21 20:11:37)

Offline

#72 2009-12-14 18:44:18

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: CAW!!! Python Taskbar / Panel / Systray

Hey dcurts,

is caw still alive? The git repositories seem to be down. Would be a shame!

r.

Offline

#73 2009-12-18 20:32:58

rich_o
Member
Registered: 2008-07-28
Posts: 49

Re: CAW!!! Python Taskbar / Panel / Systray

Hey all,

a small patch for caw/widgets/mpdc.py
* pad single-digit seconds with 0.
* show the file name as an fallback. Prevents crashes if i.e there's no artist tag.

diff --git a/caw/widgets/mpdc.py b/caw/widgets/mpdc.py
index 4fc1a21..1b25e51 100644
--- a/caw/widgets/mpdc.py
+++ b/caw/widgets/mpdc.py
@@ -2,6 +2,8 @@ import caw.widget
 import collections
 import mpd
 import socket
+from os.path import basename
+
 
 class MPDC(caw.widget.Widget):
     """Widget to display MPD information.
@@ -113,9 +115,9 @@ class MPDC(caw.widget.Widget):
                 if status['state'] in ('play', 'pause'):
                     elapsed,total = map(int, status['time'].split(':'))
                     data['elapsed_min'] = elapsed / 60
-                    data['elapsed_sec'] = elapsed - (data['elapsed_min'] * 60)
+                    data['elapsed_sec'] = '%02d' % (elapsed - (data['elapsed_min'] * 60))
                     data['total_min'] = total / 60
-                    data['total_sec'] = total - (data['total_min'] * 60)
+                    data['total_sec'] = '%02d' % (total - (data['total_min'] * 60))
 
             except mpd.ConnectionError:
                 data = None
@@ -167,9 +169,16 @@ class MPDC(caw.widget.Widget):
         else:
             state = data['state']
             if state == 'play':
-                self.text = self.play_format % data
+                try:
+                    self.text = self.play_format % data
+                except:
+                    # show filename as fallback
+                    self.text = basename('%(file)s' % data)
             elif state == 'pause':
-                self.text = self.pause_format % data
+                try:
+                    self.text = self.pause_format % data
+                except:
+                    self.text = basename('%(file)s' % data)
             else:
                 self.text = self.stop_text
         self.width_hint = self.parent.text_width(self.text)

Last edited by rich_o (2009-12-18 20:34:13)

Offline

#74 2010-09-13 03:40:37

tad
Member
Registered: 2006-12-08
Posts: 19

Re: CAW!!! Python Taskbar / Panel / Systray

Neither caw nor caw-git seem to build.

==> Building and installing package
==> Determining latest git revision...
  -> Version found: 20100912
==> Making package: caw 20100912-1 (Sun Sep 12 20:45:53 PDT 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> Extracting Sources...
==> Entering fakeroot environment...
==> Starting build()...
==> Connecting to GIT server...
Cloning into caw...
remote: Counting objects: 571, done.
remote: Compressing objects: 100% (552/552), done.
remote: Total 571 (delta 349), reused 0 (delta 0)
Receiving objects: 100% (571/571), 163.28 KiB | 120 KiB/s, done.
Resolving deltas: 100% (349/349), done.
==> GIT checkout done or server timeout
==> Starting build...
Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    **pkgconfig('xcb','xcb-atom','xcb-icccm','cairo','pango','pangocairo')
TypeError: __init__() keywords must be strings
    Aborting...
==> ERROR: Makepkg was unable to build caw.

Offline

Board footer

Powered by FluxBB