Registreer FAQ Berichten van vandaag


Ga terug   Scholieren.com forum / Technologie / Software & Hardware
Reageren
 
Topictools Zoek in deze topic
Oud 13-05-2002, 21:56
dystopia
dystopia is offline
Hoe ziet jouw prompt eruit? Dus, de code of het gevalletje op een screenshot. Ik heb sinds kort deze, voor Bash:

PHP-code:
function elite2 {
local GRAD1=`tty|cut -d/ -f3`
local COLOR1="\[\033[0;36m\]"
local COLOR2="\[\033[1;36m\]"
local COLOR3="\[\033[1;30m\]"
local COLOR4="\[\033[0m\]"
PS1="$COLOR3Ú$COLOR1Ä$COLOR2($COLOR1\u$COLOR3@$COLOR1\h$COLOR2)$COLOR1Ä$COLOR2($COLOR1\#$COLOR3/$COLOR1$GRAD1$COLOR2)$COLOR1Ä$COLOR2($COLOR1\$(date +%H:%M)$COLOR3:$COLOR1\$(date +%m/%d/%y)$COLOR2)$COLOR1Ä$COLOR3-$COLOR4\n$COLOR3À$COLOR1Ä$COLOR2($COLOR1\$$COLOR3:$COLOR1\w$COLOR2)$COLOR1Ä$COLOR3-$COLOR4 " 
PS2="$COLOR2Ä$COLOR1Ä$COLOR3-$COLOR4 "

Dat resulteert in 't volgende (zonder VGA font):



Dit is overigens ook een leuke, laat een klokje rechtsbovenaan in je term zien. Ook voor Bash:

PHP-code:
function prompt_command {
let prompt_x=$COLUMNS-5
}

PROMPT_COMMAND=prompt_command

function clock {
local       BLUE="\[\033[0;34m\]"
local        RED="\[\033[0;31m\]"
local  LIGHT_RED="\[\033[1;31m\]"
local      WHITE="\[\033[1;37m\]"
local  NO_COLOUR="\[\033[0m\]"
case $TERM in
    xterm
*)
        
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
        
;;
    *)
        
TITLEBAR=""
        
;;
esac

PS1
="${TITLEBAR}\
\[\033[s\033[1;\$(echo -n \${prompt_x})H\]\
$BLUE[$LIGHT_RED\$(date +%H%M)$BLUE]\[\033[u\033[1A\]
$BLUE[$LIGHT_RED\u@\h:\w$BLUE]\
$WHITE\$$NO_COLOUR "
PS2='> '
PS4='+ '

(kleur is aan te passen, uiteraard - screenshot mag je zelf maken )
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs

Laatst gewijzigd op 13-05-2002 om 21:58.
Met citaat reageren
Advertentie
Oud 13-05-2002, 21:57
NG
Avatar van NG
NG is offline
C:\

Met citaat reageren
Oud 13-05-2002, 22:00
dystopia
dystopia is offline
Citaat:
DiepFries schreef:
C:\

Ehm, bijzonder waarom geen custom prompt? Moet ik overigens ook nog 'ns instellen bij Windows, heb alleen geen leuke. Wel alternatieve shells gevonden
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs
Met citaat reageren
Oud 13-05-2002, 22:04
DEChengst
Avatar van DEChengst
DEChengst is offline



-Desecrator
__________________
PDP, VAX en Alpha fanaat ; HP-Compaq is de Satan! ; Bidt u allen dagelijks richting Maynard! ; Ernie==lief ; Het leven begint bij 150 km/u ; aka Desje
Met citaat reageren
Oud 13-05-2002, 22:07
pietje63
Avatar van pietje63
pietje63 is offline
Citaat:
Desecrator schreef:



-Desecrator
onleesbaar
__________________
whatever u want, whatever u do, don't forget me :)
Met citaat reageren
Oud 13-05-2002, 22:30
Strange Dude
Strange Dude is offline
Citaat:
pietje63 schreef:

onleesbaar
Als ik het goed lees is de prompt een eenzame '#'

Mijn prompt is [\u@\h \W]\$ (dus: 'User@Computernaam dirnaam]$')
Da's de standaardpromt toen ik hem installeerde

Zo afschuwelijk veel werk ik niet met de prompt, en als ik dat doe dan vind ik de promt niet zo bijster belangrijk.
Met citaat reageren
Oud 13-05-2002, 23:01
Paperz
Avatar van Paperz
Paperz is offline


Hoppa, hij lijkt net op me IRC...
__________________
Val lekker even dood! Cooking is science for hungry people *Mysteria*
Met citaat reageren
Oud 14-05-2002, 08:06
Orion
Avatar van Orion
Orion is offline
yay..



Normaal heb ik trouwens de engelse versie, nu ff nederlands
__________________
Ongefilterd. Van nature troebel.
Met citaat reageren
Oud 14-05-2002, 11:23
NG
Avatar van NG
NG is offline
Citaat:
dystopia schreef:


Ehm, bijzonder waarom geen custom prompt? Moet ik overigens ook nog 'ns instellen bij Windows, heb alleen geen leuke. Wel alternatieve shells gevonden
Waarom zou ik?
Met citaat reageren
Oud 14-05-2002, 13:48
Wasp
Avatar van Wasp
Wasp is offline

Niet echt bijzonder ofzo, wel handig.
__________________
Ex fb-er van Drugs & Alcohol. Dajjetffweet!
Met citaat reageren
Oud 14-05-2002, 15:38
NielZ
Avatar van NielZ
NielZ is offline




Ben hard aan het leren 'm te gebruiken, ben begonnen als ábsolute n00b, nu kan ik het een beetje...
__________________
Mage Powerrr \o/ • Voor je 't weet trekken ze de stekker eruit...
Met citaat reageren
Oud 14-05-2002, 16:59
Conan the Librarian
Conan the Librarian is offline
Windows / DOS:

Code:
C:\bla
Linux:

Code:
ikbeneenuser@zoheetmijncomputer:/home/ikblijfeenuser> bla
FreeBSD:

Weet ik zo niet.
Met citaat reageren
Oud 14-05-2002, 19:18
forum.scholieren.com
forum.scholieren.com is offline
Citaat:
dystopia schreef:
lange quote
In welk bestand moet je dat zetten???

Laatst gewijzigd op 14-05-2002 om 19:47.
Met citaat reageren
Oud 14-05-2002, 19:47
Koen
Avatar van Koen
Koen is offline
Citaat:
forum.scholieren.com schreef:


In welk bestand moet je dat zetten???
Zou je aub niet dat hele stuk tekst willen quoten, maar gewoon even een vervangend stukje? Is wel zo prettig voor het overzicht.
Met citaat reageren
Oud 14-05-2002, 23:09
dystopia
dystopia is offline
Citaat:
NielZ schreef:
http://members.home.nl/nielzju/crap/top.jpg

http://members.home.nl/nielzju/crap/w.jpg

Ben hard aan het leren 'm te gebruiken, ben begonnen als ábsolute n00b, nu kan ik het een beetje...
Heyyy gaaf Darwin

Je gebruikt tcsh. Doe dit: chsh
Kies voor Bash

Selecteer de code die ik poste van bijv. die eerste en type dan elite2. Met elite2 wordt de functie aangeroepen en de variabelen $PS1, $PS2, etc. etc. veranderd. Vind je 'm leuk? Pleur 'm dan in .bash_profile en zet eronder simpelweg elite2. Kleur veranderen? www.google.nl zoek naar Bash prompt howto
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs
Met citaat reageren
Oud 14-05-2002, 23:10
dystopia
dystopia is offline
Citaat:
forum.scholieren.com schreef:


In welk bestand moet je dat zetten???
~/.bash_profile
en eronder dan zetten: elite2
of: clock

Btw, zonder dit: ?>
dat is van PHP, dat zet-ie er automatisch achter. Maar ja ik moet echt die tags gebruiken anders zet-ie 't niet op 1 lijn.
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs
Met citaat reageren
Oud 14-05-2002, 23:23
Koen
Avatar van Koen
Koen is offline
Citaat:
Btw, zonder dit: ?>
dat is van PHP, dat zet-ie er automatisch achter. Maar ja ik moet echt die tags gebruiken anders zet-ie 't niet op 1 lijn.
Waar dacht je dat die [ code ] tags voor waren?
Met citaat reageren
Oud 14-05-2002, 23:51
dystopia
dystopia is offline
Code:
aaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjesaaaaaaaaaaaaapjes
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs
Met citaat reageren
Oud 14-05-2002, 23:52
dystopia
dystopia is offline
Werkt niet echt zo te zien. Hij moet nl. de layout verneuken
__________________
The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently - Steve Jobs
Met citaat reageren
Advertentie
Reageren


Regels voor berichten
Je mag geen nieuwe topics starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Aan
HTML-code is Uit

Spring naar

Soortgelijke topics
Forum Topic Reacties Laatste bericht
Software & Hardware [MSN] Foutmelding 80004005
marrel
3 12-07-2006 21:40
Levensbeschouwing & Filosofie Halal
0fd1ba6bef258b3
99 31-03-2005 16:56
De Kantine Goochelaar, gedachten lezen
Clons
12 10-05-2004 21:56
Games ¿Civilization 3?
Not for Sale
217 11-01-2002 08:11


Alle tijden zijn GMT +1. Het is nu 21:41.