From 170ed9882ad82e80ec010a35e54422e37e9843c2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 6 Feb 2008 20:13:41 +0100 Subject: [PATCH] rename netwmicon to focusicon --- Makefile.am | 2 +- awesomerc.1.txt | 4 ++-- common/configopts.c | 2 +- widget.h | 2 +- widgets/{netwmicon.c => focusicon.c} | 12 +++++------- 5 files changed, 10 insertions(+), 12 deletions(-) rename widgets/{netwmicon.c => focusicon.c} (92%) diff --git a/Makefile.am b/Makefile.am index 5391465b..af18ff9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,7 @@ WIDGETS += widgets/taglist.c WIDGETS += widgets/layoutinfo.c WIDGETS += widgets/textbox.c WIDGETS += widgets/iconbox.c -WIDGETS += widgets/netwmicon.c +WIDGETS += widgets/focusicon.c WIDGETS += widgets/progressbar.c WIDGETS += widgets/tasklist.c WIDGETS += widgets/graph.c diff --git a/awesomerc.1.txt b/awesomerc.1.txt index 3a48d34e..e651ea63 100644 --- a/awesomerc.1.txt +++ b/awesomerc.1.txt @@ -153,7 +153,7 @@ This widget shows a icon for the selected layout. *y*:: Vertical offset (auto-alignment if not set). -netwmicon +focusicon ~~~~~~~~~ This widget shows a icon for the focused window using NET_WM_ICON or icon file set in rule. @@ -394,7 +394,7 @@ screen [MULTI] command = arg = } } - netwmicon + focusicon { x = y = mouse [MULTI] diff --git a/common/configopts.c b/common/configopts.c index 9bbff2a9..2a1d86a7 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -171,7 +171,7 @@ cfg_opt_t statusbar_opts[] = CFG_SEC((char *) "taglist", widget_taglist_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "layoutinfo", widget_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "iconbox", widget_iconbox_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), - CFG_SEC((char *) "netwmicon", widget_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), + CFG_SEC((char *) "focusicon", widget_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "progressbar", widget_progressbar_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "graph", widget_graph_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "tasklist", widget_tasklist_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), diff --git a/widget.h b/widget.h index a832e9a7..15f8b261 100644 --- a/widget.h +++ b/widget.h @@ -43,7 +43,7 @@ WidgetConstructor layoutinfo_new; WidgetConstructor taglist_new; WidgetConstructor textbox_new; WidgetConstructor iconbox_new; -WidgetConstructor netwmicon_new; +WidgetConstructor focusicon_new; WidgetConstructor progressbar_new; WidgetConstructor graph_new; WidgetConstructor tasklist_new; diff --git a/widgets/netwmicon.c b/widgets/focusicon.c similarity index 92% rename from widgets/netwmicon.c rename to widgets/focusicon.c index 8e01245b..862ff163 100644 --- a/widgets/netwmicon.c +++ b/widgets/focusicon.c @@ -1,5 +1,5 @@ /* - * netwmicon.c - NET_WM_ICON widget + * focusicon.c - focused window icon widget * * Copyright © 2007-2008 Julien Danjou * @@ -19,19 +19,17 @@ * */ -#include -#include + #include "focus.h" #include "tag.h" #include "widget.h" #include "rules.h" #include "ewmh.h" -#include "common/util.h" extern AwesomeConf globalconf; static int -netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset, +focusicon_draw(Widget *widget, DrawCtx *ctx, int offset, int used __attribute__ ((unused))) { Area area; @@ -95,13 +93,13 @@ netwmicon_draw(Widget *widget, DrawCtx *ctx, int offset, } Widget * -netwmicon_new(Statusbar *statusbar, cfg_t *config) +focusicon_new(Statusbar *statusbar, cfg_t *config) { Widget *w; w = p_new(Widget, 1); widget_common_new(w, statusbar, config); - w->draw = netwmicon_draw; + w->draw = focusicon_draw; /* Set cache property */ w->cache.flags = WIDGET_CACHE_CLIENTS;