add get_current_layout() to get current layout :-)

This commit is contained in:
Julien Danjou 2008-01-06 11:35:51 +01:00
parent 7983a3196d
commit 633d7c07ee
3 changed files with 19 additions and 8 deletions

View File

@ -59,14 +59,6 @@ struct Rule
typedef struct AwesomeConf AwesomeConf;
typedef struct Layout Layout;
struct Layout
{
char *image;
LayoutArrange *arrange;
Layout *next;
};
typedef struct Key Key;
struct Key
{

View File

@ -72,6 +72,16 @@ arrange(int screen)
restack(screen);
}
Layout *
get_current_layout(int screen)
{
Tag **curtags = get_current_tags(screen);
Layout *l = curtags[0]->layout;
p_delete(&curtags);
return l;
}
/** Send focus to next client in stack
* \param screen Screen ID
* \param arg Unused

View File

@ -28,7 +28,16 @@
typedef void (LayoutArrange)(int);
typedef struct Layout Layout;
struct Layout
{
char *image;
LayoutArrange *arrange;
Layout *next;
};
void arrange(int);
Layout * get_current_layout(int);
void restack(int);
void loadawesomeprops(int);
void saveawesomeprops(int);