Giter VIP home page Giter VIP logo

a4's Introduction

About The Project

a4 is a dynamic terminal window manager. One of eight tiling layouts is dynamically applied to all visible terminals. The terminal windows are grouped by tags making it easy to visually switch between contexts of work. Color schemes are dynamically applied to each terminal window, based on the text in its titlebar, helping the user to visually identify terminals based on attributes such as hostname, userid, and any other text programmed to display in the titlebar.

Four of the eight layouts divide the screen into two areas, one for a zoomed window and the other for a stack of the remaining windows. These four layouts can be adjusted during use to expand or shrink the number of windows in the zoom area and the overall size of the zoom area. They are named for the location of the zoom area: zoom_left, zoom_right, zoom_top, and zoom_bottom. The other four layouts are fullscreen, grid, rows, and columns.

Each terminal window can be tagged with one or more tags. The user then selects which tag or tags to view, and all windows with those tags are arranged in the dynamic layout. The list of all tags is displayed on the left of the status bar. Tag names are user defined with the default being the numerals 1 through 9.

Terminal windows can be minimized to a bar at the bottom of the screen. A minimized terminal keeps its tags but stays out of the user's way until it is unminimized again. Terminal windows can be set to read-only status in order to prevent accidental typing or closing. Terminal windows can be added to a focus group in order to type the same input into all simultaneously. Minimized and read-only terminal windows are never typed into, even if they are included in the focus group.

Terminal color schemes are dynamically applied by comparing the text of the terminal's title with an ordered set of user-defined color rules.

A4 supports 24-bit truecolor and is configurable by editing an a4.ini file. It is a partial rewrite of dvtm, which in turn is a text-based implementation of dwm.

parts of the screen

Distribution Packages

Install using the xbps package manager

sudo xbps-install -S a4

Install using nix-env

nix-env -iA nixos.a4term # change `nixos` for `nixpkgs`, if on a non-NixOS system

Try it with nix-shell

nix-shell -p a4term

a4 Compile and Install

All required prerequisites are now included under the lib folder, so there is no need to compile any additional libraries.

tgz packages are available from the Tags page.

git clone https://github.com/rpmohn/a4
cd a4
make && sudo make install

Notes

Persistence

It is useful to run a4 with abduco so that you can disconnect and reconnect while your a4 session continues to run in the background. This is also helpful if you run a4 on remote machines since the session continues to run even if your connection to the machine is lost, and you can reconnect later without losing any of your work. Consider setting a alias such as this:

alias a4.abduco="abduco -A a4 a4 $@"

Mouse Support

There's a configuration error in the xterm-256color file installed by some Linux distros that causes the mouse to behave incorrectly by printing characters to the terminal. If you experience this problem, run the following command to put a local, patched copy of the file in place for your login account:

infocmp xterm-256color | sed -E 's/(kmous=\\E\[)</\1M/' | tic -o ~/.terminfo -

Documentation

See a4term.com for more documentation, including a copy of the manual page and default keyboard maps.

a4's People

Contributors

littlewing7 avatar maxgyver83 avatar onemoresuza avatar rpmohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

a4's Issues

error while loading shared libraries

When I run a4, it produces
"a4: error while loading shared libraries: libtickit.so.3: cannot open shared object file: No such file or directory."
However, the file is in "/usr/local/lib".
What did I miss?

Using enter in the leader key

I prefer to use a modifier key + all of my binds in order to access them, and I've noticed that there's an issue with this: I can't use enter
Whenever I do something to the avail of M-S-Enter, it just...doesn't work

Please test building this tarball pre-release!

In an effort to make installation of a4 much simpler, this puts in all needed prerequisite library source code under the lib/ subdirectory. This also improves flexibility in the event that I want to use a new library feature that isn't yet in the mainstream package managers.

For a full test, you can uninstall all of the unibilium, libtermkey, libtickit, and libvterm libraries on your system, even though that shouldn't be required.

@MaxGyver83 @littlewing7 and anyone else who can test this for me, please post your results here. Thank you! -Ross

a4-v0.2.2-libs.tar.gz

Friendlier Modifers?

Is a modifier behavior that you would see on any wm possible within the confines of a terminal.
This would mean that once your holding your modifier, multiple keyboard and or mouse actions are now possible and without having to press the modifier for each and every action.
This would go a long for ease of use.

Help on compilation and requirements

Hi Ross,

regarding information present on README, this links seems have empty directory :
http://bazaar.leonerd.org.uk/c/libtickit/
http://bazaar.leonerd.org.uk/c/libvterm/

BTW

I'm trying to compile from source but I receive this errors:

`#$ make
cc -std=c99 -DNDEBUG -DSYSCONFDIR="/usr/share" -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED -DVERSION="752eec5-dirty" a4.c lib/ini.c -lutil -ltickit -lvterm -o a4
In file included from a4.c:310:

vt.c: In function ‘vts_settermprop’:
vt.c:76:32: error: request for member ‘initial’ in something not a structure or union
76 | if (val->string.initial)
^
vt.c:80:51: error: request for member ‘str’ in something not a structure or union
80 | strncat(tframe->title, val->string.str, MIN(val->string.len, remaining));
^
In file included from a4.c:41:
vt.c:80:72: error: request for member ‘len’ in something not a structure or union
80 | strncat(tframe->title, val->string.str, MIN(val->string.len, remaining));
| ^
utilities.c:5:23: note: in definition of macro ‘MIN’
5 | #define MIN(x, y) ((x) < (y) ? (x) : (y))
| ^
vt.c:80:72: error: request for member ‘len’ in something not a structure or union
80 | strncat(tframe->title, val->string.str, MIN(val->string.len, remaining));
| ^
utilities.c:5:35: note: in definition of macro ‘MIN’
5 | #define MIN(x, y) ((x) < (y) ? (x) : (y))
| ^
vt.c:82:32: error: request for member ‘final’ in something not a structure or union
82 | if (val->string.final) {
| ^
vt.c: In function ‘applycolorrules’:
vt.c:237:9: warning: implicit declaration of function ‘vterm_screen_set_default_colors’; did you mean ‘vterm_state_set_default_colors’? [-Wimplicit-function-declaration]
237 | vterm_screen_set_default_colors(tframe->vts, &tframe->cs->fg, &tframe->cs->bg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| vterm_state_set_default_colors
vt.c: In function ‘get_vterm’:
vt.c:386:9: warning: implicit declaration of function ‘vterm_screen_enable_reflow’; did you mean ‘vterm_screen_enable_altscreen’? [-Wimplicit-function-declaration]
386 | vterm_screen_enable_reflow(tframe->vts, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| vterm_screen_enable_altscreen
make: *** [Makefile:24: a4] Error 1`

image

Can you point me in the right direction?

Many thanks for your work I hope to be able to compile successfully, if yes I try to ask guys on VoidLinux to add it in repository.

Many thanks

Max

segfault

Hi Ross,

I just tried a4 (after seeing its announcement on the suckless mailing list).
After playing around with it for a minute or two, I get a segmentation fault. I can't reproduce it reliably with a certain sequence of the key strokes, but it happened several times after using these commands (in random order):

  • Ctrl-g c
  • Ctrl-g 2
  • Ctrl-g 1
  • Ctrl-g .
  • Ctrl-g Enter

(I think Ctrl-g . and Ctrl-g Enter were the last before the crash.)

Maybe these coredumps help:

Update (with a debug build):

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055f78034247b in vts_sb_popline (cols=232, cells=0x55f781fe9380, user=0x55f781ff1dc0) at /home/max/repos/a4/vt.c:167
167                             .fg = tframe->cs->fg,

Versions

Italian Characters: ì ù è à ò cause Segmentation Fault

Hi Ross,

I found an issue on how a4 process Italian character that cause a segmentation fault when it is pressed (è,ì,ù,à or ò) :

image


$
Program received signal SIGSEGV, Segmentation fault.
__stack_chk_fail () at src/env/__stack_chk_fail.c:17
17 src/env/__stack_chk_fail.c: No such file or directory.
(gdb) bt
#0 __stack_chk_fail () at src/env/__stack_chk_fail.c:17
#1 0x000055555556b4df in render_termwin ()
#2 0x00007ffff7f2b086 in tickit_bindings_run_event () from /lib/libtickit.so.3
#3 0x00007ffff7f391ab in ?? () from /lib/libtickit.so.3
#4 0x00007ffff7f39211 in ?? () from /lib/libtickit.so.3
#5 0x00007ffff7f39211 in ?? () from /lib/libtickit.so.3
#6 0x00007ffff7f39211 in ?? () from /lib/libtickit.so.3
#7 0x00007ffff7f3aee1 in tickit_window_flush () from /lib/libtickit.so.3
#8 0x00007ffff7f3b08c in ?? () from /lib/libtickit.so.3
#9 0x00007ffff7f382d2 in tickit_evloop_invoke_timers () from /lib/libtickit.so.3
#10 0x00007ffff7f2c065 in ?? () from /lib/libtickit.so.3
#11 0x000055555556c855 in main ()



a4-keycodes run outside a4 show the character correctly:

image

but if I run a4-keycode from a4 terminal the Italian ( ì ù à ò è ) character pressed is not showed at all.

image

can you help me to solve the segmentation fault and correctly show the Italian characters ?

Many thanks

Max

man a4-keycodes

The a4 man page mentions a4-keycodes(1):

SEE ALSO
abduco(1), a4-keycodes(1)

I understand it like there should be separate man page for this. Is this still to be created? Or did it exist and it was removed?

Segmentation fault

I have installed a4 on Ubuntu 20.04. When I start it, I get a segmentation fault.

Backtrace:

>>> bt
#0  0x00007f508ab188d0 in tickit_get_rootwin () from /usr/local/lib/libtickit.so.3
#1  0x00005622a1a2817e in create_rootwin ()
#2  0x00005622a1a2cb18 in startup_a4 ()
#3  0x00005622a1a2d04d in main ()

I have installed libtermkey via apt:

$ apt policy libtermkey-dev
libtermkey-dev:
  Installed: 0.22-1

... and libtickit and libvterm as described in the README.

How to search the terminal?

The terminal emulator I use (st) doesn't provide a search function. This is supposed to be provided by a separate tool, for example a terminal multiplexer. And when somebody uses a terminal multiplexer, this makes sense, because the terminal emulator can't know which terminal/window/pane is to be searched.

Even when I use a terminal emulator that supports searching the terminal (Alacritty), its search function can't find text in an a4 buffer that's out of the current viewport.

I couldn't find a search function in a4. Does it exist? If not, do you plan to add it? If you don't want to add it: Is there another way to search the terminal?

I'm aware that I could pipe a command output to less and then use its search function but often I don't know beforehand that I'm going to search something and running the same command again with less is often overkill (like for a long running build process).

Another solution could be to allow opening a terminal buffer in the an editor (p.e. $EDITOR), like capture-pane + save-buffer in tmux. What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.