Blog

i3: Fast switching named workspaces

i3 is a tiling window manager which allows to work nicely with named workspaces. For example, I have a messaging/social workspace, a calendar and TODO workspace, two browser workspaces, my code workspaces and so forth. However, as the number of projects I work on increases, it becomes more difficult to keep track of the different workspaces. To solve this, it would be necessary to create new named workspaces. However, to do this, the config needs to be updated which I am usually to lazy to do.

Now, the core idea to solve this is based on the  i3-input  directive. This lets the user type the name of the desired workspace in order to easily create, rename and move to workspaces with very specific names on the fly. However, this becomes cumbersome when workspace names are longer than two or three characters. To solve this I came up with a little Python script which allows so “shortcode” workspaces. In the following I introduce the Python script as well as the corresponding i3 config entries.

The Python script

The Python script takes three parameters “prefix”, “query”, and “postfix”. It will then pick a workspace from the list of existing i3 workspaces if the query is a prefix of that workspace name (priority 1) or if the workspace contains the query (priority 2). Also, the script supports an “index”, i.e., you can append something to query using a . which is then appended to the name chosen by the script. For example is the workspaces project and project2 exists, then the query is p.2 will choose project2.  Then the script executes a command built from the prefix, the chosen workspace and the postfix: <prefix><chosen name><postfix> .

The i3 config

The Python script introduced above is then used in the i3 config as follows:

This allows to rename a workspace using MOD+Ctrl+m . For example using the name project2 . Then using MOD+m and typing p or  p.2 will take you to that workspace. Similarly, MOD+Shift+m and typing p or  p.2 will move the active container to the project workspace.

Conclusion

This made my life a lot easier since now it is possible to quickly create, rename, and move to arbitrarily named workspaces. I hope this helps a few people making their lives easier 😉 Finally, let me know if you have alternative or better solutions!

BibSonomy Scholar: A Chrome browser extension for BibSonomy

A while ago I was working on a Chrome browser extension for integrating BibSonomy, a social bookmarking and publication management platform, with the Google Chrome browser. The idea was to directly manage publication on the Google Scholar page without the cumbersome process of getting the BibTex, opening BibSonomy, pasting the BibTex, downloading the PDF, uploading the PDF … you get my point.

Google Scholar

Anyways,  the extensions now directly integrates with Google Scholar allowing to manage publications without ever leaving the current page. This includes marking already posted publications, directly posting and deleting publications, automatic upload of PDFs, etc.. Here is a little screenshot:

BibSonomy Scholar integrating with Google Scholar.
BibSonomy Scholar integrating with Google Scholar.

Managing Bookmarks

After a while, I came across the issue of choosing a new laptop, having a million tabs open, clicking through them again and again, trying to remember which laptop an which page was the one I was interested in and why. So I thought that adding tags to URLs for a better categorization of my reviewed laptops and leaving notes on each page would be a tremendous help. While I know that Firefox supports tagging of bookmarks and I guess that there are quite a few browser extensions to support leaving notes, I did not want to get started with yet another system for managing things. So, since BibSonomy actually supports adding tags and descriptions for bookmarks, I added a “Quick Bookmark Button” to the BibSonomy Scholar extension.

Similar to the usual bookmark button in Chrome, this “Quick Bookmark Button” indicates whether the currently viewed URL has already been bookmarked. It also supports posting, deleting and updating bookmarks by clicking on the button or using a keyboard shortcut (CTRL+B). Furthermore, for leaving notes, it renders Markdown directly in the posting dialog. Here is a screenshot:

BibSonomy Scholar - Quick Bookmark Button
BibSonomy Scholar – Quick Bookmark Button

 Conclusion

Overall, I think that the BibSonomy Scholar extension can be quite helpful and allows for a very “integrated” experience of BibSonomy. Of course I see many things which can still be improved and even more features which would be nice to implement. For example, all publications and bookmarks posted are public for now. Especially for bookmarks, this might not always be the desired option. Concerning additional features, I think it would be nice to handle pages from publishers containing publications differently than regular bookmarks, i.e., indicating if the corresponding publication has already been posted, or directly posting this publication instead of a bookmark. There are many more ideas floating around. I hope to find the time to add them at some point.

Finally, if you want to try out the extension have a look in the chrome web store and let me know about your experience with the extension. Also do not hesitate to post bug reports or feature requests or contribute yourself. The extension is open source and can be forked on Bitbucket. I will be happy to accept push request.

Hello world!

Welcome to my Blog! This is my first post where I try out some plug-ins before starting to write away.

Crayon Syntax Highlighter

This is Crayon Syntax Highlighter:

 

WP LaTeX

And this is WP LaTeX:
e^{\i \pi} + 1 = 0

BibSonomy/PUMA CSL

I also use BibSonomy, so I tried to install the corresponding plug-in in order to list some publications and research articles.  This turned out to be a little cumbersome since it does not seem to be compatible with PHP7. When I try to activate the plug-in, I get two errors:

The first error we can solve by modifying the file CurlHttpRequestProxy.php , i.e., we replace

by

The second error I was able to “fix” by installing the package php-xml :

After this, the BibSonomy plug-in worked for me.