December 2011
3 posts
3 tags
my dotfiles →
Maybe some stuff in there can be of help?
socat →
gTile →
A divvy clone for gnome-shell. Excelent stuff!
I made some channges to it (added keybindings, removed the icon). They are available from https://github.com/fmoralesc/gTile-vibou
October 2011
4 posts
The bipolar lisp programmer →
Interesting read.
# gnome-shell-extension: dock-singleclick
UPDATE: since another extension that does this is available from extensions.gnome.org, I deleted the repository. Good riddance.
One of the things people usually complain about Gnome-shell is that, for
opening a new window from the dock, when a window of the application is already
open, you must press Control and the clicking, instead of simply clicking, as
it was the case with Gnome 2 launchers....
kecebongsoft: Changing "gray area" at the side of... →
kecebongsoft:
I’ve faced similar case for several times, when I maximized my GVIM, it shows gray
area at the bottom and right side of the screen. After some research, I found out
that GVIM window dimension is actualy based on columns and rows rather than pixels.
Therefore if your resolution is not matched with…
September 2011
5 posts
Why is programming fun? What delights may its practioner expect as his reward?
...
– Fred Books - The Mythical Man-Month
3 tags
Notes on writing gnome-shell extensions
Musings of an OS plumber is an
excelent source of information on the basics of gnome-shell extensions
development (probably the best, so far), but it is already a bit outdated
because of some changes in the 3.2 gnome-shell API. These notes are an attempt
to complement the information already available.
extension.js must have at least three functions:
a) init(), which runs when the extension is...
2 tags
vim-pad →
A little project I forgot to mention before: vim-pad, a quick notetaking plugin for vim, à la Notational Velocity. I was prompted to work a bit in it this weekend by onethingwell’s mention of deft.
3 tags
mailnot: a gmail notifier for gnome-shell
A dead simple approach for a biff tool, made with gnome-shell in mind.
wget https://raw.github.com/fmoralesc/utils/master/mailnot ~/bin/mailnot
chmod +x ~/bin/mailnot
mailnot
mailnot requires python-feedparser, python-gnomekeyring and pynotify (besides gobject, gtk and gconf, but those should be installed anyway), and assumes the user has a preferred mail client. It can handle several accounts...
August 2011
2 posts
2 tags
The variants of vim-pandoc have merged →
dsanson and I have merged our variants of vim-pandoc into a single repository. There’s been lot of fixes for it, and the syntax has been updated.
July 2011
3 posts
shellshape: tiling window management for... →
Absolutely rocking.
white noise generator
using gstreamer
gst-launch-0.10 audiotestsrc wave=5 volume=0.002 ! autoaudiosink
I prefer small doses of pink noise:
gst-launch-0.10 audiotestsrc wave=6 volume=0.002 ! autoaudiosink
June 2011
1 post
vim-panbeamer →
Utilities for producing beamer presentations using pandoc.
Usage
vim-panbeamer detects files ending in .pbeam as markdown-formatted beamer presentations. It sets the filetype to ‘markdown’ and prepares vim’s compiler support so
:make
will produce a pdf of the presentation. See
:make --help
for the compiler options and ‘pbeamer/example.pbeam’ for an example...
May 2011
2 posts
Nobody should start to undertake a large project. You start with a small trivial...
– Linus Torvalds
3 tags
April 2011
3 posts
3 tags
March 2011
1 post
Bad news regarding pastie v2
Hi all,
I’ve been quite busy lately, and sadly haven’t been able to work in pastie as I used to at the beginning of the project. I’m afraid this trend will keep up, because I will have to focus entirely on my thesis work (I’m a candidate for an MA in Philosophy, if you want to know). So I’ll have to ask if someone can take over the work from here. Pastie has proven...
January 2011
1 post
December 2010
3 posts
1 tag
1 tag
The new pastie preferences dialog… a teaser for the new version of pastie.
November 2010
1 post
easystroke →
Easystroke is a gesture-recognition application for X11. Gestures or strokes are movements that you make with you mouse (or your pen, finger etc.) while holding down a specific mouse button. Easystroke will execute certain actions if it recognizes the stroke; currently easystroke can emulate key presses, execute shell commands, hold down modifiers and emulate a scroll wheel. The program was...
October 2010
2 posts
UNIX / Linux: awk Add Two Numbers →
Some updates
Haven’t been working much on pastie last month. I’ve had a lot of stuff to do at uni, and will have more things to do, so movement will be slow.
However, I’ve started working in a new version of pastie using a SQLite database. I’m still designing the way this new code will work, so I’m not releasing it for now. So far, I have a great CLI interface, and a much better...
September 2010
5 posts
3 tags
fish snippet: improved "i was lucky" fish function
now the function will use the last search within the last 20 executed commands.
function iwaslucky set search (for i in (seq 20); echo $history[$i]; end | grep "^mlocate\|^grep -rl")[1] echo iwaslucky: using \"$search\" open (eval (echo $search))[1] end
where could this improve? the script could adjust the history range if no searches were found when it tried to detect them. it could...
fish snippet of the day: in-place arrays & 'i'm...
Suppose you want to search for a file, and view its contents in a single shell invocation (a bit like google’s “i’m feeling lucky” feature). In fish, you can, if you know the filename, do this:
open (mlocate FOO)[1]
If you want to search for contents, you can do something like
open (grep -rl FOO)[1]
Maybe you are searching normally and find that you were lucky! (the...
Pastie 0.6.7
I’ve uploaded the 0.6.7 version of pastie to the PPA. It adds the ability to save the contents of the primary selection in the selection, and also to synchronize it with the regular clipboard selection.
The GConf schemas should install cleanly now. 0.6.5 had a bug where pastie wouldn’t start until after the schemas were actually registered. I hope that doesn’t happen anymore....
Pastie 0.6.5 (and beyond)
Yesterday I released pastie 0.6.5. It’s been a long time since I haven’t written about pastie’s development, and this is due to one thing: I’ve been busy. But, I’ve had terrible teeth problems this week, so my normal activities have been put on hold, and I’ve had more time to work on pastie.
What’s new? Well, the main thing is I’ve implemented a...
August 2010
4 posts
second fish snippet if the day: mocreate
This creates the .mo files in a LANG/translation.po file structure.
function mocreate
for d in (for dir in (for i in */; echo $i; end | sed 's/\///g'); echo $dir; end); echo "creating "$d"/"$argv".mo"; msgfmt $d/$argv.po -o $d/$argv.mo; end
end
Note: one must pass the name of the output files to the function, otherwise it will fail.
fish snippet of the day
To list directories in a folder as a list
for dir in (for i in */; echo -n $i" "; end | sed 's/\///g'); echo $dir; end
create a mono sink for pulseaudio
pactl load-module module-remap-sink sink_name=mono master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=4 channel_map=left,right,left,right master_channel_map=left,left,right,right
fish function of the day: prompt with git branch
fish scripting is quite nice.
function fish_prompt --description 'Write out the prompt'
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
if not set...
July 2010
10 posts
1 tag
Console productivity hack: Discover the frequent;... →
3 shell scripts: Kill weasel words, avoid the... →
2 tags
pastie rearchitectured
I’ve made a lot of changes to pastie (no, development wasn’t stopped, it was just slow and internal):
The indicator is now handled by the protector class.
Clipboard contents checking is now driven by the “owner-change” gtk clipboard’s signal. There’s a secondary loop for special cases (e.g. Gvim). This makes pastie perform a lot better, and behave correctly....
brightung
My girlfriend has bought a Samsung Aspire R428, and we’ve installed Linux on it. We’ve found the brightness controls don’t work (nor the applet, nor the Fn+ key combinations). There’s a fix though, via a nice little app by Pietro Battiston, called brightung. It didn’t have support for the R428’s video card, so I tweaked the code a bit to add it. I also added the...
pastie's memory leaks
why does pastie 0.5 leak memory? my guess: unholy references cycles.
i’m working on it.
pastie 0.5 pre @ webupd8 →
How to change the pastie icon in 0.4.5
Thanks to Frederik Hahne, pastie now supports custom icons, so it’s now easier to make pastie look good in the panel without modifying your current icon theme.
If you place the icon you desire to use in ~/.pastie/, the program should use it. If there isn’t any icon there, pastie will default to “gtk-paste”. The icon in ~/.pastie/ should be named “pastie.svg”...
git snippet: merge the changes on a file from...
something i just learnt:
$ git checkout <source_branch> <file>
$ git commit --author="<source_branch_author_name_and_email>" -m "<shiny_message>"
that’s good to know.
more info on :jasonrudoph and stackoverflow
The new pastie check algorithm
A preview of some features I’m working on.
#!/usr/bin/env python
import gobject
import gtk
import gtk.gdk
clipboard = gtk.clipboard_get()
clipboard_text = ""
clipboard_image = None
def check():
global clipboard_text
global clipboard_image
if clipboard.wait_is_text_available():
clipboard_tmp = clipboard.wait_for_text()
if clipboard_tmp != clipboard_text:
...