diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-01 11:59:33 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-01 11:59:33 +0200 |
commit | 470c934fc77a978d4d1fa6171f8ca2c6556a6364 (patch) | |
tree | 124e523aad731097df7f2c753b23ba5ed514bacd /noice.c | |
parent | 91ee56ec181769e9b3f4b3b7b8ddb0ab790a7890 (diff) | |
download | noice-470c934fc77a978d4d1fa6171f8ca2c6556a6364.tar.gz |
Implement SEL_RUNWITH
Diffstat (limited to 'noice.c')
-rw-r--r-- | noice.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -72,6 +72,7 @@ enum action { SEL_REDRAW, SEL_RUN, SEL_RUNARG, + SEL_RUNWITH, }; struct key { @@ -865,6 +866,18 @@ nochange: spawn(run, dents[cur].name, path); initcurses(); goto begin; + case SEL_RUNWITH: + /* Save current */ + if (ndents > 0) + mkpath(path, dents[cur].name, oldpath, sizeof(oldpath)); + printprompt("open with: "); + tmp = readln(); + if (tmp == NULL) + goto begin; + exitcurses(); + spawn(tmp, dents[cur].name, path); + initcurses(); + goto begin; } /* Screensaver */ if (idletimeout != 0 && idle == idletimeout) { |