LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices

Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

A good $PS1 for displaying long paths in the bash prompt

Posted 03-13-2013 at 11:29 PM by the dsc (linux-related notes)
Updated 03-13-2013 at 11:30 PM by the dsc
Tags bash, prompt, ps1

Code:
PS1='${debian_chroot:+($debian_chroot)}\t \u $(if [ ${#PWD} -gt 30 ] ; then myPWD="${PWD:0:12}/\W" ; myPWD="${myPWD:0:25}" ; else myPWD=$PWD; fi ; echo $myPWD) $ '
It will display full paths smaller than 30 characters entirely, but for longer paths it will get only the first characters of the whole path, and the fist characters of the last folder in the full path.

The end result is something like:

HH:MM:SS tuxguy /home/tuxguy/mystuf.../xmas...
Member
Posted in Uncategorized
Views 578 Comments 0 the dsc is offline
Old

Ditch Deja Vu Sans Condensed, use Liberation Sans, and be happy

Posted 03-09-2013 at 06:01 PM by the dsc (linux-related notes)
Updated 03-09-2013 at 06:02 PM by the dsc (gruesome spelling mistake)

I used to like the condensed variant of Deja Vu, which is the default font (in the regular variation) for many linux distributions/DEs I guess. I've always disliked the regular variant, I find it too wide, while the condensed is very nice to look at. It's quite a hassle to actually use it everywhere though, either the font is buggy, or the apps that read it are buggy. I think it's the former as other fonts with two "nested subtypes/variants" work (such as liberation). The GUI settings...
Member
Posted in Uncategorized
Views 601 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 07:15 PM.

Main Menu

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration