add uicb_setborder to change conf borderpx while running

This commit is contained in:
Julien Danjou 2007-09-18 23:36:52 +02:00
parent c0a003c52e
commit 9919ba2d4b
4 changed files with 23 additions and 3 deletions

3
TODO
View File

@ -1,6 +1,3 @@
For v1.0:
- Add uicb for sel->border++-- and awesomeconf->border++--
For future: For future:
- Move windows from one place to another with mouse in tiled layout - Move windows from one place to another with mouse in tiled layout
- draw _NET_WM_ICON - draw _NET_WM_ICON

View File

@ -700,3 +700,24 @@ uicb_settrans(Display *disp __attribute__ ((unused)),
else else
setclienttrans(sel, delta); setclienttrans(sel, delta);
} }
/** Set borrder size
* \param disp Display ref
* \param drawcontext Drawcontext ref
* \param awesomeconf awesome config
* \param arg X, +X or -X
*/
void
uicb_setborder(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf,
const char *arg)
{
if(!arg)
return;
if((awesomeconf->borderpx = (int) compute_new_value_from_arg(arg, (double) awesomeconf->borderpx)) < 0)
awesomeconf->borderpx = 0;
}

View File

@ -71,5 +71,6 @@ void set_shape(Client *);
void uicb_killclient(Display *, DC *, awesome_config *, const char *); /* kill client */ void uicb_killclient(Display *, DC *, awesome_config *, const char *); /* kill client */
void uicb_moveresize(Display *, DC *, awesome_config *, const char *); /* move and resize window */ void uicb_moveresize(Display *, DC *, awesome_config *, const char *); /* move and resize window */
void uicb_settrans(Display *, DC *, awesome_config *, const char *); void uicb_settrans(Display *, DC *, awesome_config *, const char *);
void uicb_setborder(Display *, DC *, awesome_config *, const char *);
#endif #endif

View File

@ -85,6 +85,7 @@ static const NameFuncLink KeyfuncList[] = {
{"killclient", uicb_killclient}, {"killclient", uicb_killclient},
{"moveresize", uicb_moveresize}, {"moveresize", uicb_moveresize},
{"settrans", uicb_settrans}, {"settrans", uicb_settrans},
{"setborder", uicb_setborder},
/* tag.c */ /* tag.c */
{"tag", uicb_tag}, {"tag", uicb_tag},
{"togglefloating", uicb_togglefloating}, {"togglefloating", uicb_togglefloating},