aboutsummaryrefslogtreecommitdiffstats
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan2008-07-11 15:18:29 +0000
committerokan2008-07-11 15:18:29 +0000
commitf641857dbaf77d21a1236e9b70e11bf913262cf4 (patch)
tree4b8681b18f07f3f01d5aa107341a712953ee6430 /kbfunc.c
parent5f9e4ce44645e6d431d71a004550c38b08e03525 (diff)
downloadcwm-f641857dbaf77d21a1236e9b70e11bf913262cf4.tar.gz
no more hidden (and mysterious) config reloads and allow binding a key
to a config reload; CMS-r by default. ok oga@
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/kbfunc.c b/kbfunc.c
index e9f6f07..a7c9acd 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: kbfunc.c,v 1.31 2008/07/11 14:21:28 okan Exp $
+ * $Id: kbfunc.c,v 1.32 2008/07/11 15:18:29 okan Exp $
*/
#include <paths.h>
@@ -168,7 +168,6 @@ kbfunc_menu_search(struct client_ctx *scratch, void *arg)
TAILQ_INIT(&menuq);
- conf_reload(&Conf);
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
XCALLOC(mi, struct menu);
strlcpy(mi->text, cmd->label, sizeof(mi->text));
@@ -215,14 +214,12 @@ kbfunc_cmdexec(struct client_ctx *cc, void *arg)
void
kbfunc_term(struct client_ctx *cc, void *arg)
{
- conf_reload(&Conf);
u_spawn(Conf.termpath);
}
void
kbfunc_lock(struct client_ctx *cc, void *arg)
{
- conf_reload(&Conf);
u_spawn(Conf.lockpath);
}
@@ -393,7 +390,6 @@ kbfunc_ssh(struct client_ctx *scratch, void *arg)
if ((mi = menu_filter(&menuq, "ssh", NULL, 1,
search_match_exec, NULL)) != NULL) {
- conf_reload(&Conf);
l = snprintf(cmd, sizeof(cmd), "%s -e ssh %s", Conf.termpath,
mi->text);
if (l != -1 && l < sizeof(cmd))
@@ -482,3 +478,9 @@ kbfunc_quit_wm(struct client_ctx *cc, void *arg)
{
_xev_quit = 1;
}
+
+void
+kbfunc_reload(struct client_ctx *cc, void *arg)
+{
+ conf_reload(&Conf);
+}