View Full Version : SV New Tool - PCP
10-11-2007, 02:12 AM
pcp is a script for managing prompts colors :
see here for more details :
10-11-2007, 03:33 AM
i need to know what you find useful to include for prompt options :
the date in "Weekday Month Date" format (e.g., "Tue May 26")
the hostname up to the first `.'
the number of jobs currently managed by the shell
the name of the shell, the basename of $0 (the portion following the final slash)
the current time in 24-hour HH:MM:SS format
the current time in 12-hour HH:MM:SS format
the current time in 12-hour am/pm format
the username of the current user
the current working directory
the basename of the current working directory
Counting Files in the Current Directory
Display average system load
Display system uptime
Counting number of processes
Indicate if AC power is connected and percentage power remaining (NEED APM ADDON)
all these options can be script easily and the foreground & background colors too........
i've bold the ones i think i will embed but if you see others useful i miss here please, feel free to help me sort the really useful options......
10-11-2007, 05:15 AM
FIRST SUCCESSFUL :
i manage to create a new profile to save it and apply it through reboot
it's a complex prompt :
you have DATE, TIME , CURRENT USER, AVERAGE LOAD, NUM OF PROCESSES, UPTIME and CURRENT WORKING DIR........
that will be the type of prompts you will be able to generate easily......
10-11-2007, 05:22 AM
If it is not much more work, why not include them all, as you are always going to have someone that will want whatever of them you leave out.
10-11-2007, 05:32 AM
yes here is the default menu : for profile creation :
D : DISPLAY NEW PROMPT
R : RESET NEW PROMPT
S : SAVE NEW PROFILE
C : CANCEL CREATION
1 : ADD DATE
2 : ADD TIME
3 : ADD HOSTNAME
4 : ADD USERNAME
5 : ADD CURRENT WORKING DIR
6 : ADD FILES COUNT
7 : ADD SYSTEM LOAD
8 : ADD SYSTEM UPTIME
9 : ADD NUMBER OF RUNNING PROCESSES
10 : ADD BATTERY INDICATOR
11 : ADD FREE TEXTthat's not too much time, just need to create a fuction for each one
but maybe i can add other things
Thu Oct 11 04:57:11 User root Linux bt 2.6.20-BT-PwnSauce-NOSMP SysLoad 0.14 Processes 131 Uptime 8:31 WDir ~ :
this one get the kernel version ....
there's virtually no limit........
10-11-2007, 05:38 AM
However many options you put in, there will always be people that will want something more and plenty that will use them all, even if the prompt fills the screen.
10-11-2007, 05:42 AM
yes i get your point of view.....
i will add a text file explaining how to add custom options to the prompt ........but i won't do all possible options (the prompt can fill the entire screen if i want)........
will be useful, but users will have to refrain from using all options at same time or prompt will be ****ed if they don't use a sufficient wide window......
it's the only pb
i must add a prompt limit in size.......
10-11-2007, 08:33 PM
Good job Niko! Thanks for taking my "E-Z Personalizing Bash Shell Collors" to the next level! ;) I'll check it out as soon as I can.
10-11-2007, 10:42 PM