ocd-Dock - a dock written for Puppy

Window managers, icon programs, widgets, etc.
Message
Author
Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#16 Post by Terry H »

Just saw this thread, so downloaded to check it out.

Initial execution.

As the name of the download file is different from internal naming, it won't load with ppm. it has to be renamed to remove the '-beta'. It installed OK after renaming.

Initial ran on slacko-6.3.0 with JWM. After installing libwnck all has been OK. Configuration is well documented and so far has been easy, with a well set out config file.

I then attempted to run it while using FbBox WM in same slacko install. It failed to run, giving the following error:

Code: Select all

 (ocd-Dock: 6069):Wnck-Warning**: Unhandled action type _OB_WM_ACTION_UNDECORATE
Over all it works well. Nice job.

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#17 Post by Terry H »

Further testing. This is done running slacko 6.3.0 with JWM, on my Dell D630 laptop.

Pinning applications using right-clicking works well. I did however have 2 instances (firefox & chromium) where pin option not displayed when right-clicked application, did not give option to pin. When tried again later, the option to pin was shown for these applications. so at present does not appear reproducible. Manual editing of pinned file, very simple and working well.

When exposedock is set to max, the dock is hidden when a window is opened within its space, as it should. When the window is closed, moved or changed size, the dock remains hidden. I would have thought the dock should be displayed when the window is changed. At present the only way I can get the dock to reappear is th change Desktops. The 'reveal' edge action, doesn't appear to work for me.

Edge actions so far seem a bit intermittent. I moved the dock to the left edge (baredge = 2). This is the values I currently have set:

Code: Select all

edge_action_1 = none
edge_action_2 = reveal
edge_action_3 = desktop show
edge_action_4 = run htop
When I first started running ocd-Dock, I ran it from a terminal, as it is easier to restart it to get changes to take effect. When I move the cursor to the right edge, the terminal which I was running ocd in would flicker with htop. When I changed running ocd at startup, I couldn't get htop to show at all.

I had tried desktop show, which if you leave the cursor against the edge it continually toggles the desktop between hide/show windows. Initially a bit off putting, but moving cursor away from edge stops this.

At present no edge actions appear to work at all for me. I believe that my config file is OK.


Edit: I unistalled ocd-Dock and reinstalled, edge actions are working better now. Running htop with an edge action still appears strange though. If running ocd-Dock from a terminal, the terminal flickers with htop. If running ocd-Dock from startup, it does not display htop at all when the edge action is invoked.

I changed an edge to run abiword and it is OK. You have to remember to move the cursor away from the edge once the application has started, or you get lots of windows opened, because it continues to do the action.

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

#18 Post by torm »

About documentation:
System-monitor widget could probably take few more lines about *.png file usage.
(if pixmap is less pixels than configured it will segfault, when randomly replaced)
And about custom shapes and sizes.. or use of opacity?

Maybe a hint about RGBA
255, 255, 255, 255
red, green, blue, opacity(transparency or alpha-channel)

"Style - 0 for a horizontal bar"- bar direction (used/available fg/bg)?
(on below screenshot -red is actually "used resource" on the right-hand-end of the bar.. )

Chapter 10.
"fixed launcher" would really make it perfect ( at least for those still missing e17 :wink: )
Attachments
ocd-sysmon-direction.png
(6.82 KiB) Downloaded 867 times

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

#19 Post by ProgRob »

Thanks again for all the feedback. To let you know that I have finally fixed the size of the images. You can still view them at full size at http://imgur.com/a/h9Z5z

I am working on a new release. So far I have implemented:
  • Fixed bug in the battery widget, so it should work properly
  • Fixed bug in the option to redraw the dock, so it should work properly
  • Implemented 'hot corners' so that edge actions can be associated with corners
  • Implemented a diagnostics window which can be used to understand what rules have been applied to match windows to desktop items - useful for diagnosing odd behaviour
I'm hoping to release this either this Friday or some point next week.

@Terry H - many thanks for your input.

The warning you note is a warning I get all the time (and so does the dock Plank) if you run it from a terminal. You get one of these warnings for every window that is open when the dock starts up or a new window is opened. However, I don't think that the warning is the problem - I think that there must be an EWMH which it doesn't support that I depend on. I'd like to make it all a lot more smart about EWMH, so at some point I might download FB and see what is the problem.

The pinning problem is interesting. The pinned option is hidden when the dock cannot link the window to a specific desktop file. The new diagnostic window might help understand why that is happening if you can reproduce the problem as Firefox and Chrome should be picked up.

I'll take a look at the exposedock max problem - doesn't sound right at all. I'll double check the reveal code as well. It may be another EWMH problem.

As for the sensitivity of the edge. I will look at implementing an additional option to stop it triggering more than one edge action. You can also reduce the sensitivity of the repeat action through the config file. Your config file looks perfect to me.

As to your htop problem. I do all my testing from a terminal window so this is something I may have overlooked. I'll test that too - I suspect the cause is the way in which I call such commands.

@Torm - looks like you've spotted that E17 was one of the influences! I agree that more work is needed on the widgets. I will see if I can reproduce something like the example you've provided.

Agree about RGBA - will consider that for a future release.

I'll sort the segfault issue. I suspect that is a missing check.

Can you expand on what you mean by 'fixed launcher'? Do you mean being able to have only a fixed number of items pinned to the dock?


Thanks everyone,
Rob

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#20 Post by Terry H »

ProgRob wrote:
@Terry H - many thanks for your input.

The pinning problem is interesting. The pinned option is hidden when the dock cannot link the window to a specific desktop file. The new diagnostic window might help understand why that is happening if you can reproduce the problem as Firefox and Chrome should be picked up.

I'll take a look at the exposedock max problem - doesn't sound right at all. I'll double check the reveal code as well. It may be another EWMH problem.

As for the sensitivity of the edge. I will look at implementing an additional option to stop it triggering more than one edge action. You can also reduce the sensitivity of the repeat action through the config file. Your config file looks perfect to me.

As to your htop problem. I do all my testing from a terminal window so this is something I may have overlooked. I'll test that too - I suspect the cause is the way in which I call such commands.

Thanks everyone,
Rob
Those results I posted were using slacko, have since installed in tahrpup, edge actions are OK.

Still not getting htop to run though, works fine to run other apps though, abiword starts fine.

I'll check further when you post new version.

Terry

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

Post Reply