LinuxQuestions.org
Review your favorite Linux distribution.
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.
Uncategorized Entries with no category
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 630 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 740 Comments 0 the dsc is offline
Old

Make some apps (mainly KDE apps with text fields) start faster

Posted 02-26-2013 at 07:37 PM by the dsc (linux-related notes)
Updated 02-26-2013 at 07:39 PM by the dsc

Just create a folder "~/.compose-cache".

Or better yet, at least in a semi-philosophical level, have your startup script to create "/dev/shm/.compose-cache" every time, and just create it once, and a soft link to your home folder. No unnecessary access to your disk, writing to and reading from memory instead. Which is often assumed to be better for several cache-type usages, both for performance and (supposedly) for the lifespan of your hard disk*. Some people...
Member
Posted in Uncategorized
Views 368 Comments 0 the dsc is offline
Old

Controlling VLC via openbox key bindings... and wget(!)

Posted 01-28-2013 at 10:21 AM by the dsc (linux-related notes)
Updated 01-28-2013 at 06:10 PM by the dsc (fixing some stuff, redirection didn't work that way)

On openbox' rc.xml, in the corresponding section:

Code:
    <keybind key="W-z">
      <action name="Execute">
<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_previous -O /dev/null</execute> 
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="Execute">
	<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_next
...
Member
Posted in Uncategorized
Views 622 Comments 0 the dsc is offline
Old

Wacom tablet and the "keepshape" option, on openbox

Posted 11-21-2012 at 09:54 PM by the dsc (linux-related notes)
Updated 11-21-2012 at 09:59 PM by the dsc

On KDE you can set "keepshape" on "systemsettings", but apparently there's no way to do it in any other DE. The proper way to have "keepshape" working does not seem to work on Debian Wheezy (setting it on xorg.conf.d/50-wacom.conf). The "standard" alternatives are a static xorg.conf, and perhaps figuring hal/udev rules, which I don't know how to do.

Another way to do it is via xsetwacom, explicitly setting the active area along the lines of:...
Member
Posted in Uncategorized
Views 959 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 05:24 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration