Simple Hibernate with Arch Linux

There is plenty of documentation with how to hibernate a laptop in Linux. A lot of reading and you'll learn a lot of stuff, but sometimes we just want to make shit work quickly and then come back and understand what happened. So, here you go... a simple step-by-step. It may or may not work for you. If it doesn't, start digging into the documentation on the Arch wiki.

> sudo fallocate -l 16G /swapfile


Angular 2 testing directives with events bound to document

I ran into an issue today where I was writing a test for a directive I created. The directive has a HostListener which binds to document:mouseup and the tests were not able to trigger that particular event with the typical triggerEventHandler function. There is currently a feature request to help with this issue. The workaround stated on that feature request wasn't very descriptive, so I had to figure out another way to call the bound event listener on my directive. Here's some code:



Crazy Bluetooth issues on Linux with Bose QC35 headphones

Yet another update for Ubuntu 17.04

I continued to struggle with bluetooth issues when I'd reboot or put the laptop to sleep. I would have to restart the bluetooth service every time. When I'd reboot, I'd have to remove the headphones as a device and add them back every time. It was quite a problem. I finally found an article that talks about this issue and addresses it. Particularly the section under Troubleshooting titled Refused to switch profile to a2dp_sink: Not connected. For prosperity, I will put that section below:


External monitors with xrandr and a Lenovo Thinkpad Pro Dock

Recently, I purchased a nice new Lenovo ThinkPad T460s. Naturally, I'm running Ubuntu on it and maintaining my new venture into using the i3 window manager. One problem that I ran into with this was when docking the ThinkPad at work. I wanted to use an external monitor that was plugged into the dock. Since i3 doesn't manage things like this for you, I had to hook into some events that know when the laptop has been docked and undocked and then use xrandr to hook up the external monitor. This is how I managed to make it work. Albeit, with a few bugs...

First, you need to create a script that will handle your xrandr commands. I called this script and I put it inside of /etc/acpi/.


i3 window manager

Lately, a buddy of mine, joshtronic, has been getting back into the Linux world after a short hiatus using OSX. During this process, he has been trying different distributions as well as desktop environments and window managers. We both had a stint using xmonad for a while and we both really enjoyed using it. This time, he decided to try i3wm. This sort of inspired me to try it out myself as well... I figured I would make some notes on some of the things I did to get it in a usable state for myself.

The desktop


page: 1 of 3