August 22, 2010

My Configuration Files

I have finally got around to making a git repository for my configuration files.
Here they are: http://github.com/Stebalien/dotfiles

Also, here is a screenshot of my command prompt. The end box on the prompt turns green when I have sudo privilege and the prompt also indicates my current branch in git.

May 18, 2010

Turn the Zim Desktop Wiki into a calendar

Why:

I recently switched to Arch Linux and decided to ditch evolution (a good but bloated program). Claws Mail works perfectly as an email manager but I couldn't get its calendar plugin to work properly. I have been using Zim for a while and noticed that it had a very basic calendar plugin; this was exactly what I needed. The plugin allows users to create pages in their wikis for individual days: no complex forms to fill out, just a simple page to keep track of what you are doing on a given day.

What:

As Zim lacks desktop integration so I wrote two python scripts for conky integration:
  1. zim-conky_cal.py
    Prints a calendar (like the cal command) with the current date and appointments highlighted.
  2. zim-conky_events.py
    Lists the next 5 events or all of the events in the current month and the next, whichever comes first.


I also wrote a program for adding events to the calendar (zim-cal.py and zim-cal.ui). Select some text, run the program and double click the date to add your text to calendar. You can also input your own text by clicking the edit button (the big button on the right).

How:

First: Enable the calendar plugin (Edit->Preferences->Plugins->Calendar).
Download: zimcal.tar.bz2
  • Conky scripts
    • Edit CAL_PATH to point to the folder that stores your Zim calendar.
    • Add ${execpi 300 /path/to/zim-conky_cal.py} and ${execpi 300 /path/to/zim-conky_events.py} to your conkyrc
  • Zim-Cal program
    • Edit CAL_PATH to point to the folder that stores your Zim calendar.
    • Make PROG_PATH point to the directory where you put "zim-cal.ui"
    • If you intend to use this program regularly, you should probably assign a global hotkey to it in your window manager.

April 29, 2010

Make Gksu and Policykit red

I was bored one day and decided to make my gksu(do) and policykit dialogs red. The results are actually quite nice.


Add this to the bottom of your gtkrc file:

style "gksu" {
        bg[NORMAL] = "#770000"
        bg[ACTIVE]              = "#550000"
        bg[PRELIGHT]    = "#990000"
        bg[SELECTED]    = "#550000"
        bg[INSENSITIVE] = "#220000"
}
widget  "GksuuiDialog*" style   "gksu"
widget  "PolkitGnomeAuthenticationDialog*" style "gksu"

April 28, 2010

Packagekit with apturl

Although I no longer use packagekit, I still have my apturl script so I thought I would post it. This script will allow you to open apt:// scripts with packagekit. (Just save this to a file, mark it executable, and tell your browser to open apt scripts with it).

#!/bin/bash
/usr/bin/gpk-install-package-name $(echo $* | sed -e 's/apt:\/\?\/\?//')

April 27, 2010

Useful Bash functions

1. cdd: cd and list the files.


function cdd(){
    cd $* && ls --color
}

2. changelog: get the change log for a program


changelog() {
    log=/usr/share/doc/"$*"/changelog*
    if [ -r $log ]; then
        less $log
        unset log
    else
        log=/usr/share/doc/"$*"/CHANGELOG*
        if [ -r $log ]; then
            less $log
        fi
    fi
}


3. mkdircd: make a directory and move in.


function mkdircd() {

    mkdir $*
    cd ${!#}
}

April 25, 2010

Screenshot of Arch

I have been trying Arch Linux in VirtualBox and will probably switch when I get around to it (or at least duel boot along with Ubuntu).
Here is what it looks like so far; if you have any questions about tools, configs, etc., ask and I will post.

Kupfer Plugins

After getting frustrated with GNOME-Do's memory hogging, I switched to Kupfer. Kupfer is a lightweight, extensible application launcher like Do (as it is now called) but much more powerful and easier to extend (it is written in python).

Here are the plugins that I have written so far:

1. gwibber_plugin.py: This plugin allows you to send messages from Kupfer through Gwibber (with no configuration).
2. exaile_plugin.py: This plugin allows you to pause, play, skip, and go backwards in Exaile. It is based on the Rhytmbox plugin.

+1: evolution_plugin.py: I did not write this plugin (although I did do a fair bit of editing). The Evolution plugin adds an evolution contact source (and works with the built in email plugin).

Download: kupfer-plugins.tar.gz