QuicksearchOuter LandsBlogs I ReadSyndicateCategories |
Another ~/.bashrc trick: change prompt by shell depthWednesday, June 30. 2010if [ "$SHLVL" -le 1 ]; then _ps1_code="0;7" else _ps1_code="$(( ($SHLVL - 2) / 6 % 2));3$((6 - ($SHLVL - 2) % 6))" fi export PS1='\[\e[36m\]\@ \[\e[30;1m\]\h:\w \[\e['"$_ps1_code"'m\]\$\[\e[0m\] ' unset _ps1_code 12:17 PM foreigner:/etc $ bashThis uses the value of $SHLVL to color the '$' in the prompt. A login shell will display with reverse video; deeper shells (e.g. when using :sh in vim) will get a color according to their depth. In this case, it goes 'backwards' from cyan to red, then bold cyan to bold red, before repeating the colors. Due to the special handling of level 1, reverse video is never repeated in the cycle. Also, since the SHLVL is supposed to be constant in a given shell, the prompt color is calculated once, and the result is inserted into PS1.The deeper purpose of this code is to give me some sort of visual indication of whether I'm in the base level shell (reverse video) or a deeper one (color). The difference in colors allows me to notice if I unintentionally ran vim again from inside another shell, instead of exiting the shell to return to vim. The preview is displayed in the BlackRock theme. The Nuclear OptionThursday, June 24. 2010
Quoth the Delicious Firefox addon TOS:
1. Licensed Uses and Restrictions. It is quite unclear to me how one would use a bookmarking website addon for Firefox to operate much of anything, let alone anything like nuclear facilities or life support. Especially considering the restrictions in 1.b.i and 1.b.ii, which prevent any modifications or embedding of the software into hardware or firmware. Considering the other provisions of this license—including their insistence on Santa Clara, California as the jurisdiction, regardless of any conflict of law provisions—I declined. I am now safe to operate nukes with my Firefox, I think. It's been a while since I read that EULA... Canonical: Forgetting the PresentTuesday, June 22. 2010
Looking at the Ambiance theme and the update manager tonight (as my administration is done by a separate user), I'm reminded of a few problems in both the latest Ubuntu release, and Ubuntu in general.
First is the decision to move the window controls in an LTS release. There are plenty of rants out there about the moving; my point tonight is that it was done, and replaced with nothing, in an LTS release. Assuming that the windicators or Super Magic Gesture Button arrive in a future Ubuntu release, it leaves everyone on the LTS with a half-baked start of a project that doesn't bring any value to the platform by itself. And if Canonical is thinking of supplying their next k3wl feature as an update for Lucid in 10.04.2+, that runs the risk of destabilizing Lucid—and making it less desirable for exactly the audience that the LTS releases are intended to address. Aside from that, the new theme itself has some problems. The oranges in the palette for Ambiance and Radiance don't quite match the oranges in the icon theme, with the GTK theme being a bit more pink than the icons. It clashes just enough to make me wonder how Canonical could seriously be putting this scheme forward as its new, "professional" look. It also bugs me whenever I see a progress bar that hasn't gotten full enough for the fill to be at least circular; the overlapping end caps look entirely silly and occasionally pixellated. Again, this is supposed to be good enough to look at for years? The update manager is lacking some fit and finish as well. Whenever I check for updates, it starts out on something like "1 of 17 files", then stops in the 20s somewhere, maybe a couple of times, and finally gets up to 39 files before it is truly finished. Each time it stops to download a big file, it's a file or two from the last one, and the bar almost fills up—only to drop down again when the next files are discovered. I've been watching this happen for the past 3 years that I've been on Ubuntu. Is it really that much effort to cache how many files/bytes there were last time for future estimates, or provide a complete manifest on the server? Another thing that hasn't changed in the past 3 years in Ubuntu is the lack of multiarch support. You know, that Fedora 7 added to RPM about the time Feisty was released. If you want to run 32-bit code on a 64-bit system, you can't just use 32-bit package files; you need package files for the 64-bit architecture that have been carefully compiled to contain 32-bit code for the 64-bit environment. These are, of course, only produced for popular libraries, so if you have a package you want to install that depends on a library that's not available, you get to compile it yourself. If you can. The missing multiarch support wouldn't be much of a problem, except that developers are generally producing 32-bit versions of packages before 64-bit ones. Flash, NaCl, V8, LuaJIT, Amazon MP3 Downloader, and zsnes, for instance. Ubuntu rose to prominence based on its focus on the user, but lately—especially with the release of Lucid—it seems to be floundering. It seems that Canonical is working on experimental innovations at the expense of producing a really great product, and expecting everyone to fix the questionable decisions in Lucid by upgrading to Maverick. Thereby breaking their system and defeating the point of offering Lucid as an LTS release.
(Page 1 of 1, totaling 3 entries)
Originally based on the 'Coffee Cup' theme by David Cummins, then heavily modified right here at sapphirepaw.org. |