Tag Archives: Linux

Introducing download-sweeper

One of the biggest issues on any system of mine is the cluttering of the Downloads folder. In the modern Internet age, we download a ton of files. Checking right now, the contents of my Downloads folder sum to about 15GB in filesize. Although that probably isn’t too much of an issue given the cheapness of storage today, it remains troublesome when hand-searching through the files.

When I only ran Windows, I used Cyber-D’s Autodelete to delete my old downloads. This worked perfectly for me, except for the fact that sometimes it would delete files that I forgot that I wanted. But with Windows, I could always find those files in the recycle bin.

Fast forward several years, and I now run Linux as my primary operating system. Without doing much research to see if a program already existed, I drafted a “spec” for download-sweeper, a program that would delete old files in the Downloads directory, but also allow the user a “grace period” where they could still recover old Download files if they were removed.

Sure, this could probably be created in less than 100 lines of C, but I was looking to create a robust and portable solution that would allow me to quickly make changes if I needed to. Thus, I created a clean (~350 lines) Python solution that would do just that.

Further, when integrated with systemd, everything works perfectly. I currently have the application deployed on my Laptop, my Desktop, and on the webserver that’s running this blog. Of course, there aren’t any downloads on the webserver, so I use it to act as a “virus/malware quarantining tool”.

You can view the project on its GitHub page, here: https://github.com/brandonio21/download-sweeper

I’m Going Full Linux

Running Linux on my machines is my own personal hobby. One of the first things I did with my first laptop was dualboot Ubuntu and Windows. Ever since then, I have installed Linux on every machine I’ve had. Usually, I install Linux thinking that I have no need for any other operating system. Then, a need comes along, and I end up dual-booting Windows and Linux. Currently, my ASUS K55N-DS81 laptop holds the record with about a year running only Linux. However, this streak was ended when I went out of town with only my laptop and needed to do some serious .NET editing in Visual Studio.

Needless to say, the dream still continues. I still want to have atleast a single machine that runs only Linux. One of the main problems I have with my current laptop is its abysmal battery life. I get about 2.5 hours per charge, which is not enough to make it through the day. Thus, I’ve been looking for a replacement laptop. Something powerful enough, but also lightweight and not lacking in the battery department. What I found was the ASUS UX305.

ux305After browsing several Arch Linux forums and webpages, it seems that this laptop is perfect for Linux. Everything works out of the box. This is more than I could ask for given its astonishingly low price of $699.

Laptop selection aside, the struggle comes when installing Linux. The problem isn’t getting everything to work, but rather finding alternatives to all the Windows software that I use on a daily basis. Time and time again, the troublesome piece of software proves to be Visual Studio. I do a lot of development for work in Visual Studio, so it is a relatively mandatory piece of software. Recently, however, I stumbled upon MonoDevelop and its fantastic GTK# Window Designer. After trying it out for a few hours, I have determined that it is a worthy alternative to Visual Studio’s Form Designer. I look forward to seeing how it compares when using it on a daily basis.

That being said, the laptop is arriving in two days. I plan to heavily document my Linux installation process and all other things in order to create a sort-of ongoing guide for anyone who wishes to pickup this laptop and install Linux on it. I will not give up on this Laptop. I will not dual-boot. I am going full Linux.

I Dislike The Mouse


My Desktop

The above picture is a screenshot of my Linux machine. What is unique about it? Well, everything is controlled by the keyboard. I have a tiling window manager (i3) and do all of my text editing in vim. What does this mean? It means that I rarely touch the mouse.

I grew up using Windows. It was my primary operating system for the past 10 or 11 years. I got very used to it, its semantics, and using the mouse+keyboard combo in order to navigate around my Windows machine. There was nothing wrong with it. As I got more into computers, however, I got bored of using Windows. There’s nothing wrong with the operating system – I just got bored of using the same thing for 10 straight years. Because of this, I installed Linux.

When I first install Linux, I tried to emulate my Windows experience as much as possible. I installed LXDE as my desktop environment and Openbox as my window manager. I used these just like I used Windows.

As I used Linux more and more, though, I realized that most of the power of Linux was not in the interface, but rather, the terminal. This led me to be in the terminal a lot more than I ever was. I no longer needed a file manager as I did all of my file operations in the terminal. I no longer needed desktop icons because I launched everything in the terminal. Eventually, I no longer needed my mouse to switch Windows, as I just used keyboard shortcuts. I no longer needed my mouse to open terminals because I used keyboard shortcuts.

What did I need my mouse for, then? I decided to experimentally ditch the mouse entirely and switch to a tiling window manager that allowed me to manipulate my windows and their positions by just using the keyboard. At first, I used Awesome. However, Awesome felt very static. In order to move windows around, I had to switch the layouts entirely. I wanted something more dynamic, so I switched to i3.

It definitely took some getting used to. I had to train myself to not reach for my mouse every time that I wanted to do something. Eventually, however, I got used to it. Once I did, it felt awesome. It made me feel like a whole new breed. I was able to rearrange windows, launch applications, and do everything from my keyboard. Not to mention that when my mouse isn’t around, it has the added bonus of keeping people from using my computer since they don’t know how to use things.

As I practiced more and more, I felt that I was getting faster and faster. In fact, I felt that I was doing things faster than if I needed to reach for my mouse. Need to listen to Spotify and type some notes at the same time? Easy.
<WINDOWS>+3 – Switch to a new Desktop
<WINDOWS>+D – Open the app-launcher
‘spotify’              – Launch spotify
<WINDOWS>+B – Open the next window to the right of Spotify
<WINDOWS>+<ENTER> – Open a terminal window
‘vim notes.txt’   – Launch vim and write some notes
Of course, this is a lot of steps, but they can be executed very quickly without reaching for the mouse to resize the windows in order to get the right proportions between the vim and Spotify windows.

Of course, as time goes on, I will only get faster and faster. However, this experience has made me realize that I really dislike using the mouse. Of course, this experience is only on my laptop, where I often find myself reaching for my touchpad because it is easy to reach with the keyboard so close. However, I plan on getting a new Desktop soon and installing Linux on it with my i3 setup. I am excited to see how everything will end up working out on my setup with two monitors and so much screen space. I will report back.

If you’re wondering whether or not you want to take a shot at using a computer without the mouse, try it. It’s a great experience and it looks super awesome whilst doing it.

Taking Notes in Class

To clear up any confusion before anyone begins to read this post, I am a Computer Science Major at University of California, San Diego. I run Linux as my primary operating system.

As I go from class to class, I often ponder upon the most efficient and effective way to take notes. Why do I ponder this? Because every time I forget something I wish that I could just use a computer function to scan all of my handwritten notes for certain keywords. But I can’t for several reasons.

  1. My handwritten notes are not on a computer
  2. Manually scanning pages of my handwritten notes into a PDF file would take decades
  3. No computer handwriting recognition system can recognize my handwriting.

Because of these three factors, I often ponder upon taking notes on an electronic device; however, what happens when I want to draw pictures or draw fancy symbols or doodle? I can’t if I am not working on a tablet with a decent stylus – and I’m not. I am working on my trusty laptop. Usually, this is enough to convince me that I should just stick to buying a few nice notebooks and keeping all of my notes organized in them. However, next time I need to find something fast, I regret it, as I really want to CTRL+F my notes.

In order to solve this, I looked for a lightweight note editor program for my laptop that had basic organization and markup capabilities. I found ZIM, which is super handy for building a local version of Wikipedia for all topics that interest you. I used this program for a good 20 weeks. Everything worked great and I acquired a vast amount of notes in many subjects that covered a range of topics. The problem arose; however, when I wanted to use vim keystrokes.

Writing in ZIM is great, don’t get me wrong, but sometimes you just want to be able to write faster. You don’t have time to reach over to the enter key for a newline. You don’t have time to press end to get to the end of the line. You want something faster. In order to solve this, I gave up writing in ZIM’s editor and used vim instead. Of course, I acquainted myself with ZIM’s markup syntax so I could still read my notes from ZIM, but I no longer wanted to use their proprietary environment. Instead, I stuck with my handy-dandy vim.

All was well in my note-taking world. That is, until someone asked for a copy of my notes. They were a mess if you didn’t have ZIM installed. Markup syntax everywhere that made the file almost unreadable to the untrained eye. I needed someway to share this file with my friend while retaining the beauty of its marked up design. The closest markup language I found was Markdown, the internet standard for marking up documents.

I could write all of my notes in markdown and then save them to a GitHub repo and then everyone could access my notes all the time and I could edit them and then push the changes and then everything would be great. In fact, that’s exactly what I did. I setup a repo and began writing my notes in Markdown. The only problem was that I had no way of converting my old notes from ZIM to Markdown. Thus, zimdown was born.

zimdown is my own personal solution to converting ZIM markup files into Markdown. It is not complete, but it will allow me to continue writing my notes in ZIM markup, view them locally in ZIM, and convert them into markdown to push to my GitHub repo for public viewing. Sound like a pain? It probably will be.

Why do I write notes like this? All because I don’t want to let go of my precious vim and I don’t want to use a heavy solution like Evernote. I think it is worth it. What are your thoughts?