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

New Release - Beta 2

#21 Post by ProgRob »

I am pleased to announce the beta 2 release of ocd-Dock.

I have updated the first post with the download details and the documentation has been updated as well.

Here is a summary of the new release:

New features:
Enhanced window selection when there are multiple windows open associated with the same dockitem. The default is now to detect which option the mouse is over, bring that window to the top of the stack. There is an option in the config file to turn this behaviour off
Ability to associate edge actions with corners as well as edges.
Windows should now minimise towards the right icon on the dock. Note that this behaviour might get overridden if you have another panel running (e.g. lxpanel) or if the WM does not support it
Urgency alerts are now implemented and there is an option in the config file to ignore them
All boolean config and theme parameters treat the values ‘true’, ‘yes’ and ‘on’ the same and did the same for ‘false’, ‘no’,a dn ‘off’
Edges can now be called N, S, E and W instead of 3, 1, 4, and 2 respectively (though the numeric option still works)
Default colour of hint text and the background of hints are now the Gtk defaults if no colour is specified in the theme file
Diagnostics window implemented which is invoked by modifying the start-up call with -m for matcher rules and -s for startup. These are useful for diagnosing odd matching behaviour (e.g. why has the dock named the dockitem in the way it has) or to check which files are being loaded at start-up
Sysmonitor widget has two new styles (3 and 4) for bars - these go from right to left and top to bottom respectively

Changes/bug fixes:
Battery widget now works correctly
Sysmonitor widget style 0 now draws correctly
Widgets which have an error now correctly do not appear
Rebuild option on right click fixed to work correctly
Default behaviour for an unrecognised desktop edgeaction to ‘none’
Default edgeactions in config file are now all ‘none’
Edgeactions no longer repeat automatically and the edgedelay parameter has been removed from the config file
Fixed the max setting for the dock so that when hidden it will show as soon as space becomes available
fixedonly option to config file to make the dock a launcher bar only - windows from applications not in the pinned file do not cause a new dockitem to be created. By default this feature is off but can be switched on in the config file

In addition, I have investigated why htop does not appear to work as an edge action. It turns out that htop requires a terminal to work. As a result you need to tell ocd-Dock to open a terminal to run it in. The solution therefore is to set the edge action to:

run urxvt -e htop

and it all works fine!

Feedback very welcome,
Thanks,
Rob

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

#22 Post by torm »

Happy.. this Year! :wink:
..just in case, I think there should be a bottle stuffed away somewhere :D

Beta2
Somehow I've managed to get a few "borderless" windows...
Don't actually know how to re-create this, at this point.

How about external widgets?
Maybe some kind of a example, to play around with?

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

#23 Post by ProgRob »

Happy New Year!

Hi Torm, not sure how borderless windows could be created. If you can get a repeatable process do let me know.

As for external widgets - that is the one thing I am now working on. At present (part from your borderless windows) I am unaware of any bugs so the widget system is my main focus.

At present I am thinking of recoding a significant part of it to make it more re-usable and to make it easy to define external widgets. Keep watching, but this one may take a little time. The good news is that I have managed to simulate a key part of how external widgets might work, so the first rather important step has been achieved.

Thanks for your interest!

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

disabling shadows for dock

#24 Post by takenp »

Hi @ProgRob !

I'm using compton composing manager for drawing shadows. I got a big shadow while trying your dock. I have found the way how to remove it:

Code: Select all

compton ... --shadow-exclude 'g:a:Dock'
where 'g' sands for "general class" and 'a' for "any"
Dock is a keyword (ocd-Dock did not work)

so I added the above string to my ~/Startup/compton.sh

My be you suggest a better way ?


many thx and regards for your job!

/take

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#25 Post by mavrothal »

Very nice.
But this is a binary file. Is there the source somewhere?
Is it an open source program?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#26 Post by ProgRob »

@takenp - thanks for your feedback which is really interesting and useful. Did you get a huge shadow that went round the outside of an invisible 'box' around the dock? If so, I can see why it would happen, but I would have to do some work to see whether there is a better way than you suggest to fix it. My problem is that I have never managed to get composition working on Puppy on multiple machine. Can you tell me which version of Puppy you are using as that might also help?

@marothal - the plan is to be open source. However, I am reluctant to release the source until I move off beta. At present I am doing a mjor re-write of the widget system. Once that is complete, assuming no major bugs are found I plan to release the first live version after that change has been completed. My challenge is how to release the source code - I am currently tempted by releasing on github or somewhere similar as the code should work on many linuxes as well as puppy.

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#27 Post by puppyluvr »

:D Hello,
Testing on Upup3.9.9
Other than some "minimize/restore" issues with JWM (as expected) it works good. Very configurable. Created a .desktop and jwm.rc entry to start it from the menu, and an "off" button on the dock to stop it. The "pinned" file is easy to modify to launch any .desktop file, and use its icon. The addition of "hot corners/sides" is great by itself, and could be a usefull seperate .pet option..
Good work, I'll keep playing and get back.
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

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

#28 Post by takenp »

Did you get a huge shadow that went round the outside of an invisible 'box' around the dock?
Can you tell me which version of Puppy you are using as that might also help?

I use Tahrpup 6.05 and compton from ubuntu repo
See the scrot.

I suppose you should mark your Dock as 'dock' or 'panel' -- many compositing managers dont make a shadow for them or have a special key.
Attachments
capture17070.jpg
(127.57 KiB) Downloaded 388 times

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

#29 Post by ProgRob »

Thanks @takenp. I need to set the window hint type I think. I'll look into that.

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

#30 Post by Ghost Dog »

I really like this dock. It's very nice, lightweight and functional.

Any possibility of getting a "menu" icon?

I'd also like to figure out how to get a shiny black version of the reflection theme.
The Way of the Samurai

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

Post Reply