Shinobu’s Secrets

January 27, 2009

More terminal (aka CLI) programs to the rescue

Filed under: Linux, Updates — Shinobu @ 10:03 am

So I just set up Alpine for my multiple Gmail accounts with this guide. It works perfectly. (I first tried setting up mutt, but it was a huge pain, and confusing as well.)

Oh, and I also installed mpd and ncmpcpp . I really like ncmpcpp — it’s so easy to learn with the built-in help system. I like having a simple music player client, without all the cover/album art features that most people care about these days. And the memory footprint of mpd + ncmcpp is very, very, very low. Just the way I like it!

January 26, 2009

Arch Linux + Xmonad

Filed under: Linux, Productivity/Perspectives, Updates — Tags: , , — Shinobu @ 1:48 am

I finally got around to installing Arch on my desktop yesterday. At first I installed XFCE, and then Xmonad, and then I decided to dump XFCE altogether and just use Xmonad for all my computing needs. Xmonad is tricky to configure, so I only have a very basic xmonad.hs file (it’s the template config file found on the Xmonad wiki pages, minus the parts that give me errors on Xmonad 0.8.1).

I think tiling window managers like Xmonad are really the only way to go. I was getting sick of doing ALT+MOUSE2 to resize my windows to make most of my screen real estate on XFCE. I really like how my windows perfectly line up into neat groups. I haven’t even touched any of the great extensions out there for Xmonad yet.

In other news: I started using vimperator. It’s really neat once you spend 1 day with it. The biggest advantage for me: I don’t have to click on History -> Recently closed tabs -> tab to open up a tab I accidentally deleted. All I do instead now is just type ‘u’! And I don’t do CTRL+T, CTRL+K to do my searches — instead it’s now just ‘t searchterm’ or ‘t a packagename’ (where the ‘a’ is a keyword for the Arch Package Repository search engine). Woohoo!

January 17, 2009

How to quickly make a playlist for mplayer

Filed under: FYI, Linux, Music — Shinobu @ 11:37 pm

Mplayer uses a simple kind of playlist: a text file with the path and name of each file to be played. The path to the new file is relative to the location of the playlist file itself. So, you can do something like this:

find -maxdepth 1 -type f -name \*.\* > playlist

This will find all the files in the current directory that have a “.” character in it, and put the results into playlist (a text file) — i.e., it will find all files with some kind of extension, and exclude directory names with a period in them. This works well if the only type of files with extensions are audio files. If you want to search deeper down directory levels, just increase the maxdepth value, or leave out the maxdepth parameter altogether to search recursively.

The “>” operator replaces whatever text was inside the “playlist” file with the output of the previous command (here, the find command with all our options). If you just wanted to append the results to an existing playlist file, you could just use “>>” instead of “>”.

To play the playlist, just do:

mplayer -playlist playlist

…where “playlist” is the file with all the songs in it. Be sure to include the full path to the playlist if you are currently not inside the same directory. To make the entire playlist loop forever, type:

mplayer -playlist playlist -loop 0

and it will loop the entire playlist forever. Unfortunately, putting the “loop=0″ info in my ~/.mplayer/config file makes mplayer read that paramter first, and thus, only repeat the first file in my playlist forever. There seems to be no workaroud to this, except manually appending the loop paramter after the playlist parameter, as shown above.

More info here.

UPDATE November 12, 2009: I discovered a simple hack around the above mentioned problem about trying to loop the entire playlist. The solution is to remove the “loop=0″ line from your ~/.mplayer/config, and instead make use of shell aliases. I use zsh, and this is what I have in my ~/.zshrc (the second alias is the key):

alias m='mplayer -loop 0'
alias mp='mplayer -loop 0 -playlist'

Now, to play any single file infinitely, simply use “m [file]“. To infinitely loop an entire playlist, simply do “mp [playlist]“. You can “>” and “<” hotkeys to move around the playlist.

January 8, 2009

Arch Linux: First Impressions

Filed under: Linux — Shinobu @ 5:15 am

So now that I’ve been using Arch Linux on my laptop for 2-3 weeks now, it is time for a review. Since I’ve already written (albeit a bit  indirectly) about the advantages of Linux (any distro) over Microsoft Windows, I will not repeat myself as to those points. I will first discuss why I decided to ditch Xubuntu, and then talk about why I think I made the right choice.

Why I Switched to Arch Linux

These were the most compelling reasons to make the switch:

  1. Faster boot times on my aging laptop.
  2. Freeing myself from the endless cycle of upgrading from one point release to another (e.g., getting rid of “Hardy” and installing “Ibex,” and so on).
  3. The desire to stay ultra-modern as far as software is concerned — i.e., getting the latest stable versions of software with ease.
  4. Freeing my system of any unnecessary packages (aka “bloat”) / keeping my system as simple as possible.

As for #1, I think this reason turned out to be the most misleading one. I don’t notice any significant gains in bootup times. But, it’s not like I can expect a whole lot from this Dell Latituded D505. As for #2, this is a huge bonus. As you may well know, Arch is famous for its “rolling release” system (like Gentoo). I.e., once you install it, and update it using the package manager (known as pacman), you are up-to-date with the latest software. I also appreciate how quickly the Arch maintainers update their packages to the latest versions, to make this all work. Reason #3 thus fits in with #2. As for #4, I can feel that there’s less bloat — since I installed almost everything manually, including XFCE, after the Arch installation finished!

Why the Switch Was Worth It

Yes, I have no regrets. The installation itself took around 2 days (one evening to get through the installation process, and another day to install XFCE and to customize most things back to how things were), and I learned a lot about Linux just by going through this process.

I don’t fear losing the direct applicability of the mountains of Ubuntu forum posts should I get in trouble or if something breaks. I’ve noticed that generally, the Arch community is composed of people who’ve used Linux for quite some time, and they are very, very active. Their community spirit is very impressive, and all the more helpful, since there are fewer first-time Linux users. The Arch Wiki pages are particularly well-documented, although a bit disorganized at times.

I also like how I understand most of my core files, like my xorg.conf and GRUB’s menu.lst files, since they do not come pre-installed with a bunch of comments and options that I didn’t put there. Both of these files are shorter and cleaner than before.

I will probably install Arch64 (the 64-bit version of Arch) on my desktop later this spring, or summer.

Blog at WordPress.com.