cvsimport

This commit is contained in:
Christian Neukirchen
2014-09-07 15:47:44 +00:00
14 changed files with 270 additions and 283 deletions

View File

@ -159,7 +159,6 @@ kbfunc_client_search(struct client_ctx *cc, union arg *arg)
cc = (struct client_ctx *)mi->ctx;
if (cc->flags & CLIENT_HIDDEN)
client_unhide(cc);
if (old_cc)
client_ptrsave(old_cc);
client_ptrwarp(cc);
@ -214,13 +213,23 @@ kbfunc_cmdexec(struct client_ctx *cc, union arg *arg)
void
kbfunc_term(struct client_ctx *cc, union arg *arg)
{
u_spawn(Conf.termpath);
struct cmd *cmd;
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
if (strcmp(cmd->name, "term") == 0)
u_spawn(cmd->path);
}
}
void
kbfunc_lock(struct client_ctx *cc, union arg *arg)
{
u_spawn(Conf.lockpath);
struct cmd *cmd;
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
if (strcmp(cmd->name, "lock") == 0)
u_spawn(cmd->path);
}
}
void
@ -310,12 +319,13 @@ void
kbfunc_ssh(struct client_ctx *cc, union arg *arg)
{
struct screen_ctx *sc = cc->sc;
struct cmd *cmd;
struct menu *mi;
struct menu_q menuq;
FILE *fp;
char *buf, *lbuf, *p;
char hostbuf[MAXHOSTNAMELEN];
char cmd[256];
char path[MAXPATHLEN];
int l;
size_t len;
@ -324,6 +334,11 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
return;
}
TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
if (strcmp(cmd->name, "term") == 0)
break;
}
TAILQ_INIT(&menuq);
lbuf = NULL;
@ -356,10 +371,10 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
search_match_exec, NULL)) != NULL) {
if (mi->text[0] == '\0')
goto out;
l = snprintf(cmd, sizeof(cmd), "%s -T '[ssh] %s' -e ssh %s",
Conf.termpath, mi->text, mi->text);
if (l != -1 && l < sizeof(cmd))
u_spawn(cmd);
l = snprintf(path, sizeof(path), "%s -T '[ssh] %s' -e ssh %s",
cmd->path, mi->text, mi->text);
if (l != -1 && l < sizeof(path))
u_spawn(path);
}
out:
if (mi != NULL && mi->dummy)
@ -432,6 +447,12 @@ kbfunc_client_movetogroup(struct client_ctx *cc, union arg *arg)
group_movetogroup(cc, arg->i);
}
void
kbfunc_client_sticky(struct client_ctx *cc, union arg *arg)
{
client_sticky(cc);
}
void
kbfunc_client_fullscreen(struct client_ctx *cc, union arg *arg)
{