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

#31 Post by ProgRob »

@takenp - I've just uploaded a new pet file with one additional line of code which should set the window manager hint for the dock window to 'dock'. This hopefully will fix your problem with Compton. I must try downloading that myself and give it a go, but the original target for this dock was Linuxes without composition (a future enhancement is for it to be compatible either way). If you're in a position to test it that would be fabulous!!

@Ghost Dog - thanks for the feedback. As for a menu, my original plan was that this dock would be written for Openbox and it is really easy to add a menu for that using xdotool. However, the more I have thought about it I would like to write a menu applet. So another enhancement now is applets - basically small executables that are "dock aware" to do things link provide a menu, a volume control, etc. Afraid it will have to wait until I have rewritten the widget system though.

As for a black version of the reflection theme, here is what you need to do:

1. make a copy of the reflection theme by copying /usr/share/ocd/dock/themes/reflection either to the same location (with a new name) or to ~/.config/ocd/dock/themes (you may have to create the latter directory)

2. open the theme file in your favourite text editor

3. Scroll down to the section called Bar Formatting and make the following changes:
a. change the barcolours to 1
b. change barcolour0 to 0,0,0

4. Next, I suggest you scroll down to the section at the bottom called HINTS and make the following changes:
a. Change the hintfontcolour to 255,255,255
b. Change the hintbackgroundcolour to 0,0,0

Save the file and you can now use it as your theme.

This shoud give you a completely black bar, with reflected icons with the hints being white text on a black background.

Regards,
Rob

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

#32 Post by torm »

It may be designed to provide a dock for WMs that don't provide one,
but don't be suprised if people will see that as a great replacement
for wbar, pwidgets, conky, cairo or whatnot long run projects.. :wink:
Or will use some code to create a snappy look-alike of a heavy DE-s out there..
And I don't think there's anything wrong with that.

I've noticed it doesn't see JWM and Rox drop-down menus, should it?
Happens when placed on a side of a desktop.

Borderless window may appear if hoovered the mouse too fast over the list
of opened windows, can be a JWM or Rox thing also, or even Gtk2 for all I know.
You can try if it happens with these Gtk2/JWM theme sets:
http://murga-linux.com/puppy/viewtopic.php?t=98048
..notice what happens to pop-ups when used with darker theme, is it picked up
(probably) from using wildcards for Rox settings?

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

#33 Post by Ghost Dog »

Thanks, Rob! That looks pretty good!

I did some reading about xdotool, and while it does sound easy, I agree that the menu applet does sound like a better idea. :)

Cheers!
The Way of the Samurai

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

#34 Post by ProgRob »

@Torm,

Thanks for the supportive words :D

As to the menus - it should not see those windows. That is by design. It effectively ignores all such windows (I can't remember offhand the name for them), it only sees what you might term "real windows".

I am currently unable to replicate the borderless window problem. I am going to try a couple of other configurations - different machine, different versions of puppy to see what I can do. There is certainly no code in there to make it do that. When you move your mouse over the list of windows it simply brings the highlighted window to the front of the window stack. When you move the mouse away it returns it down the stack. The problem I can foresee is that on a slower machine this might take quite a bit of processing power. Also, maybe some WMs might not be able to cope with it changing as quickly as it does.

If it's a problem, then there is a config command to switch it off (as always) - the enhancedwindowselection parameter in the config file can be set to off and then it stops it doing all the fancy stuff with window selection.

Cheers,
Rob

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

#35 Post by Ghost Dog »

Is there a way to set the dock so it hides when covered by a menu?
The Way of the Samurai

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

it works!

#36 Post by takenp »

ProgRob wrote:@takenp - I've just uploaded a new pet file with one additional line of code which should set the window manager hint for the dock window to 'dock'. This hopefully will fix your problem with Compton..
It works with compton! Thx alot )
Attachments
capture.jpg
(65.71 KiB) Downloaded 506 times
[color=indigo]~=~=~=~=~
I'm running Internet radio here: http://melodymaker.org
The very best of hard rock with 192 bit quality stream.[/color]

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

#37 Post by ProgRob »

@takenp - great news. The frustrating thing about that is that a very early version had that line in. It obviously got lost during a rewrite along the way.

@Ghost Dog - no way at present. I guess you have the dock set to always be above other windows and then a menu is being shown which it is covering - am I right? What I'll do is have a look at the code to see if there is a way to make it take such windows into account when deciding whether to dodge. I can see why it might be a problem.

Thank you both for all your help!
Rob

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

the idea

#38 Post by takenp »

/
//
///
@ProgRob I like the idea of placing Dock to more places than top/bottom/left/right as well as to make drop-down (rise-up) for submenus.

It could make sense
Attachments
shot1.png
(100.78 KiB) Downloaded 457 times
shot2.png
(116.33 KiB) Downloaded 479 times
[color=indigo]~=~=~=~=~
I'm running Internet radio here: http://melodymaker.org
The very best of hard rock with 192 bit quality stream.[/color]

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

#39 Post by ProgRob »

Hi @takenp,

In theory this is possible now. You need to set the edge to 3 and then use the offset in the config file to move the dock into the centre of the screen. You can also set the alignment of the dock in theme file to move it to one side. You also need to disable hiding by setting exposedock to always (otherwise the dock disappears off the top edge) and set keepabove to false (otherwise the dock is always above the windows).

Well, that's the theory. I had a go myself and this uncovered a bug. The keepabove option is broken. I had a play at fixing it and that gave me another problem - every time a widget is updated (a clock goes forward a minute) then the dock is brought to the top.

So, I need to fix these things, but I think that I probably won't do an intermediate fix.

Thanks for the suggestion as it showed up the bug which I now need to fix properly.

Rob

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

#40 Post by Ghost Dog »

@Ghost Dog - no way at present. I guess you have the dock set to always be above other windows and then a menu is being shown which it is covering - am I right? What I'll do is have a look at the code to see if there is a way to make it take such windows into account when deciding whether to dodge. I can see why it might be a problem.
I have it set to always on top except when covered by a window, but then a menu is being shown which it is covering. :)
The Way of the Samurai

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

Post Reply