LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-21-2020, 10:52 AM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,476

Rep: Reputation: 85
Angry watch -c is stripping colors and animation


I am running this from screen in my .screenrc

watch -c -n 60 curl -s wttr.in

~/.screenrc
Code:
term screen-256color    # Lots of colors
#truecolor on            # 24-bit of colors; Works in version 5 git
defbce on               # Background color erase
defshell -bash          # The dash makes it a login shell
defscrollback 2024      # Lots of scroll-back
bind ' ' windowlist -b  # Space displays the list of windows
bind '^b' '^a^a'        # Bind ^b for nested screens that would do ^a^a
#termcapinfo xterm* ti@:te@     # Scroll using scrollbar of Konsole or xterm instead
defmousetrack on        # Watch for mouse clicks when there are splits
#windowlist string "%4n %h%=%f" # Name fix in windowlist that only shows "bash"
altscreen               # Clear the screen after running bashtop or vim
shelltitle "$ |bash"
setenv DISPLAY ':0' # No more issues launching GUI apps
#reptyr pid             # Attach a process in screen that was started outside of screen

hardstatus off
#hardstatus alwayslastline
hardstatus firstline    # Statusbar at top
hardstatus string '%{= bW}%-Lw%{= rW}%50>%n%f* %t%{= bW}%+Lw%< %{= bd}%-=%D %d %M %Y %c:%s%{-}'
caption always "%{= rW} [ %S ]  %f %t %? ( %{rY} %u %{rW} ) %?"

# HTML Color Codes : https://www.computerhope.com/htmcolor.htm
# String Escapes : https://www.gnu.org/software/screen/manual/html_node/String-Escapes.html
# Understanding GNU Screen’s hardstatus Strings :
#       https://www.kilobitspersecond.com/2014/02/10/understanding-gnu-screens-hardstatus-strings/

## Default screens
screen -t root          0
stuff "su -\n"
screen -t weather       1
stuff "watch -c -n 60 curl -s wttr.in\n"
screen  -t music        2 mocp
screen                 3
All the colors are stripped except a background color on one line. The animated lighting bolts are also no longer animated.

Last edited by fakie_flip; 05-21-2020 at 02:29 PM.
 
Old 05-21-2020, 02:26 PM   #2
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,476

Original Poster
Rep: Reputation: 85
Using this

#!/bin/bash

while true
do
clear
echo "Executing $1 at $(date)"
$1
sleep $2
done


repeat "curl wttr.in" 60
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Yaru Colors: Ubuntu's Default Theme In 11 Colors (Gtk, Icons And Gnome Shell) LXer Syndicated Linux News 0 04-11-2019 01:04 AM
Stripping lines versus stripping bytes in a bash subshell. poorman_installer Programming 9 10-21-2009 08:36 AM
How to configure Xterm colors if my xterm can support 256 colors n179911 Linux - Software 4 07-06-2009 02:28 AM
How to change shell to have nice colors and look cool? Penguin likes cool colors! newtovanilla Linux - Newbie 3 11-28-2008 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration