[dev] wmii issue tracker cleanup
I went through the wmii issue tracker, closed some (already) fixed issues, and categorized the remaining ones. I hope this helps Kris someday. Cheers.
Re: [dev] [9base] add listen1
Thanks a lot for this patch, I will apply it tonight! Cheers, Anselm On 22 February 2011 05:59, Stanley Lieber stanley.lie...@gmail.com wrote: Uriel and I were talking about shipping rc-httpd with werc and writing a script to serve a default example site from the base install. To that end, I thought we could make use of listen1 from p9p. The patches below may not be the ideal way to organize things in the tree, but with these pieces it does build and run as expected. -sl diff -r e39eeddcc295 Makefile --- a/Makefile Thu Jan 06 09:50:05 2011 + +++ b/Makefile Mon Feb 21 22:43:02 2011 -0600 @@ -27,6 +27,7 @@ grep\ hoc\ join\ + listen1\ look\ ls\ md5sum\ diff -r e39eeddcc295 lib9/auth.h --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/lib9/auth.h Mon Feb 21 22:43:02 2011 -0600 @@ -0,0 +1,169 @@ +#ifndef __AUTH_H__ +#define __AUTH_H__ 1 + +#ifdef __cplusplus +extern C { +#endif +/* +#pragma src /sys/src/libauth +#pragma lib libauth.a +*/ +AUTOLIB(auth) + +/* + * Interface for typical callers. + */ + +typedef struct AuthInfo AuthInfo; +typedef struct Chalstate Chalstate; +typedef struct Chapreply Chapreply; +typedef struct MSchapreply MSchapreply; +typedef struct UserPasswd UserPasswd; +typedef struct AuthRpc AuthRpc; + +struct CFid; + +enum +{ + MAXCHLEN= 256, /* max challenge length */ + MAXNAMELEN= 256, /* maximum name length */ + MD5LEN= 16, + + ARok = 0, /* rpc return values */ + ARdone, + ARerror, + ARneedkey, + ARbadkey, + ARwritenext, + ARtoosmall, + ARtoobig, + ARrpcfailure, + ARphase, + + AuthRpcMax = 4096 +}; + +struct AuthRpc +{ + int afd; + struct CFid *afid; + char ibuf[AuthRpcMax]; + char obuf[AuthRpcMax]; + char *arg; + uint narg; +}; + +struct AuthInfo +{ + char *cuid; /* caller id */ + char *suid; /* server id */ + char *cap; /* capability (only valid on server side) */ + int nsecret; /* length of secret */ + uchar *secret; /* secret */ +}; + +struct Chalstate +{ + char *user; + char chal[MAXCHLEN]; + int nchal; + void *resp; + int nresp; + +/* for implementation only */ + AuthRpc *rpc; /* to factotum */ + char userbuf[MAXNAMELEN]; /* temp space if needed */ + int userinchal; /* user was sent to obtain challenge */ +}; + +struct Chapreply /* for protocol chap */ +{ + uchar id; + char resp[MD5LEN]; +}; + +struct MSchapreply /* for protocol mschap */ +{ + char LMresp[24]; /* Lan Manager response */ + char NTresp[24]; /* NT response */ +}; + +struct UserPasswd +{ + char *user; + char *passwd; +}; + +extern int newns(char*, char*); +extern int addns(char*, char*); + +extern int noworld(char*); +extern int amount(int, char*, int, char*); + +/* these two may get generalized away -rsc */ +extern int login(char*, char*, char*); +extern int httpauth(char*, char*); + +typedef struct Attr Attr; +enum { + AttrNameval, /* name=val -- when matching, must have name=val */ + AttrQuery, /* name? -- when matching, must be present */ + AttrDefault /* name:=val -- when matching, if present must match INTERNAL */ +}; +struct Attr +{ + int type; + Attr *next; + char *name; + char *val; +}; + +typedef int AuthGetkey(char*); + +int _attrfmt(Fmt*); +Attr *_copyattr(Attr*); +Attr *_delattr(Attr*, char*); +Attr *_findattr(Attr*, char*); +void _freeattr(Attr*); +Attr *_mkattr(int, char*, char*, Attr*); +Attr *_parseattr(char*); +char *_strfindattr(Attr*, char*); +/* +#pragma varargck type A Attr* +*/ + +extern AuthInfo* fauth_proxy(int, AuthRpc *rpc, AuthGetkey *getkey, char *params); +extern AuthInfo* auth_proxy(int fd, AuthGetkey *getkey, char *fmt, ...); +extern AuthInfo* fsfauth_proxy(struct CFid*, AuthRpc *rpc, AuthGetkey *getkey, char *params); +extern AuthInfo* fsauth_proxy(struct CFid*, AuthGetkey *getkey, char *fmt, ...); +extern int auth_getkey(char*); +extern int (*amount_getkey)(char*); +extern void auth_freeAI(AuthInfo *ai); +extern int auth_chuid(AuthInfo *ai, char *ns); +extern Chalstate *auth_challenge(char*, ...); +extern AuthInfo* auth_response(Chalstate*); +extern int auth_respond(void*, uint, char*, uint, void*, uint, AuthGetkey
Re: [dev] [9base] add listen1
related: http://hg.youterm.com/screws On 02/22/11 11:34, Anselm R Garbe wrote: Thanks a lot for this patch, I will apply it tonight! Cheers, Anselm On 22 February 2011 05:59, Stanley Lieberstanley.lie...@gmail.com wrote: Uriel and I were talking about shipping rc-httpd with werc and writing a script to serve a default example site from the base install. To that end, I thought we could make use of listen1 from p9p. The patches below may not be the ideal way to organize things in the tree, but with these pieces it does build and run as expected. -sl
[dev] wmii: Tagging from .wmiirc not working
Hello all, I just downloaded wmii the other day and have been so far loving it. Dynamic tagging is a wonderful idea! However, I've had one main problem. Using the default sh version of .wmiirc, I haven't been able to get it so that when I run, say, Thunderbird it's automatically tagged 'web'. Here's the relvent part of my .wmiirc: # Tagging Rules wmiir write /rules ! # Apps with system tray icons like to their main windows # Give them permission. /^Pidgin:/ allow=+activate # MPlayer and VLC don't float by default, but should. /MPlayer|VLC/ floating=on # ROX puts all of its windows in the same group, so they open # with the same tags. Disable grouping for ROX Filer. /^ROX-Filer:/ group=0 /Thunderbird/ - +web /.*GNU Icecat*/ - +web /Icecat/ - web /vlc.*/ - 2 ! Could anyone help me? -Steve
Re: [dev] wmii: Tagging from .wmiirc not working
On Tue, 22 Feb 2011, Steve Ryan wrote: Hello all, I just downloaded wmii the other day and have been so far loving it. Dynamic tagging is a wonderful idea! However, I've had one main problem. Using the default sh version of .wmiirc, I haven't been able to get it so that when I run, say, Thunderbird it's automatically tagged 'web'. Here's the relvent part of my .wmiirc: # Tagging Rules wmiir write /rules ! Do any of your tagging rules work? If you're using a version of wmii that supports the 'keyword=value' syntax you used in your example, I think these should be in /tagrules, rather than /rules. So, change the above line to: wmiir write /tagrules ! -- Best, Ben
Re: [dev] wmii: Tagging from .wmiirc not working
On 02/22/2011 12:40 PM, Benjamin R. Haskell wrote: On Tue, 22 Feb 2011, Steve Ryan wrote: Hello all, I just downloaded wmii the other day and have been so far loving it. Dynamic tagging is a wonderful idea! However, I've had one main problem. Using the default sh version of .wmiirc, I haven't been able to get it so that when I run, say, Thunderbird it's automatically tagged 'web'. Here's the relvent part of my .wmiirc: # Tagging Rules wmiir write /rules ! Do any of your tagging rules work? If you're using a version of wmii that supports the 'keyword=value' syntax you used in your example, I think these should be in /tagrules, rather than /rules. So, change the above line to: wmiir write /tagrules ! The ones that were in the default file (pidgin, vlc|mplayer, ROX) work perfectly fine. It is only ones that I write in myself that don't work. I tried using /tagrules, however, this shows up: wmiir: fatal: Can't open file '/tagrules': file not found witray: Replacing currently running system tray. wmiir: fatal: Can't open file '/rbar/status': file not found and trying to do the command manually reports the same error. -Steve Ryan
Re: [dev] wmii: Tagging from .wmiirc not working
On Tue, 22 Feb 2011, Steve Ryan wrote: On 02/22/2011 12:40 PM, Benjamin R. Haskell wrote: On Tue, 22 Feb 2011, Steve Ryan wrote: Hello all, I just downloaded wmii the other day and have been so far loving it. Dynamic tagging is a wonderful idea! However, I've had one main problem. Using the default sh version of .wmiirc, I haven't been able to get it so that when I run, say, Thunderbird it's automatically tagged 'web'. Here's the relvent part of my .wmiirc: # Tagging Rules wmiir write /rules ! Do any of your tagging rules work? If you're using a version of wmii that supports the 'keyword=value' syntax you used in your example, I think these should be in /tagrules, rather than /rules. So, change the above line to: wmiir write /tagrules ! The ones that were in the default file (pidgin, vlc|mplayer, ROX) work perfectly fine. It is only ones that I write in myself that don't work. I tried using /tagrules, however, this shows up: wmiir: fatal: Can't open file '/tagrules': file not found witray: Replacing currently running system tray. wmiir: fatal: Can't open file '/rbar/status': file not found and trying to do the command manually reports the same error. Oops, had the history backwards. /tagrules was removed in favor of /rules. In wmii 3.6 (not using hg version here at work) your Thunderbird rule works okay for me. (Had to use sel+web instead of +web to get it to also show up on the current tag.) Based on the wmii(1) manpage from the hg version on my home pc, I think you may need to add tags= and remove the '-' for later versions: So, /Thunderbird/ - +web becomes: /Thunderbird/ tags=+web or maybe /Thunderbird/ tags=sel+web There's also a note in the 'rules PROVISIONAL' section (not running a particularly new hg version) that mentions 'force-tags=', so might also try: /Thunderbird/ force-tags=+web or /Thunderbird/ force-tags=sel+web -- Best, Ben
Re: [dev] wmii: Tagging from .wmiirc not working
Oops, had the history backwards. /tagrules was removed in favor of /rules. In wmii 3.6 (not using hg version here at work) your Thunderbird rule works okay for me. (Had to use sel+web instead of +web to get it to also show up on the current tag.) Based on the wmii(1) manpage from the hg version on my home pc, I think you may need to add tags= and remove the '-' for later versions: So, /Thunderbird/ - +web becomes: /Thunderbird/ tags=+web or maybe /Thunderbird/ tags=sel+web There's also a note in the 'rules PROVISIONAL' section (not running a particularly new hg version) that mentions 'force-tags=', so might also try: /Thunderbird/ force-tags=+web or /Thunderbird/ force-tags=sel+web Ah! It seems the force-tags works. Thank you very much! -Steve -- [url]about.me/bit101[/url]
[dev] wmii bar height
Is there any way to manipulate wmii bar height separately from window-titles height?
[dev] wmii noob key binding help
Hi. So I read through as much as I could find on the subject of defining my own keybindings. I can see how to do it from the 9P virtual filesystem that wmii has setup, but I am under the impression that it can be done moreproperly?...via wmiirc_local and the local_events() function. Unfortunately, whatever I try to put in there causes wmii to not watch for any input whatsoever, and I get locked out from doing anything. Could someone show me an example of how to, say, change volume with amixer? I have the cli commands: amixer sset PCM 4+ amixer sset PCM 4- and I would like to bind those commands to Mod-Control-bracketright and Mod-Control-bracketleft respectively, or at this point any key combination really. Could someone show me how to bind those, for example? -Eitan
Re: [dev] wmii noob key binding help
On Tue, 22 Feb 2011, Eitan Goldshtrom wrote: Hi. So I read through as much as I could find on the subject of defining my own keybindings. I can see how to do it from the 9P virtual filesystem that wmii has setup, but I am under the impression that it can be done moreproperly?...via wmiirc_local and the local_events() function. Unfortunately, whatever I try to put in there causes wmii to not watch for any input whatsoever, and I get locked out from doing anything. Could someone show me an example of how to, say, change volume with amixer? I have the cli commands: amixer sset PCM 4+ amixer sset PCM 4- and I would like to bind those commands to Mod-Control-bracketright and Mod-Control-bracketleft respectively, or at this point any key combination really. Could someone show me how to bind those, for example? E.g.: Before: local_events() { true;} After: local_events() { cat '!' Key XF86AudioRaiseVolume# raise the volume amixer sset PCM 4+ Key XF86AudioLowerVolume# lower the volume amixer sset PCM 4- ! } Since volume control programs should be of the return-almost-immediately variety, I didn't bother with the `eval wmiir setsid [cmd] ` that most of the default commands seem to use. (What's the point of the `eval` there?). Makes sense to use the setsid portion in this example: local_events() { cat '!' Key $ALTKEY-slash# open SSH on a host I frequently use eval wmiir setsid $WMII_TERM -e ssh remote.example.com ! } -- Best, Ben