Monday 26 January 2015

i3 Window Manager - After 7 months.

So I've been using the  i3 window manager for quite a while now. And once in a while I miss some of the functionality that certain programs in Ubuntu provided. Especially some of the functionality of the network settings tool. So just for one evening I decided to switch over to the Gnome Desktop Environment.

I had to switch over to i3 within a few hours because after the wonderfully customizable and workflow friendly key combinations that I had set up in i3 fiddling about with the mouse on the desktop environment felt really clunky and frustrating. It took me more than twice as much time to do a simple task like open a text editor and start writing some C code.

Rich desktop environments like Gnome and Unity are good if you're a beginner or if you don't plan on using your computer for anything other than web browsing. But if you're into programming or doing anything even remotely technical with your computer, keyboard friendly tiling window managers like i3 will definitely increase your productivity.

Monday 5 January 2015

Setting Up a Cool Dr. Who Wallpaper That Changes Every Hour on Linux

I came across this really cool idea by someone on reddit to take this awesome wallpaper of the 12 regenerations of the doctor and highlight each Doctor by the hour. This is easy enough to do on Windows which has wallpapers which can change every minutes. Being a user of linux, I was interested in trying to get a similar thing to work on linux.

First here is the set of all the wallpapers.

https://imgur.com/a/av5TP

Download the wallpapers and put it all in a folder somewhere on your system. Say you put it in /home/ash/Pictures/whopaper/



Rename each picture so that the filename corresponds the the regeneration number. The first doctor's highlighted picture should be named 01.jpg and the second doctor's should be named 02.jpg and so on till 12.jpg.

Then set up a cronjob that is executed every hour that checks the hour on the clock and sets the background to that. For doing this I installed a program called "feh" (sudo apt-get install feh) which allows me to set my desktop wallpaper from the terminal. I also installed a program called gnome-schedule (sudo apt-get install gnome-schedule) which allows me to easily edit the crontab file.

Run gnome-schedule and click on "New" to add a new cronjob. Select "A task that launches recurrently". Add a short description (like "Cool Doctor Who Wallpaper" and in the command field enter the following command:

env DISPLAY=:0 /usr/bin/feh --bg-scale "/home/rationalash/Pictures/Wallpapers/DRWHO/$(date +\%I).jpg">>sys.log

Replace the path to the wallpaper in the command to the folder in which you saved the wallpapers.

Under the  "Time & Date" section select "Basic" and set the task to run every hour.




And that's it! Now if you don't keep your computer on all the time the wall paper might be wrong for some time because the cronjob only runs every hour. If you want to be sure that the wallpaper is always the same as the hour on the clock even if your turn your computer on a lot edit the frequency of the cronjob so that it runs more often. (Say once a minute).  The wrong wallpaper won't be there for longer than a minute.