New laptop

A few days ago I bought a Lenovo Ideapad 320-15AST. I had a budget of €400 and, after browsing a few stores for a couple of hours, I found this one for a bit less than €350.

At the hardware level, the computer has reasonable specs. They are (retrieved from inxi):

CPU: AMD A9-9420 dual core (1397MHz/3000MHz | boost: 3600MHz)
GPU: AMD Radeon R7 M260/M265
HDD: 1000.2GB 5400RPM
RAM: 8GB DDR4

This is the first time I’m buying Lenovo. I’ve always had a preference for Asus that dates around two decades, either in laptops or in desktops and components. Also, I haven’t used AMD for probably 10 years or more, but I have good memories of their CPUs at the time, so let’s see how this goes. The expectations are high.

Somewhat sadly, it came with Windows 10 preinstalled and the store clerk said they wouldn’t refund me for the license. I wasn’t that much disappointed (although it would’ve been nice to save a few dozen euros) because this will come in hand in the situations I have to give support to computers with this OS installed.

After completing the initial Windows setup, I downloaded and installed Firefox, proceeded to transfer Manjaro and wrote the ISO file to a USB drive. Don’t know why, but it got a kernel panic everytime I tried to boot it.

Next in line was Ubuntu and everything went smoothly. It’s still going. The computer has a good performance with this OS, even when I’m playing Football Manager 2018, browsing the web and listening to music on Youtube, all at the same time.

I do notice, however, the lack of performance of the hard drive, compared to the SSD I have in the old laptop. I have to switch it soon and get a caddy.

How-to customize the Bash prompt

In order to adapt a bit more my Debian Stable installation to my workflow, I’ve been tweaking the bash prompt. Simplicity and small line width are key here, because I often have tmux running with several panes in the same window and small panes with large one-liner prompts suck a lot! Everything feels crammed and hard to read. Just take a look at the image below to get an idea.

crammed bash prompt

After running a few commands in each pane with this prompt configuration, everything gets really crowded and confuse. For sanity safeguarding reasons and workflow improvement, the only thing to do is customize the prompt.

The Debian Stable bash prompt, shown on the image above, default value is:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

To make it more useful, I changed the second line to this:

PS1="[\033[00;32m]\u@\h[\033[00m]:\w[\033[00m]\n└─ [$(tput bold)]\$(__git_ps1 '[%s] ')\$: [$(tput sgr0)]"

All put together:

if [ "$color_prompt" = yes ]; then
		PS1="\[\033[00;32m\]\u@\h\[\033[00m\]:\w\[\033[00m\]\n└─ \[$(tput bold)\]\$(__git_ps1 '[%s] ')\$: \[$(tput sgr0)\]"
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

And this is the result:

readable bash prompt

Not only I get a more readable prompt (and with “more room to breathe”, if you may), but I get the name of the current branch if I’m in a Git repository folder. This is a convenient feature to have if you work with this version control system.

There are a lot more ways one can configure the prompt. Both How-To Geek and Boolean World websites have nice introductory guides to get you started. The Arch Linux wiki entry about this is also a good read. Oh, and RTFM (Read The … Fine … Manual).

Trying Debian Stable for everyday desktop usage

A few days ago I installed Debian Stable. I’d been using Sparky Linux, which is based on Debian Testing, and was happy with it. The tools it integrates make the life of a desktop user easier when managing the system, I had no issues with it and had a bunch of software available in the repositories.

Well, since Sparky is based on Debian, the “bunch of software available in the repositories” part was a given from the start.

Although happy, I was looking for an operating system a bit more conservative in terms of stability and reliability. I’d been inspired very recently by the short OpenBSD usage I had on a virtual machine and some readings about BSD systems, so I thought Debian Stable would be the best choice.

Here are my motives for choosing Debian over, say, CentOS or Slackware or even a BSD system:

  • It’s a Linux kernel based operating system and I’ve been mostly using Debian Testing or Debian-based systems for over a decade, so I’m familiar with it;
  • It prioritizes stability over the latest stable version of a software;
  • It has a lot of software available;
  • It has a very large community.

Almost a week went by and my fears of using older versions of any software (motivated almost exclusively by a potential lack of some functionality) are gone. The system is really stable and I have almost all the tools I need in the repositories. I only needed to install a handfull of apps from external sources (deb-multimedia, github, flatpak and snap) because they were not packaged in the distro’s repositories.