LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-05-2019, 05:13 AM   #4006
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,639
Blog Entries: 2

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423

Quote:
Originally Posted by Bindestreck View Post
Yes, it is. Why?
let's see that prompt!
 
Old 11-05-2019, 02:23 PM   #4007
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 616

Rep: Reputation: 248Reputation: 248Reputation: 248
Quote:
Originally Posted by SCerovec View Post
let's see that prompt!
Here it comes:

Code:
PS1="\[\033[1;38;5;4m\]\342\224\214\342\224\200 \[\033[1;38;5;4m\u: \w\n\[\033[1;38;5;4m\]\342\224\224\342\224\200\342\224\200☻ \[\033[0m\]"
 
3 members found this post helpful.
Old 11-05-2019, 02:30 PM   #4008
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,639
Blog Entries: 2

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423
Thumbs up

Quote:
Originally Posted by Bindestreck View Post
Here it comes:

Code:
PS1="\[\033[1;38;5;4m\]\342\224\214\342\224\200 \[\033[1;38;5;4m\u: \w\n\[\033[1;38;5;4m\]\342\224\224\342\224\200\342\224\200☻ \[\033[0m\]"
mine (way less cool):
Code:
PS1="[\u@\h:\w (\$(lsbytesum) Mb)]\$ "
~/bin/lsbytesum:
Code:
#!/bin/bash                                                                  
#     lsbytesum - sum the number of bytes in a directory listing             
TotalBytes=0                                                                 
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')                       
do                                                                           
    let TotalBytes=$TotalBytes+$Bytes                                        
done                                                                         
TotalMeg=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)              
echo -n "$TotalMeg"
 
2 members found this post helpful.
Old 11-05-2019, 06:04 PM   #4009
Aeterna
Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, CRUX, FreeBSD, Funtoo, HardenedBSD, OpenIndiana
Posts: 232

Rep: Reputation: Disabled
Quote:
Originally Posted by Bindestreck View Post
Here it comes:

Code:
PS1="\[\033[1;38;5;4m\]\342\224\214\342\224\200 \[\033[1;38;5;4m\u: \w\n\[\033[1;38;5;4m\]\342\224\224\342\224\200\342\224\200☻ \[\033[0m\]"
interesting: I am using similar bash prompt for several years now
Code:
PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]"
 
3 members found this post helpful.
Old 11-05-2019, 08:15 PM   #4010
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
Well I was curious so here's what Aeterna's prompt looks like. And I thought I was cool making the prompt magenta.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20191105_190818.png
Views:	123
Size:	39.5 KB
ID:	31777  
 
1 members found this post helpful.
Old 11-06-2019, 05:23 AM   #4011
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 616

Rep: Reputation: 248Reputation: 248Reputation: 248
Quote:
Originally Posted by Aeterna View Post
interesting: I am using similar bash prompt for several years now
Code:
PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]"
Yes, I remember this one. I went back to this but added a smiley instead:

Code:
PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200☻ \[\033[0m\]"
 
Old 11-06-2019, 12:01 PM   #4012
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 -current (started with 13.37(32))
Posts: 502

Rep: Reputation: 203Reputation: 203Reputation: 203
Nice prompt.
Any way to stand out from that ocean of lines is valid
Mine is just colorized and some custom fields.
Code:
PS1='\[\e[07;32m\]\u@\h\[\e[07;33m\]$(echo ${SHELL##*/} \
        )\[\e[07;37m\]\w\[\e[07;32m\]\$\[\e[m\] '
Attached Thumbnails
Click image for larger version

Name:	prompt.jpg
Views:	75
Size:	29.5 KB
ID:	31781  
 
1 members found this post helpful.
Old 11-06-2019, 12:01 PM   #4013
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 616

Rep: Reputation: 248Reputation: 248Reputation: 248
Don't really like it removed the root username when as root, so, my final PS1 looks like this:



Code:
PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\224\200☻ \[\033[0m\]"
Attached Thumbnails
Click image for larger version

Name:	2019-11-06-180040_524x191_scrot.png
Views:	71
Size:	11.7 KB
ID:	31782  

Last edited by Bindestreck; 11-06-2019 at 12:06 PM.
 
Old 11-06-2019, 12:07 PM   #4014
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 616

Rep: Reputation: 248Reputation: 248Reputation: 248
Quote:
Originally Posted by Paulo2 View Post
Nice prompt.
Any way to stand out from that ocean of lines is valid
Mine is just colorized and some custom fields.
Code:
PS1='\[\e[07;32m\]\u@\h\[\e[07;33m\]$(echo ${SHELL##*/} \
        )\[\e[07;37m\]\w\[\e[07;32m\]\$\[\e[m\] '
Very nice!

Yeah,, about that one-liner, sorry
 
Old 11-06-2019, 12:36 PM   #4015
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 -current (started with 13.37(32))
Posts: 502

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by Bindestreck View Post
Very nice!

Yeah,, about that one-liner, sorry
I think is a misunderstood, with "ocean of lines" I don't mean your prompt post,
but the ocean of lines of output in the terminal when you have to scroll.
It's very difficult to see where are the prompt and the command start
without anything that catch your attention.
 
Old 11-06-2019, 03:54 PM   #4016
v32itas
LQ Newbie
 
Registered: Jul 2017
Location: Europe
Distribution: Slackware
Posts: 9
Blog Entries: 1

Rep: Reputation: Disabled
https://i.imgur.com/t777dCS.png
Attached Thumbnails
Click image for larger version

Name:	snapshot2.jpg
Views:	102
Size:	136.2 KB
ID:	31784  
 
2 members found this post helpful.
Old 11-07-2019, 04:06 AM   #4017
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,639
Blog Entries: 2

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423
Greetings from vivaldi

I am so glad i seem to have spawned a prompt competition (prompetition?)

All good and nice work!

Keep pimping up those boxxen!
 
Old 11-07-2019, 04:07 AM   #4018
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,639
Blog Entries: 2

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423
http://i.imgur.com/bGxRvoo.png
 
Old 11-07-2019, 05:06 AM   #4019
GazL
LQ Guru
 
Registered: May 2008
Posts: 5,250
Blog Entries: 18

Rep: Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991
Quote:
Originally Posted by SCerovec View Post
Greetings from vivaldi

I am so glad i seem to have spawned a prompt competition (prompetition?)
from my bashrc:
Code:
ta_bold="$(tput bold)"  &&  ta_off="$(tput sgr0)"
PS1="\[${ta_bold}\]\$ \[${ta_off}\]"
did I win?

When it comes to prompts, I'm in the less is more camp.
 
Old 11-09-2019, 06:36 AM   #4020
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,639
Blog Entries: 2

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423
Quote:
Originally Posted by GazL View Post
from my bashrc:
Code:
ta_bold="$(tput bold)"  &&  ta_off="$(tput sgr0)"
PS1="\[${ta_bold}\]\$ \[${ta_off}\]"
did I win?

When it comes to prompts, I'm in the less is more camp.
So far it goes for "less is more", here's Your medal

OTOH, where it goes full out bells and whistles, i further changed the Bindestreck's to color root to red:
Code:
PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;37m\]]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\224\200☻ \[\033[0m\]"
Other than that, I found I have to have them in both root's and users .bashrc to be effective when I su?

The system I tested this on is "frugal" -current I made from AlineBOB's LiveSlack - and I still have few of his quirks that haunt me compared to a clean install one being the [ctrl]+[d] not working as I am used to (has to do some with EOF?)
 
  


Reply

Tags
background, cwm, dwm, framebuffer, gui, i3, ion3, kde, monitor, musca, screenshot, tmux, wallpaper, xfce4, xterm


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
3D Desktop on Slackware? darkhatter Slackware 3 10-10-2006 01:26 PM
Slackware 10.0 with NO Desktop NiPP Linux - Newbie 2 01-02-2006 11:43 AM
3d desktop on Slackware k1ll3r_x Linux - Software 1 09-20-2005 11:47 PM
Desktop Slackware s0no Slackware 5 12-04-2004 12:20 PM
I can't get my desktop in Slackware 10 DraGoNsLaYeR Linux - Newbie 1 06-27-2004 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:13 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