Sponsored Content
Full Discussion: random colour xterm alias
Top Forums Shell Programming and Scripting random colour xterm alias Post 302275070 by arcadia on Friday 9th of January 2009 06:16:46 AM
Old 01-09-2009
random colour xterm alias

I used to have this but do not know where it went - a script or an alias that:

opens a new xterm window with a random background colour.

I have this off "the internets" :
alias xterm1="xterm ... -bg \#* printf '%02x%02x%02x' {repeat 3 times $((RANDOM%128+128))}` &"

this gives me an alias: xterm1='xterm .. -bg \#8beaf7 &'
..which kind of works, but it's not elegant and it means that the window colouring is only random recursively.

any of you have a "better" version of this?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

VT100 terminal and colour

Good day all I am looking for a way to change colours in a text file that get tailed. I have tried using tput, however this does not seem to work. terminal type is using putty and vt100 emulation. Any ideas. :rolleyes: Thanks J (6 Replies)
Discussion started by: jhansrod
6 Replies

2. Shell Programming and Scripting

#!/bin/sh script is in white colour

Hello friends. I realize that my question is naive, but I really want to know, why one of my scripts is in white colour (I mean letters in the body are white) while 3 residuary are multicoloured. I'm asking because I have a little problem with this particular script. It's absolutely the same as... (1 Reply)
Discussion started by: MarGur
1 Replies

3. Shell Programming and Scripting

ksh, font colour

hi all, how do i change the colour of text if i am using printf ?? in my script i am printing out response times from the server and i wanted to print out the max response time in red. ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

4. HP-UX

hpux top colour

Hello, is there some way to change b/w colour of top command output in hpux B.11.31 ? (1 Reply)
Discussion started by: tonijel
1 Replies

5. Programming

Cshell help with change colour in print

i want to ask how to change the colour of prompt message from use? and also how to change colour in printing........ i want to change it as blue colour and red colour, but i found many website still don't know how to do. how's the command is wrote? thz really!! (1 Reply)
Discussion started by: wendy1089
1 Replies

6. Ubuntu

expect script for random password and random commands

Hi I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue: I want expect script for random passwords and random commands generation. please can anyone help me? Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies

7. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

8. Shell Programming and Scripting

sed colour change

Hi, I am trying to write a script which will email a backup report from the server, The contents of the email will be: ---------------------- ---- -- ---- ----- ---- ------- ---- ------- ------- | | | | |Chnge|Wkng| | | | | | ... (6 Replies)
Discussion started by: Bdoydie
6 Replies

9. Shell Programming and Scripting

Need to generate a file with random data. /dev/[u]random doesn't exist.

Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom. I create a named pipe then: dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024 but when I cat a file to the fifo that's 1024 random bytes: cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies
RESIZE(1)                                                     General Commands Manual                                                    RESIZE(1)

NAME
resize - set environment and terminal settings to current xterm window size SYNOPSIS
resize [ -u | -c ] [ -s [ row col ] ] DESCRIPTION
Resize prints a shell command for setting the appropriate environment variables to indicate the current size of xterm window from which the command is run. For this output to take effect, resize must either be evaluated as part of the command line (usually done with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the following alias could be defined in the user's .cshrc: % alias rs 'set noglob; eval `resize`' After resizing the window, the user would type: % rs Users of versions of the Bourne shell (usually known as /bin/sh) that don't have command functions will need to send the output to a tempo- rary file and then read it back in with the "." command: $ resize > /tmp/out $ . /tmp/out Resize determines the user's current shell by first checking if $SHELL is set, and using that. Otherwise it determines the user's shell by looking in the password file. Generally Bourne-shell variants (including ksh) do not modify $SHELL, so it is possible for resize to be confused if one runs resize from a Bourne shell spawned from a C shell. OPTIONS
The following options may be used with resize: -u This option indicates that Bourne shell commands should be generated even if the user's current shell isn't /bin/sh. -c This option indicates that C shell commands should be generated even if the user's current shell isn't /bin/csh. -s [rows columns] This option indicates that Sun console escape sequences will be used instead of the VT100-style xterm escape codes. If rows and columns are given, resize will ask the xterm to resize itself. However, the window manager may choose to disallow the change. Note that the Sun console escape sequences are recognized by XFree86 xterm and by dtterm. The resize program may be installed as sunsize, which causes makes it assume the -s option. The rows and columns arguments must appear last; though they are normally associated with the -s option, they are parsed separately. FILES
/etc/termcap for the base termcap entry to modify. ~/.cshrc user's alias for the command. ENVIRONMENT
TERM set to "xterm" if not already set. TERMCAP variable set on systems using termcap COLUMNS, LINES variables set on systems using terminfo SEE ALSO
csh(1), tset(1), xterm(1) AUTHORS
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley) Copyright (c) 1984, 1985 by X Consortium See X(7) for a complete copyright notice. X Window System RESIZE(1)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy