diff --git a/config.h b/config.h index 9164903ca..754507164 100644 --- a/config.h +++ b/config.h @@ -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 { diff --git a/layout.c b/layout.c index 831795e3c..45f8b3896 100644 --- a/layout.c +++ b/layout.c @@ -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 diff --git a/layout.h b/layout.h index 6e2f16c76..83c95c433 100644 --- a/layout.h +++ b/layout.h @@ -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);