1

I work with some projects which requires data to be exact lenght, let's say: 120 characters.

Some editors, like gedit provides such functionality which allows you to visually have a limit where to stop thus making easier to create some content.

Is it there a way I can use something like this in a terminal? I mean: I don't want a terminal editor with a nano like function to show a right margin line, what I wish is to show a permanent line over the terminal in order to be able to run commands such as nano filename or cat filename, or other commands/scripts which will drop text results in the terminal, and have the same experience.

I work mostly with drop down terminals like Guake or Yakuake, but another alternative is good as I always work on fullscreen i3wm Desktop Environments.

1 Answers1

1

The best way to do what I asked is by using a transparent image in the background, which shows only a vertical line at the very point where I wish to have the "marker", as shown in this screenshot:

enter image description here

Please note that I am using a transparent image on a semi-transparent black background Guake terminal, that's why we can also see the desktop's background image.

The background image is this:

enter image description here

And as you can see, there's nothing but the vertical line, which -when placed properly in the background- will give the optical illusion of having such a right margin "marker" thus solving my problem.

Of course you will have to do two or three attempts in order to properly point the vertical line in your desired place, whose task can be achieved by using your favorite image editor, The GIMP is a great choice.

Now I reproduce here the steps I did in order to get this background image.

Steps:

  1. First of all, we need to fill our terminal with characters, in order to be able to count to the place we wish to mark. Have in consideration that, based on your font name and font size, the results will vary.
  2. Now let's take a screenshot of our whole desktop, in which we have -of course- our terminal as we are used to work with. I always have it fullscreen so that's not a problem for me.
  3. Then we'll open the screenshot in GIMP (or your favorite images editor) and create the vertical line on a new empty layer, at the very point we need it. After which we'll remove the background and save it as a transparent png image file.
  4. We'll follow our terminal's settings instructions in order to place the transparent image in the background, after which we'll see the results as shown before.

That's it. Now we have a right margin marker which will allow us to see how far our text results are going from within the terminal itself.

If somebody has a better approach to do this. Please let us know! Thank you very much and...

Good luck!