19

This is a bit of a weird question and I'm not sure that there is any easy answer to it but I am very interested in finding a solution.

So when I work on a linux machine via a console I find that I am constantly staring at the bottom of the screen, as once you have executed a bunch of commands text fills toward the bottom. Now I find that this is decidedly not good for my neck and it would be far better if instead of scrolling to the bottom, the text would scroll to the top instead.

So does anyone out there know if there is a way to reverse the direction text appears in a console?

(note that i am aware of the clear command)

Example:
default behaviour

user@machine:~$ command 1  
user@machine:~$ command 2  
user@machine:~$ command 3  
user@machine:~$ __active_prompt__  

desired behaviour

user@machine:~$ __active_prompt__  
user@machine:~$ command 3  
user@machine:~$ command 2  
user@machine:~$ command 1 

Running Kubuntu 10.04 using Konsole

I realise this is an odd question, thanks for any help.

Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84
radman
  • 1,621
  • 3
  • 16
  • 17
  • Why not just adjust your monitor height so that you arn't bending your neck to be able to see the bottom of the screen? – Zypher Jun 18 '10 at 01:35
  • 5
    because they are adjusted to OH&S standards already, which is perfect unless you constantly have to look to the very bottom of the screen. – radman Jun 18 '10 at 04:00
  • 1
    The answers below are very unsatisfactory. I am a developer and a UX designer and it is superior to have the cursor line at the TOP of the terminal. This is an opportunity for someone who knows how to manipulate the terminal. – ajbraus Apr 16 '15 at 17:43
  • 1
    PS1='\[\e[1;1H\]> ' – ollybee Jul 05 '17 at 14:01
  • This is not an odd question. @ajbraus is absolutely correct ^ – Ilias Karim Feb 21 '18 at 02:43
  • @ollybee awesome! - no discussion - just a working (base) solution – Daniel Bişar May 14 '20 at 11:55

2 Answers2

4

This would be a very odd behavior. The main reason is this: How would it handle the output from any command which generates several lines, such as ls or cat? If you have a screen which scrolls opposite of normal, it would print cat ./foo in reverse order. I think your best option is to go with the comment left by Zypher and just move the monitor. Standards are great, but trivial standards which cause the opposite of their intent are worthless. Do what works best for you in your situation.

Jesse
  • 246
  • 2
  • 5
  • 4
    Agreed. I read the OH&S "standard" about having your eyes level with the top of the monitor and nearly laughed - most of the time my eyes are reading at the bottom of a terminal or webpage, not the top (who scrolls down an entire page to read, anyway?). Apart from that, I `clear` my terminals once I'm done with a specific task (which radman uses already). – Andrew Jun 18 '10 at 05:27
2

I've been thinking about this for a while. It seems to me that you should hack the bash source so that carriage return moves the prompt up instead of down. I bet this is a simple hack once you find the right place in the source.

spinlock
  • 183
  • 5