add clock and day to terminal window

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
1












When I run the command watch df, I see a clock and time on the right upper corner of the terminal window. Is there any command that I can use to visualize time/date in terminal window? it seems that this is possible, because command watch df can do it?










share|improve this question























  • sure - a simple script can do this. But terminals by themselves do not do this.
    – Thomas Dickey
    2 days ago














up vote
2
down vote

favorite
1












When I run the command watch df, I see a clock and time on the right upper corner of the terminal window. Is there any command that I can use to visualize time/date in terminal window? it seems that this is possible, because command watch df can do it?










share|improve this question























  • sure - a simple script can do this. But terminals by themselves do not do this.
    – Thomas Dickey
    2 days ago












up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





When I run the command watch df, I see a clock and time on the right upper corner of the terminal window. Is there any command that I can use to visualize time/date in terminal window? it seems that this is possible, because command watch df can do it?










share|improve this question















When I run the command watch df, I see a clock and time on the right upper corner of the terminal window. Is there any command that I can use to visualize time/date in terminal window? it seems that this is possible, because command watch df can do it?







command-line






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Goro

7,56753371




7,56753371










asked 2 days ago









TNT

337313




337313











  • sure - a simple script can do this. But terminals by themselves do not do this.
    – Thomas Dickey
    2 days ago
















  • sure - a simple script can do this. But terminals by themselves do not do this.
    – Thomas Dickey
    2 days ago















sure - a simple script can do this. But terminals by themselves do not do this.
– Thomas Dickey
2 days ago




sure - a simple script can do this. But terminals by themselves do not do this.
– Thomas Dickey
2 days ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










This command will do something similar to watch df in regard of adding a clock on the right upper corner of terminal window:



while true; do echo -ne "e[se[0;$((COLUMNS-27))H$(date)e[u"; sleep 1; done &


Adjust the sleep value as you want to update time accordingly






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473686%2fadd-clock-and-day-to-terminal-window%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    This command will do something similar to watch df in regard of adding a clock on the right upper corner of terminal window:



    while true; do echo -ne "e[se[0;$((COLUMNS-27))H$(date)e[u"; sleep 1; done &


    Adjust the sleep value as you want to update time accordingly






    share|improve this answer
























      up vote
      3
      down vote



      accepted










      This command will do something similar to watch df in regard of adding a clock on the right upper corner of terminal window:



      while true; do echo -ne "e[se[0;$((COLUMNS-27))H$(date)e[u"; sleep 1; done &


      Adjust the sleep value as you want to update time accordingly






      share|improve this answer






















        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        This command will do something similar to watch df in regard of adding a clock on the right upper corner of terminal window:



        while true; do echo -ne "e[se[0;$((COLUMNS-27))H$(date)e[u"; sleep 1; done &


        Adjust the sleep value as you want to update time accordingly






        share|improve this answer












        This command will do something similar to watch df in regard of adding a clock on the right upper corner of terminal window:



        while true; do echo -ne "e[se[0;$((COLUMNS-27))H$(date)e[u"; sleep 1; done &


        Adjust the sleep value as you want to update time accordingly







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        Goro

        7,56753371




        7,56753371



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473686%2fadd-clock-and-day-to-terminal-window%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)