ocd-Dock - a dock written for Puppy

Window managers, icon programs, widgets, etc.
Message
Author
ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#41 Post by ProgRob »

Thanks, @Ghost Dog - that confirms what I thought. I was looking at the code yesterday and I think I can see the problem and I think it can be fixed. I am working on another interim release that will sort out the problems I have when it is not set to always on top and I can fix this at the same time (I hope). Keep an eye out over the next day or so.

Cheers,
Rob

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#42 Post by Ghost Dog »

Awesome! Thanks.
The Way of the Samurai

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#43 Post by ProgRob »

I am pleased to say that I have now uploaded release Beta 2.2 which contains the following bug fixes/changes:
  • The code that brings windows to the front when you are selecting from the list was causing a problem for @torm. I was finally able to reproduce something similar. I have made a change which works for me so selecting windows off the dock should be better now.
  • The dock behaviour when the keepabove parameter was set to false was all wrong. I have fixed this. The dock will come to the fore if you mouse over a visible section of it or if you use a reveal edge action.
  • The tagging of the dock window to use the window manager hint of 'dock' has been altered if keepabove is set to false. It turns out that the EWMH spec states that a window that is a dock is kept above other windows. If you choose keepabove as false then this is obviously not what you want. So the window only gets tagged as a dock if keepabove is true
  • @Ghost Dog had problems with the dock covering up menus. It turned out to be a one line fix which now means that the dock will try to dodge any window which is a menu as well as normal windows. Hopefully this has not introduced problems, but the code change makes sense to me and has worked in the testing I have done.
All the changes also means I can now create the sort of layout requested by @takenp - or at least how I interpret it. The example is:

Image

To get this effect I:
  • Modified the bullet theme to have rounded rectangles, remove the space between the dockitems, switch iconboxinvert on so they coloured the 'opposite' of the icon, and set the dockalignment to 0.0 so that the dock was left aligned on the screen.
  • Modified the config file to make the dock go along edge 3 (the top) so that menus dropped down and then put the offset to a number which moved the dock into the middle of the screen
  • In order that the dock didn't fly off up the screen I set the config parameter exposedock to always and then to stop the dock always being on top of all the other windows I set keepabove to false (and hence the need for some code fixes, as this bit wasn't working as it should
Hopefully this demonstrates that the dock can be configured quite flexibly just through the config and theme files!

Enjoy,
Rob
Last edited by ProgRob on Tue 09 Feb 2016, 16:45, edited 1 time in total.

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#44 Post by Ghost Dog »

Thanks, ProgRob!

Only problem I can see is that now when exposedock = max, it autohides all the time, even when not covered by a window.
The Way of the Samurai

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#45 Post by ProgRob »

Ouch - I'll take a look at that right away!

Thanks
Rob

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#46 Post by ProgRob »

@Ghost Dog,

The only change made to that section of code is where I have removed the condition where it ignores menus and similar windows.

Does the dock overlap with another window, such as a panel? That would be a cause as panels, like menus, were previously ignored and now will trigger a hide.

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#47 Post by ProgRob »

@Ghost Dog,

Ignore this - see the next post
Last edited by ProgRob on Thu 04 Feb 2016, 15:39, edited 1 time in total.

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#48 Post by ProgRob »

@Ghost Dog, I have now replicated the problem (basically I was being impatient in my testing, not giving the dock long enough before it tried to hide).

I have now uploaded Beta 2.2.1 which both fixes the problem and indeed improves the detection of window overlapping.

Have a go and let me know what you think. The fix is slightly clunky and I will improve it in a later release t make it more efficient!

Best wishes,
Rob

User avatar
takenp
Posts: 101
Joined: Wed 05 Aug 2015, 23:27
Location: Moskva
Contact:

#49 Post by takenp »

The bullet theme is awful for me (see scrot)
I tried dockalignment = 0.0 and failed

I've got the new pet file from the first post and tried to check version - failed too (neither -v --version, nor --help worked)

anyway -- many thanks for your efforts
Attachments
dockalignment.jpg
(64.68 KiB) Downloaded 761 times

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#50 Post by Ghost Dog »

Dock is perfect now, thanks. :D
The Way of the Samurai

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#51 Post by torm »

Will need to look into new version first, before asking,
then - how about stuff from the system-tray?
.. it comes pretty pre-loaded with most JWM setups, and
usually I just remove most of them from the tray anyway :?
Are these going to be as user-selectable "external widgets" ?
Plus DeadBeef and Osmo (any other.. ?) have a bad manner to hide there,
and therefore may need a way to be accessible at some point...
Most likely Retrovol will get some use, as for local install -most of other stuff
is preconfigured and left.. as-is, prior to installing dock.

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#52 Post by torm »

Some configuration notes.
I hope these are useful for someone :wink:

For IceWM, to disable IceWM taskbar, in-
/root/.icewm/preferences
set the following:
ShowTaskBar=0 # 0/1
Or one can just start X with plain:
xwin icewm
- that starts only window manager, without any session-extras.

For JWM, one can edit:
/root/.jwmrc
and comment out the line (somewhere after menu items..) that says:
<Include>/root/.jwmrc-tray</Include>
so it then looks like:
<!-- Include>/root/.jwmrc-tray</Include -->

I don't really know if it is the right way of doin' it, but it worked for me.
To get a permanent setting for JWM, one will have to edit the initial template file,
as .jwmrc gets overwritten every now and then..

For w32 refugees, who "just need" a Start-button, there should be
myGtkMenu, somewhere here on the forum (at least there was.. )
that may look pretty good with the dock, as it uses the same Gtk2 theme.
And when configured to whatever it should be..
-to use it with the dock, add the following:
run "Startmenu" "myGtkMenu /root/.config/myGtkMenu/myGtkMenurc" some_icon_name.png
to the file:
/root/.config/ocd/dock/pinned
"some_icon_name.png" will not need a path, if it is placed in a common place:
/usr/share/icons

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#53 Post by ProgRob »

Earlier today I uploaded a minor update - version beta 2.2.1.

The changes are:

1. To deal with a very good point made by takenp, there is now a -v switch which, if you run ocd-Dock from a terminal, you will get the version number printed out

2. In addition, if you use the -s switch, which brings up a diagnostics window which can be used to monitor the start up process, it will also report the version number right at the start

3. A fix to an alignment problem with indicators when the dock is placed on side 3 (N).

4. A new theme, blox (see below). This one is another, like bullet, where there is no bar. It is left aligned on the screen with a small, deliberate gap before the first icon. The background of the individual icons changes according to the icon.

Enjoy!

Image

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#54 Post by ProgRob »

@takenp,

Try the attached dock-config file - I suggest you place in ~/.config/ocd/dock/

It uses the new blox theme, so you need to download the very latest version from the first post. It should now report version Beta 2.2.1 if you use a -v switch.

It should then work as previously reported...


Regards,
Rob
Last edited by ProgRob on Wed 10 Feb 2016, 14:30, edited 1 time in total.

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#55 Post by torm »

JWM minimize to tray, when clicking the icon on the dock?
Icewm is fine, think I've seen that with bmpanel2 at some point..

will check the new version now 8)

Edit:
Any confirmation about JWM??
can be a local setup error....
Last edited by torm on Sun 14 Feb 2016, 03:41, edited 1 time in total.

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#56 Post by ProgRob »

torm wrote:Will need to look into new version first, before asking,
then - how about stuff from the system-tray?
.. it comes pretty pre-loaded with most JWM setups, and
usually I just remove most of them from the tray anyway :?
Are these going to be as user-selectable "external widgets" ?
Plus DeadBeef and Osmo (any other.. ?) have a bad manner to hide there,
and therefore may need a way to be accessible at some point...
Most likely Retrovol will get some use, as for local install -most of other stuff
is preconfigured and left.. as-is, prior to installing dock.
Hi Torm, my plan is to create as many widgets as possible to minimise the need for stuff inany kind of system tray. In my view items in the system tray are either useful (and so should have a widget) or useless (otherwise why are they stuffed away in the tray?). The idea is that you choose which widgets to include on the dock.

User avatar
takenp
Posts: 101
Joined: Wed 05 Aug 2015, 23:27
Location: Moskva
Contact:

#57 Post by takenp »

ProgRob wrote:@takenp,

Try the attached dock-config file - I suggest you place in ~/.config/ocd/dock/

It uses the new blox theme, so you need to download the very latest version from the first post. It should now report version Beta 2.2.1 if you use a -v switch.

it works as you said, thx!
If I put "keepabove = false" I get a big shadow again
btw how should the dock disappear if it is aligned to the left in the middle of the screen ?

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#58 Post by ProgRob »

@takenp, you raise a couple of points...

1. To avoid the 'shadow' I had to set the dock window as a 'dock' as defined by the Enhanced Window Manager Hints (EWMH) standard. Compton (and presumably other compositors) know about EWMH 'docks' and avoid putting a shadow round them. Unfortunately EWMH also specifies that docks should be kept above all other windows. Therefore if you want a dock that is not kept above other windows then it cannot be marked as a dock according to EWMH.

As a result, in the current version, if the dock is set with keepabove=true, it will also be marked as a dock so that compositors can treat it correctly. If it is set at keepabove=false, it is not marked as a dock so you will have to explicitly tell the compositor not to put a shadow round it. You can do this using the dock window's name 'ocd-dock'.


2. The alignment of the dock makes no difference as to where the dock hides. The way in which the dock hides is defined by the edge on which it is placed. In the example I have set the dock as non-hiding. If you set it to hide it will disappear off the top of the screen, which looks a bit weird. This is because, to make the menus drop down I set the dock at the top edge with a huge offset that moved it into the middle of the screen. To make it disappear off the side of the screen would require additional work. Maybe in the future...

Hope that explains things,
Thanks,
Rob

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#59 Post by ProgRob »

New release!! Version Beta 3.0

For this release I have completely rewritten the widgets system. It now has a extremely flexible skinning system (with its own scripting language) and at last there is support for external (user-definable) widgets.

The widgets in this release are:
  • Clock - which covers all kinds of clock-based widgets including calendars
  • sysmonitor - for cpu and memory monitoring
  • wifi - a monitor for wifi signal strength
  • battery - for monitoring battery levels
  • bbcweather - the current weather and forecast for the day's weather from the BBC in the UK's RSS feed - this is an example external widget
The number of skins has been expanded considerably, especially for the clocks pulling in a number of skins from XonClock and CairoClock.

The download links are in the first post - let me know how you get on. Note that if anyone did create their own skins for the old widgets then you will have to modify them. Also, you may need to modify your pinned file to use the new widgets.

My next targets are probably desklets (put those widgets standalone on the desktop!), better integration with composition managers (if you have one running) and some internal clean up of some of the other graphics code to bring it up to the standard of the new widgets code.

Cheers,
Rob

ProgRob
Posts: 67
Joined: Wed 13 Feb 2013, 12:39

#60 Post by ProgRob »

Unfortunately a bug was found in Beta 3.0. This meant that the default widgets were not being found. It worked correctly for widgets that were in the user's directory (~/.config/ocd/dock/widgets).

I have released a new version, 3.1, which fixes the bug.

Post Reply