[dev] wmii - clock issues

2009-08-09 Thread Val Polyakov
THE INFO:

v...@hades:~$ ls incoming/wmi*
incoming/wmii+ixp-snap20090803.tgz

installed in $HOME/wmii_20090803/

according to ps output, I'm using the following config file:
vxp   4974  0.5  0.1 138556  7564 ?Sl   14:46   1:12 python
/home/vxp/wmii_20090803/etc/wmii/wmiirc

so, I'm attaching /home/vxp/wmii_20090803/etc/wmii/wmiirc.py to this email.


THE PROBLEM:
for some reason, wmII's clock isn't being updated.
load average monitor seems fine, it changes.. but the clock just sits
there and shows the time from when I launched wmii.

I miss a working clock..any ideas?import operator
import os
import re
import sys
import traceback

import pygmi
from pygmi import *
from pygmi import events

identity = lambda k: k

# Keys
events.keydefs = dict(
mod='Mod1',
left='h',
down='j',
up='k',
right='l')

# Bars
noticetimeout=5
noticebar=('right', '!notice')

# Theme
background = '#33'
floatbackground='#22'

#wmii['font'] = 'drift,-*-fixed-*-*-*-*-9-*-*-*-*-*-*-*'
wmii['font'] = 'xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-15'
wmii['normcolors'] = '#00', '#c1c48b', '#81654f'
wmii['focuscolors'] = '#00', '#81654f', '#00'
wmii['grabmod'] = events.keydefs['mod']
wmii['border'] = 1

def setbackground(color):
call('xsetroot', '-solid', color)
setbackground(background)

terminal = 'wmiir', 'setsid', 'xterm'
pygmi.shell = os.environ.get('SHELL', 'sh')

@defmonitor
def load(self):
return re.sub(r'^.*: ', '', call('uptime')).replace(', ', ' ')
@defmonitor
def time(self):
from datetime import datetime
return datetime.now().strftime('%c')

wmii.colrules = (
('gimp', '17+83+41'),
('.*', '62+38 # Golden Ratio'),
)

wmii.tagrules = (
('MPlayer|VLC', '~'),
)

def unresponsive_client(client):
msg = 'The following client is not responding. What would you like to do?'
resp = call('wihack', '-transient', client.id,
'xmessage', '-nearmouse', '-buttons', 'Kill,Wait', '-print',
'%s\n  %s' % (msg, client.label))
if resp == 'Kill':
client.slay()

# End Configuration

client.awrite('/event', 'Start wmiirc')

tags = Tags()
bind_events({
('Quit', Match('Start', 'wmiirc')): lambda *a: sys.exit(),
'CreateTag':tags.add,
'DestroyTag':   tags.delete,
'FocusTag': tags.focus,
'UnfocusTag':   tags.unfocus,
'UrgentTag':lambda args: tags.set_urgent(args.split()[1], True),
'NotUrgentTag': lambda args: tags.set_urgent(args.split()[1], False),

'AreaFocus':lambda args: (args == '~' and
  (setbackground(floatbackground), True) or
  setbackground(background)),

'Unresponsive': lambda args: Thread(target=unresponsive_client,
args=(Client(args),)).start(),

'Notice':   lambda args: notice.show(args),

Match(('LeftBarClick', 'LeftBarDND'), '1'): lambda e, b, tag: tags.select(tag),
Match('LeftBarClick', '4'): lambda *a: tags.select(tags.next(True)),
Match('LeftBarClick', '5'): lambda *a: tags.select(tags.next()),

Match('LeftBarMouseDown', 3):   lambda e, n, tag: clickmenu((
('Delete', lambda t: Tag(t).delete()),
), (tag,)),
Match('ClientMouseDown', _, 3): lambda e, client, n: clickmenu((
('Delete', lambda c: Client(c).kill()),
('Kill',   lambda c: Client(c).slay()),
('Fullscreen', lambda c: Client(c).set('Fullscreen', 'on')),
), (client,)),

Match('ClientClick', _, 4): lambda e, c, n: Tag('sel').select('up'),
Match('ClientClick', _, 5): lambda e, c, n: Tag('sel').select('down'),
})

@apply
class Actions(events.Actions):
def rehash(self, args=''):
program_menu.choices = program_list(os.environ['PATH'].split(':'))
def quit(self, args=''):
wmii.ctl('quit')
def eval_(self, args=''):
exec args
def exec_(self, args=''):
wmii['exec'] = args
def exit(self, args=''):
client.awrite('/event', 'Quit')

program_menu = Menu(histfile='%s/history.prog' % confpath[0], nhist=5000,
action=curry(call, 'wmiir', 'setsid',
 pygmi.shell, '-c', background=True))
action_menu = Menu(histfile='%s/history.action' % confpath[0], nhist=500,
   choices=lambda: Actions._choices,
   action=Actions._call)
tag_menu = Menu(histfile='%s/history.tags' % confpath[0], nhist=100,
choices=lambda: sorted(tags.tags.keys()))

def clickmenu(choices, args):
ClickMenu(choices=(k for k, v in choices),
  action=lambda choice: dict(choices).get(choice, identity)(*args)) \
.call()

class Notice(Button):
def __init__(self):
super(Notice, self).__init__(*noticebar)
self.timer = None

def tick(self):
self.label = ' '

def write(self, notice):
client.awrite('/event', 'Notice %s' % notic

Re: [dev] OT: fonts in screenshot #2?

2009-08-09 Thread Val Polyakov
that'd be arg on #suckless if I'm not mistaken

> Hello,
>
> The fonts in screenshot #2 at http://dwm.suckless.org/screenshots/ look
> terrific.  Could whoever set up the system depicted there help us idiots
> out here improve the appearance of our displays?
>
> Thanks,
>
> jds
>





Re: [dev] [st] goals / non-goals for st?

2009-08-24 Thread Val Polyakov
> 2009/8/24, pancake :
>> Yep, I dont see why we should delegate scrolling to screen. screen is
>> bloated GNU
>> software and i dont want to relay on it.
>
> tmux is here for those who hate GNU stuff.
>

what's wrong with GNU stuff?

I mean - why hate it? :)




[dev] unsubscribe

2010-07-20 Thread Val Polyakov





Re: [dev] unsubscribe

2010-07-20 Thread Val Polyakov
Excuse me for living and forgetting to append +unsubscribe

Fsck off...

> People never learn...
>
> - Original message -
>>
>>
>>
>
>