Search

Ads

Friday, March 14, 2014

How to Use the Super Fast i3 Tiling Window Manager on Linux


How to Use the Super Fast i3 Tiling Window Manager on Linux

How to work faster and smarter on Linux with the super fast i3 tiling window manager. 

I've been a fan of tiling window managers ever since Windows 3.1. I know, Windows 3.1 wasn't very good for much actual work, but it did stacking and tiling windows rather nicely. The i3 tiling window manager is a nice modern tiling window manager for GNU/Linux and BSD operating systems. It supports tiling, stacking, tabs, virtual desktops, and multiple monitors. You can do almost everything from the keyboard, or mix up keyboard and mouse.
The i3 tiling window manager desktop
Figure 1: The i3 tiling window manager desktop.

You can download source tarballs or snag the latest code from the i3 git repository, but the easiest method is to install it from your distro repositories. On Debian/Ubuntu you have the i3 metapackage, and the individual i3-wm (window manager), i3-wm-dbg (debugging symbols), i3lock (screenlocker), and i3status (system status bar) packages. The i3 metapackage includes everything except i3-wm-dbg. The full-meal deal is a little over 2 megabytes, so you might as well go for it. In Figure 1 you can see that I have two virtual desktops, the status bar, and three windows arranged nicely. They're not perfectly tiled because I rearranged them a bit: i3 is not dogmatic about tiling geometry and lets you have it your way.

Installation and First Tweaks

Install i3, then log out. When you log back in change your session to i3. On its first run it walks you through a simple configuration wizard. First you must decide if you want the wizard to create a ~/i3/config file. Say yes. Then choose your mod (modifier) key, either the Win or Alt key. If you choose the Alt key you're going to conflict with a lot of application keybindings and commands, so choose Win. This is really the Super_L key, but on many keyboards it bears the Windows logo. (Liberate your keyboard! Buy Tux keyboard stickers!)
Now you should be gazing upon a mostly blank screen. You should see a little tiny 1 in the bottom left corner, which is the first virtual desktop, and the system status bar along the bottom right. The background image is whatever has been set for your X11 root window. I'm running Kubuntu, so my base background image is the one set by the KDE4 theme. i3 does not touch the X11 root window, so you need an external app to set a background image. feh is a nice little app for this. Install feh, and then open ~/i3/config and configure a background image by adding a line like this anywhere in the file:
exec --no-startup-id feh --bg-scale /path/to/picture
--no-startup-id disables the startup notification so you don't have an hourglass in your way for 60 seconds. --bg-scale makes your image fill the screen, and does not preserve the aspect ratio. See man feh for other background image settings.
How do you do all this? $mod+Return opens your default X 
terminal. $mod+d opens the system menu, dmenu (figure 2). Start typing the application name, for example kate or gedit to bring up a graphical text editor, and when it's highlighted in blue press the Return key to open it. dmenu shows you all the command names that include the string you're typing. It only finds commands that are in your $PATH. If you change your mind press the Esc key to close it. You can't do anything else while dmenu is open.

fig-2 dmenu
Figure 2: The i3 system menu, dmenu.

For most ~/i3/config changes, press $mod+Shift+c to reload the file and activate changes. If that doesn't work then $mod+Shift+r restarts i3, preserving your layout and open applications. To load your new background image you need to log out of i3 and log back in. $mod+Shift+e exits i3, and then you log back in the usual way with your Linux login manager.

Set Default X terminal

If $mod+Return doesn't open the correct X terminal, then change this line in ~/i3/config:
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
Replace i3-sensible-terminal with your chosen terminal, for example konsole or gnome-terminal, and reload ~/i3/config.

Basic Layout Management

Every time you open an application it fills the available space. Apps are either lined up side-by-side, or stacked on top of each other. To duplicate figure 1, open an application in an empty desktop. Then open a second app. Then make the second app the active window by hovering the cursor over it. There are also multiple keyboard combinations for selecting the focus window, such as $mod+arrow key. Press $mod+v, then open your third app. $mod+v stacks, and $mod+h lines them up side-by-side.
Use your app menus to close them, or $mod+Shift+q closes the window with focus.
You can move your windows around with $mod+Shift+arrow key. Resize them by dragging a border with the cursor, or enter resize mode with $mod+r, and then resize the window with focus with the arrow keys. Leave resize mode by pressing the Esc key.
$mod+f toggles fullscreen. $mod+Shift+n moves the window with focus to desktop n. $mod+Shift+spacebar toggles a floating screen. This removes it from the tiles, and you can drag it around and resize it like in a non-tiling window manager.
$mod+e toggles horizontal and vertical layout, $mod+s stacks open windows, and $mod+w tabs them.
Open a second virtual desktop with $mod+2. i3 closes virtual desktops automatically when you close all the applications on them. $mod+n navigates to an existing virtual desktop, or creates a new one. You don't have to number them sequentially, but can use any numbers you want.

Configuration Hacks

Look in your ~/i3/config file to see your keybindings, and the Default Keybindings section of the user manual shows you the i3 defaults. You can easily create keyboard shortcuts to launch applications, like this:
bindsym $mod+F1 exec firefox
I like to bind PulseAudio volume controls to the keyboard. I have multiple soundcards, so first I have to locate the correct one. You need some audio playing for this to work:
$ pactl list sinks | grep -A2 -B2 -i running
Sink #1
 State: RUNNING
 Name: alsa_output.usb-M_Audio_MobilePre-00-MobilePre.analog-stereo
 Description: M-Audio MobilePre Analog Stereo
These lines in ~/i3/config let me control up and down volume with the Pageup/Pagedown keys, and toggle mute with the Home key:
bindsym $mod+Next exec pactl set-sink-volume 1 -- -10%
bindsym $mod+Prior exec pactl set-sink-volume 1 -- +10%
bindsym $mod+Home exec pactl set-sink-mute 1 -- toggle
Keynames are not always consistent on keyboards, so you can find the correct keynames with the xev command. Run it with no options, and then press keys to see their names and keycodes. That's how I learned to use Next and Prior for Pagedown and Pageup:
$ xev
[...]
KeyPress event, serial 32, synthetic NO, window 0x2c00001,
    root 0xa0, subw 0x0, time 24296185, (651,87), root:(1615,816),
    state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES
[...]
KeyPress event, serial 32, synthetic NO, window 0x3a00001,
    root 0xa0, subw 0x0, time 25458177, (247,105), root:(1211,834),
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
i3 is wonderfully configurable. See man xevman pactl, and the excellent and thorough i3 documentation to learn more about the myriad ways to customize i3 and make it super-fast and efficient.

Thursday, March 13, 2014

How To Transform And Promote Your Blog Like A Superstar

How To Transform And Promote Your Blog Like A Superstar


How To Promote Your Blog When you create a professional blog (or business blog), you kick the door open to one of the best ways to make money online.
Pro bloggers know that a blog which has been correctly set up and maintained can provide a passive income for years to come.
With a professional blog, you can quit your day job and support yourself and your family, all the while wearing bunny slippers to work.
People who use my free 60 minute consulting service ask me this question all the time:

How do I transform my amateur blog into a business blog?
A professional blog makes money and an amateur blog doesn’t. Not only does the successful professional blog have these three qualities, but that blogger has also learned how to promote that blog to the right people.
The key to learning how to make money blogging rests in treating your blog like a business. And, if you want to turn your amateur blog into a pro business blog making a six figure income here are the qualities that your blog needs to have:

Your First Step: Sell Something
Professional blogs make serious money by having a product, service, or advertising in place. In other words, they have established at least one income stream on the blog itself.
Most professional blogs, including some of the high end news sites, have at least one income stream in place.
These income streams are:
• Advertising Network
• Products Created By The Blogger
• Affiliate Products Not Created by the Blogger
• A service or application

Advertising networks are great for those who already have traffic coming into the site. This is one of the reasons that you need to learn how to promote your site.
The heavy hitting news sites usually use advertising as their method of choice because the level of work that they have to do is simple. Once the ad blocks have been set up, all they have to do is attract more people to the site.

Advertising or Affiliates? What’s the Best Way to Make Money Blogging?
When you first start out with taking your blog to the professional level, there’s a serious chance that you won’t have the traffic to make the advertising on your site worthwhile.
Don’t get me wrong, set it up on your site (and remember not to make it too spammy), but don’t count on it to bring you thousands and thousands of dollars.
For the real money, you want to take the time to learn how to promote affiliate products. The time investment is more than merely setting up ad blocks on your site, but the return can be 10-100x more than what you would make through advertising alone.
One of those top-notch affiliate products that I promote, for example, is James Martell’s 5 Secrets To Affiliate Marketing which not only teaches you how to promote his products, but how to promote any product and make the mega bucks.

Your Second Step: Lead Capture
Everybody who visits your site is considered a lead for your products and services. The people who are enjoying your work are, by extension, more likely to purchase your products and services. One of the best ways that you can sell to those people is through a newsletter.
Give them great information that is jam-packed with your wisdom, and they will be eager to purchase products from you. When the professionals say that the money is in the list, they are not kidding.
To capture your visitors’ information, you need two things:
• A way to capture your followers’ email addresses
• A way to send email to those followers once they give you information.

The best lead capturing system that I’ve found (and I’ve been through a lot of them) is Leadpages. With it, you can easily set up professional landing pages and lead capturing offers in a matter of minutes.
I am able to manage the leads that I get from Leadpages with GetResponse. One of the reasons that an amateur blog will stay amateur (read: not making money from blogging) is that they haven’t mastered the pro secret of automating lead capturing.
You want to watch the free videos I made on how to create 6 figures blogging which cover 3 insider secrets to turning pro with your blog, there is a lot of valuable information in it.

Your Third Step: Connect It Together
I’m assuming that you’re transforming your current blog into a pro blog instead of starting your blog from scratch. A lot of the pro bloggers don’t talk about this, but one of the big differences between an amateur blog and a pro blog is the number of connections between the current posts and previous posts, and between your posts and all your offers.
A friend of mine once described this as the Wikipedia approach. It’s difficult to reach the end of a Wikipedia article without clicking on something else along the way.
Each blog post and article is like a piece of the puzzle that further entices readers into trusting you. In a lot of amateur blogs, readers are generally treated to a lot of ‘single serving’ posts that don’t fit into the greater whole.
When you decide to run your blog like a business, read all of the posts that you have up on your site. This will help you out with a few things:
• Make connections from one blog post to the next
• Tighten the writing on your blog posts
• Help you make the decision on which ones stay and which ones go

One thing that will immensely help your new readers is to have a ‘start here’ document. This document gives an outline of the types of things that they should expect on your site and gives links to some of the pillar content that you’ve created.
These three steps cover the basics in turning your amateur blog into a professional one. I’ve written out more detailed information about how to make money blogging in the Profit Blogging Blueprint. That book is packed with valuable information on how to monetize and make money with your blog.
There are three steps to transforming your amateur blog into a professional one: sell something, capture leads, and connect it all together.
When I discovered how to make a six-figure income blogging, I discovered another piece to the puzzle. To make the serious money, not only do you have to know how to set it up, but you have to know how to promote your blog. You have to talk about it with your friends, your neighbors, and your target audience.

How to Promote Your Blog: The Foundation
When you run a professional blog, every piece of content that you write, whether it be a blog post, a video, or a paid product, should enrich the readers of your blog. When you make the decision to transform your amateur blog into a professional blog you make the decision to stop writing all about you.

The ONE Secret about Promoting Your Blog You Need to Know
No matter what audience that you’re catering to, the sound of their own voice is the most pleasant sound that they can hear. Your audience wants to be validated. Your audience wants to be talked about. Your audience wants to be told that they have great ideas.
I reveal more secrets to cracking the moneyblogging code in this free video series.
Your blog needs to talk less about you and more about your audience’s desires.
How does that play into promoting your blog? If you’ve got a new business blog, one of the best things that you can do is design your articles and your blog posts so that they talk about people within your target demographic.
This might include talking about their blog posts and articles, designing a top ten list, or deciding that you want to do a roundup of some of the best posts that you’ve read.
The reason doing this is that it draws the attention of other people’s audiences. When someone connects with a blogger and reads them regularly, they will want to know what other people are saying about them.
It’s common to see blogger cliques develop over time, as people regularly share ideas with each other.
When you post your newest post that mentions someone, send an email to the person that you mentioned in the post. Just a simple one, saying that you’ve mentioned them. If you’ve linked to their post from yours, they get a notification about it, but it’s courtesy to let others know.
If the people whom you’ve mentioned like what you have to offer, they will talk about you in their posts – at least to say that you had mentioned them.
If you’ve created content that caters to your audience, mentions your audience by name, and validates the concerns of your audience, that content is now tailor-made to be talked about on Facebook, Twitter, and the other social media outlets.
So, it’s time to talk about the people that you know, the blogs that you read, and all of the good things that other people are doing.
This technique opens the doors for your blog, paving the way for great connections and the explosion of your follower counts.
 
Your Turn
What is your biggest frustration when it comes to making money with your blog ? Getting traffic alone doesn’t make you money, there are other important components like lead capturing and creating a high converting income funnel which will really turn your amateur blog to a profitable professional blog.
I’d like to hear from you, please leave your questions and feedbacks in the comment section below.