Qball's Weblog
Sunday 20 Jan. 2013
Because I have done a lot of little things, I will combine it into one post:
GMPC
Fixed a lot of small things:
- With, BIG thanks to, Company I finally know better how the whole Gtk sizing works. With this information and the hint of the weirdly named: gtk_label_set_max_width_chars I managed to fix the sidebar once and for all.
Now it properly goes into the different zoom levels, and the label of the plugin no longer expands it beyond believe. (gtk_label_set_max_width_chars sets the number of characters displayed when not expanding to available space.. So it affects the natural size.) - Moved a lot of Gtk*Box to GtkGrid. This did however break extra-playlist. But fixes several things in the sidebar plugins.
- Fixed the padding on the sidebar bottom pack.
- Removed tons of unused container widgets.
- Fixed the qtable widget.
- Removed a lot of code.
I am still looking for people to test the gtk3 port and file bug reports for missing/broken things!!
Moved Window Manager
this one actually consists of many things. So lets take it step-by-step.
Openbox -> Fluxbox
I have been experiencing problems with openbox. It would crash when monitors are removed using xrandr, also (but this is in hindsight) several things I wanted to setup of keybinding did not fully work.
So on strong advice from the great people in #gmpc I tried fluxbox. The move was very very easy, I copied my autostart.sh from openbox to startup in fluxbox, changed my xinitrc and I directly had a useable desktop. When setting up the keybindings how I like them it became apparent that setting up fluxbox is a lot easier then openbox.
For example:
<keybind key=”Alt-w”>
<keybind key=”Left”>
<action name=”If”>yes <action name=”unmaximize”/> </action>
<action name=”MoveResizeTo”>50% 50% 0 0 </action>
<action name=”GrowToEdge”>south </action>
</keybind></keybind>
in openbox. That actually did not exactly do what I wanted, (I wanted 50% width and 100% height) but worked around that with the GrowToEdge because openbox ignores the panel when calculating the monitor height.
In fluxbox, that does what I want, it looks like this:
Mod1 w Left : MacroCmd {ResizeTo 50% 100%} {MoveTo 0 0 Left}
This is so much easier, and does exactly what I want.
So to summarize the pros and cons:
Pros
- Setting up is a lot easier. No hand editing XML.
- The commands you can setup are actually closer to what I want to do then openbox was.
- It has a build in usable dock, so I can ditch tint2.
- Seems to be updated more regular.
- IRC channel is very helpful.
- (I will find some more here, I am sure I forgot some)
- build in run dialog (well fbrun)
Cons
- No alt-tab popup, and no one will be written.
- No battery in dock.
- build-in run run dialog is not that good.
So lets tackle the Cons one by one:
Window Switcher
Because there is no build-in graphical window switcher, Rasi advised me to use simpleswitcher. This is a small program that gives you a (keyboard searchable!) list of open windows.
I am completely loving this. Currently bound under Super-tab, but will be bound under alt-tab soon! I strongly advice people using that.
Requested by Rasi I hacked simpleswitcher to support transparency. The updated code can be found on github.
Screenshot: here.
Battery indicator in dock
This is still TODO, advice welcome.
Build in run dialog
This is very simple to fix, I set it to use gmrun. Same I used in openbox.
So all in all I got a very nice, fast, goodlooking desktop.
But as often, a taste of improvement makes you want more. So thanks to zeltak and Rasi I got several new nice programs to use.
Dunst
Dunst is a minimalistic and easily customizable notification daemon.
I made it nicely theme with my desktops theme. I patched the makefile to check dependencies, the code can be found on github.
Teiler
This is a genius little program to easily make and upload screenshots written by Rasi.
I think this is one of the most useful little bash scripts I have seen in a long time. The code can be found here. He managed to improve it a lot today, so do try it out!!!!
To have transparency support in dzen2 (used for countdowns), you can fetch my branch from github.
More to follow!