1. My menu generating script can be found at https://sourceforge.net/projects/xfce-menu-maker/. While there's only one svn commit, it's pretty stable (I've worked on it for a while). Let me know if you find any bugs.
2. Did you realize you can drag windows from one workspace to another INSIDE the workspace switcher? That's right, just click on that little firefox icon and drag it to your screen.
3. I am in love with xfce's extensive options for window transparency and focus. It can provide a very different and more productive desktop interface.
Friday, February 4, 2011
grep and columns in color!
I really wanted my dictionary searches to output in columns, but without loosing grep's color. The problem is that if you use the --color=always option in grep it distorts the length of the strings in the pipeline because of the escape sequences used for coloring in the terminal. Then when you pipe the results into column the columns do not look right.
Never fear. awk is here. I wrote this tiny script to append spaces to each line so they all had at least length 35.
Here's normalize.awk
and here's the finished command:
grep --color=always st$ dict | ./normalize.awk | column
This command found all the words in the dictionary ending in "st" and displays them in columns with the "st" portion highlighted.
Never fear. awk is here. I wrote this tiny script to append spaces to each line so they all had at least length 35.
Here's normalize.awk
#!/usr/bin/gawk -f
{
str = $1
difference = 35 - length($1);
while(difference > 0)
{
str = str " "
difference--
}
print str
}
and here's the finished command:
grep --color=always st$ dict | ./normalize.awk | column
This command found all the words in the dictionary ending in "st" and displays them in columns with the "st" portion highlighted.
Saturday, January 8, 2011
xfce tricks, tips and cool features
I love xfce. In all fairness, I haven't used gnome for over a year, so I cannot really make a fair comparison to the newer versions. But I would like to say some reasons I do love xfce...
I would just like to highlight some recent tricks and tips in xfce that I think are really cool, and worth knowing about:
I would just like to highlight some recent tricks and tips in xfce that I think are really cool, and worth knowing about:
- You can use the middle mouse button to bring any window into focus, regardless of what workspace its on.
- If there are two or more windows on top of each other, say maximized, then middle-clicking the title bar cycles them into focus.
- Dual monitor configuration works pretty well once you have X configured properly. Sometimes you need to restart x for everything to work right the first time. For example, you can move panels between monitors using the panels menu.
- If you want to duplicate a panel, so it shows up on two monitors, there's no GUI way to do this. But if you edit the config file ~/.config/xfce4/panel/panels.xml, you can simply copy one of the <panel>....</panel> entries and paste it somewhere else. You should them change the screen-position or the monitor properties of one of them to move it (although strictly-speaking, this is probably optional). Then 'pkill xfce4-panel' and restart it (best to hit Alt-F2, type "xfce4-panel" and hit enter). If you changed the screen-position/monitor settings for your new panel you should see it immediately. Otherwise you'll need to go to the xfce4->settings->Panel window, and you'll see there's a duplicate panel in the list that you can move around.
- You can right click on the desktop to bring up the applications menu
- Soon I'll be publishing a python script that takes a folder of scripts and turns it into a launcher with a menu on one of your panels... stay tuned :)
- You can configure windows to be partially transparent when you move them, so you can see all the windows behind as you're rearranging things
- You can set a window to 'always on top' or 'always on bottom'. This often helps when you're forced to overlap windows, and you want to read from one while editing the other. Typically I put the smaller window "on top" in such a way I can still see everything I need on the bottom one.
Saturday, January 1, 2011
Crossplatform Todo lists!
I've had this problem for a long time. I want a simple todo-list solution that satisfies the following requirements:
I'm not totally sure that everything is SSL'ed. I know that when I work directly with the webapplication it is, but I don't think it is from the iGoogle page or the android app, but I have yet to actually confirm or deny this.
- Shows up on my computers and my android phone
- The Android app must be convenient
- Either there needs to be a really convenient desktop application, or it has to integrate into a web site I already use, such as the iGoogle homepage
- I shouldn't have to develop it myself
- Streamlined synchronization. I shouldn't have to manually sync it all the time.
- Features preserved in synchronization. For example, if on my phone a todo item
- Preferably everything goes over SSL
- Automatically sorts tasks by priority
- I started with mnote on my phone. This didn't get along with my desktop very easily.
- I thought about just keeping a svn repository with a flat text file and adding a hook to do sorting by the first item on the list. Unfortunately, this is a lot of work and doesn't play nicely with the phone
- I thought a lot about setting up my own server with an Apache Thrift service. Too much work.
- I looked at several web services, but none of them seemed to really do the trick.
- I tried astrid tasks, but the syncing wasn't very pretty with google tasks or producteev. Producteev also seemed way overkill.
- Then I tried Remember The Milk... WIN!
I'm not totally sure that everything is SSL'ed. I know that when I work directly with the webapplication it is, but I don't think it is from the iGoogle page or the android app, but I have yet to actually confirm or deny this.
Wednesday, July 28, 2010
How to run vim commands for certain file types
For the longest time I've created .tex files in vim and typeset them with pdflatex. The problem is that every time I need to type
:set makeprg=pdflatex\ %
This was frustrating because I use tex all the time. Alas, the solution is to place the following in your ~/.vimrc:
autocmd FileType tex setlocal makeprg=pdflatex\ %
:set makeprg=pdflatex\ %
This was frustrating because I use tex all the time. Alas, the solution is to place the following in your ~/.vimrc:
autocmd FileType tex setlocal makeprg=pdflatex\ %
Monday, June 7, 2010
LaTeXCalc 1.0 is out!
Ever been working on a homework set or a paper in LaTeX where you constantly resort to a calculator to do boring computations? LaTeXCalc is your solution. It is a "LaTeX Calculator" that allows you to in-line computations with TeX. See the homepage at http://latexcalc.sourceforge.net.
Currently available on UNIX-like platforms (aka almost everything except Windows). A Windows port will be available "soon".
Currently available on UNIX-like platforms (aka almost everything except Windows). A Windows port will be available "soon".
Wednesday, May 26, 2010
Thoughts on Wikipedia
My close friend Jason recently got back from studying abroad in Ghana*. Yesterday he was telling me how the classes in Ghana weren't well put together and often just involved professors reading from scripts. Upon asking where the scripts were from he promptly replied "Wikipedia".
At first this is a little disappointing. We all hope that education around the would could be better. On the other hand, this means that the whole world can influence education in Ghana and other third world countries!
This is one of many good reasons to edit wikipedia. As odd as it may sound, it has the power to educate and transform the world. Undoubtedly you can contribute something too. My biggest request is that you take care when you edit. Don't just write. Write quality material and follow Wikipedia's guidelines. Each small contribution has a very real effect on every single person who visits the page. Wikipedia has helped you, now return the favor!
* On a side note, Jason's compelling blog of his Africa journeys may be found at http://jasonghana.blogspot.com/.
At first this is a little disappointing. We all hope that education around the would could be better. On the other hand, this means that the whole world can influence education in Ghana and other third world countries!
This is one of many good reasons to edit wikipedia. As odd as it may sound, it has the power to educate and transform the world. Undoubtedly you can contribute something too. My biggest request is that you take care when you edit. Don't just write. Write quality material and follow Wikipedia's guidelines. Each small contribution has a very real effect on every single person who visits the page. Wikipedia has helped you, now return the favor!
* On a side note, Jason's compelling blog of his Africa journeys may be found at http://jasonghana.blogspot.com/.
Subscribe to:
Posts (Atom)