I write not because I wish for others to read what I might say, but rather because I do not wish for my thoughts to vanish with time, as I will.
I say this as if I am a writer.
I write not because I wish for others to read what I might say, but rather because I do not wish for my thoughts to vanish with time, as I will.
I say this as if I am a writer.
If you have been following my blog at all lately, you’ll know that I’ve been pretty obsessed with my brand new ASUS ux305. After browsing /r/unixporn for days without doing anything, I decided to take a stand against my bland i3 setup and get things rolling. One of the things that has always bothered me about my Linux machines is the fact that a lot of the hardware keys don’t work because I am too lazy to make them work.
This was changing. Now.
So far, for my volume keys, I had them hooked up to a small BASH script which called on alsamixer
to raise or lower the volume by 5%. My volume level is also continuously displayed in a conky panel at the bottom of my screen; however, the conky panel only updates every second, and sometimes this second is a little too slow when the volume button is being pressed in rapid succession. Thus, I needed something to alert me in realtime when I was changing the volume.
The main thing I was interested in was making something like GNOME or OSX have – something that pops up and alerts you of the volume (Preferably without an annoying popping noise). Something like this:
In order to do so, I needed to find a tool that would display something on the screen. Some sort of notification/message platform that was extremely lightweight. I have heard of some of my friends using dzen2 to power their panels, so I decided to look into that. It was the perfect solution. Basically, now every time I call my volume changing scripts, I can display the current volume level in some sort of alert.
First, I had to create an alert script that would make my alert designs a little more portable and easily customizable. I went with something that allowed me to create alerts in both the middle and the top of the screen and with colors that matched my status bar. The result was this mess:
#!/bin/bash WIDTH=300 HEIGHT=50 # This script shows an alert using dzen screenWidth=$(xdpyinfo | grep 'dimensions' | egrep -o "[0-9]+x[0-9]+ pixels" | sed "s/x.*//") screenHeight=$(xdpyinfo | grep 'dimensions' | egrep -o "[0-9]+x[0-9]+ pixels" | egrep -o "x[0-9]*" | sed "s/x//") let "middleY = $screenHeight / 2 - ($HEIGHT/2)" let "middleX = $screenWidth / 2 - ($WIDTH/2)" if [ "${2}" == "top" ]; then echo $1 | dzen2 -fn "DejaVu Sans Mono 8" -p $3 -h $HEIGHT else echo $1 | dzen2 -fn "DejaVu Sans Mono 8" -p $3 -y $middleY -x $middleX -h $HEIGHT -w $WIDTH & fi
Basically, this script takes 3 arguments – The message, the position, and the wait time. This is all of the information I am going to need to ever specify for my popups. Now all that is left is to get the volume buttons working with the script. My volume buttons are already linked to two scripts via my i3 config file, mainly the two lines:
bindsym XF86AudioRaiseVolume exec $HOME/.i3/bin/raiseVolume.sh bindsym XF86AudioLowerVolume exec $HOME/.i3/bin/lowerVolume.sh
The final step is simply creating the lowerVolume.sh and raiseVolume.sh scripts. They are simple, now. They basically call amixer
to handle the volume control, save the output, and display it in an alert. Here’s the code to lowerVolume.sh
#!/bin/bash volume=$(amixer -c 1 set Master 5%- | egrep -o "[0-9]+%") `$HOME/.i3/bin/showAlert.sh "Volume: $volume" middle 1`
Note that this uses our alert script to display a message in the middle of the screen for 1 second. It’s perfect. The raiseVolume.sh
script is exactly the same, but there is a “5%+” instead of a “5%-“.
The end result is beautiful.
This alert system will soon be implemented into the script I use to detect new emails and brightness keys, once I get them working.
As I lie in bed messing around with my ux305, there are a few things that I have noticed that are driving me a little crazy. Since I am too tired to formulate my thoughts in a formal way, I shall simply use bullets to express them.
Anyway, I digress.
So far, I have been using my ASUS ux305 for exactly one week. Needless to say, given its great track record, the laptop itself has been treating me extremely well. I am continually impressed by the way the laptop feels, the keyboard, the screen, and the battery life. Let’s talk about all of those for just a moment.
The way the laptop feels is amazing. Whenever I pick it up, I am confident that it won’t bend or break on me, although it is very light. It’s metal body is nice and smooth and very sleek. I do have a couple very small complaints that are as follows:
Besides from those complaints, the laptop is amazing. My 7 hour battery life has not let me down, the 1080p IPS display is gorgeous and has a huge pixel density, and the keyboard feels very nice to type on.
And now to the other point of this post:
As I covered in the last post, I was able to install Arch Linux on this machine without a hitch. Everything worked properly out of the box, which made me very happy. I am still running SLiM, i3, Conky, and the usual software. Like I said, everything has worked out of the box and using a tiling window manager is a great way to take advantage of the small screen but great resolution. I will report on the exact software I am using a bit later.
This post is not only going to be brief, but also rather uninformative. My brand new ASUS ux305 arrived in the mail today and I spent a majority of the day playing with it. The laptop is beautiful. It has a very high quality build and feels extremely similar to the Macbook Air. One of the things I loved about the two months I spent with a macbook air was the keyboard. Well, I must admit, ASUS has done a great job at matching the quality of that keyboard. The size, the battery life, the weight.. everything about this laptop is perfect.
The first thing I did was go ahead and install Linux on this machine. My distro of choice is Arch Linux, so naturally I decided to put the Arch install .iso onto a flashdrive using Rufus. I then stuck the USB drive in and rebooted into the BIOS (Which is the del key for the ux305). Once in the BIOS, I noticed that it did not immediately detect the flashdrive as a boot device. No worries, I added an entry to the BIOS boot menu and pointed it at launch.efi on the flash drive. Everything went smoothly from there.
I simply followed the beginner’s guide, noting that I was setting up things for a UEFI system. This meant that I needed to do a few special things such as use GPT for my partition tables instead of the MBR I used on all of my other machines to allow for dual-booting.
Everything went great until I was required to install a bootloader. For some reason, the first time I installed gummiboot, I could not boot into Arch Linux because I was missing the file varlinuz-linux. I then tried to install GRUB. Same issue. I went ahead and cleared the partitioning scheme and formatted the drive and started all over again. It worked after that. I’m not entirely sure what happened, but if you encounter the issue, it can be solved by clearning the drive and recreating the partitions.
Now that ArchLinux was installed, I had to choose my software. I decided to go with Xorg for my display (Using the open-source intel video drivers). I also tried lightDM as my display manager; however, I did not like the look/feel of it, so I decided to resort to SLiM and its archlinux-simplyblack theme. I also tried to use bspwm and awesome window managers; however, I failed to find them as suitable replacements for i3 and went ahead with my tried and true i3 setup. After that, everything has been going smoothly. I will post more details later about the specifics of my setup. I am too tired to post it now.
The major problem I encountered during this install was connecting to the internet. For whatever reason, during the install process, I could not connect to the university WiFi. I used the wpa-configsection example for netctl, but couldn’t get anything to work for my wireless adapter. I ended up just using the USB to Ethernet adapter that came with the laptop in order to get a stable wired connection to complete the install. Maybe this is what contributed to the missing linux kernel file during the first boot-manager install. After I finished installing, however, the netctl profile I created worked no-problem. I guess there were just issues while using the install USB. Again, I’m not really sure why.
So far, it looks like I will for sure be sticking with Linux this time. I hope.