Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions a4.1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ below).
.B Ctrl\-g c
Create a new terminal window.
.TP
.B Ctrl\-g n
Create a new terminal window on the left-most unused tag.
.TP
.B Ctrl\-g x x
Force close the focused terminal.
.TP
Expand Down Expand Up @@ -369,8 +372,10 @@ refers to all windows in the
.BR "focus group" .
.SS Actions that can be mapped to keyboard and mouse events
.TP
.B create
Create a new terminal window and is assigned the currently selected tags. The new window is placed in the #1 position in the order of all visible windows.
.B create [ nextfree ]
Create a new terminal window and is assigned the currently selected tags. The new window is placed in the #1 position in the order of all visible windows. If the parameter
.BR nextfree
is used, the new window is assigned the first available unused tag.
.TP
.B destroy
Force close the selected or mouse-selected terminal (not all focused or mouse-focused terminals).
Expand Down
11 changes: 11 additions & 0 deletions a4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,17 @@ static void noaction(char *args[]) {
}

static void create(char *args[]) {
if (args && args[0] && ARGS0EQ("nextfree")) { /* special arg "nextfree" */
// show first unused tag
unsigned int occupied = 0;
for (TFrame *tframe = tframes; tframe; tframe = tframe->next) {
occupied |= tframe->tags;
}
unsigned int i;
for (i = 0; i < config.ntags && (occupied & (1 << i)); i++);
if (i < config.ntags)
viewset(config.tagnames[i]);
}
create_tframe();
arrange();
}
Expand Down
1 change: 1 addition & 0 deletions etc/a4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ zoom_bottom = " ├┴┤ "
# in the order of M-C-S-. Two special keys that must be fully spelled out are
# "Space" and "Hyphen".
C-g c = create
C-g n = create nextfree
C-g x x = destroy
C-g Enter = zoom
C-g . = minimize
Expand Down