xDaks's avatar

Webkit App Bar

By xDaks
58 Favourites
59 Comments
12K Views
Webkit App Bar was originally intended as an application launcher (on left side in the screenshot) written in Python with using QtWebKit.
Now includes a simple plugin system, allowing the creation of any kind of desktop widget.

Download

Archives are on GitHub Icon ultraminiGitHub now.

Qt4 version for a little bit older distros like Debian 8, *buntu 16.04 LTS, Mint 18.*

Qt5 version for distros, which removed Qt4 webkit support, beginning with Debian 9, *buntu 17.10, Manjaro 17.* ... and newer

Changes

17.9.2017
new Qt5 & Python 3 version

3.1.2016
cleanup qBrowser code a bit, new example "active area", new intellihide option in "autohide" example


16.3.2015
added Fluxbox to the list of supported WMs

5.5.2014
fixed WM detection

20.9.2013
fixed problem with diacritics in the application path, thanks to lillgrinn

4.4.2013
new version with plugin support - few examples included ;-)

19.4.2013
few fixes, new "empty project", new example - app launcher with autohide property
Published:
© 2012 - 2020 xDaks
Comments59
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
MarioMey's avatar
Now, I'm on Debian 9... and this app doesn't work any more. :/

First at all, I had to install python-qt4. But, after that, this error is shown:

mario@circo3d-md:~/apps/webkit_app_bar$ python qBrowser.py appbar
Traceback (most recent call last):
  File "qBrowser.py", line 24, in <module>
    from PyQt4 import QtCore, QtGui, QtWebKit
ImportError: cannot import name QtWebKit

After some research (stackoverflow.com/questions/37…), I arrived to this info:

(...)

The latest version does not contain QtWebkit.so.

Unfortunately the code in question needs to be updated to use an alternative such as PyQt5 equivalent module.
(...)

Maybe, it is the same issue. I tried one workaround, but it didn't work.

I know that you are not developing this app any more... that's why I'm sad :/.

Anyway, thanks for the app. I used to use a lot.

xDaks's avatar
Hey, Qt5 version is done, you can try it now.
MarioMey's avatar
Hey, man, even AppBar doesn't work yet, I thank you for your time and dedication!

For now, it says:

```
mario@circo3d-md:~/apps/webkit_app_bar_qt5$ python qBrowser.py appbar
Traceback (most recent call last):
  File "qBrowser.py", line 25, in <module>
    import urllib.parse
ImportError: No module named parse
```
So, I found a solution here: stackoverflow.com/questions/29…, changed

import urllib.parse
to:
from urlparse import urlparse

But now, it says:

```
mario@circo3d-md:~/apps/webkit_app_bar_qt5$ python qBrowser.py appbar
Traceback (most recent call last):
  File "qBrowser.py", line 33, in <module>
    import PyQt5
ImportError: No module named PyQt5
```

There're several packages about Python Qt5. I installed python3-pyqt5 but maybe it's not enought. I don't want to install every python3-pyqt5* if I don't need them. Do you know which I need to install?
xDaks's avatar
It looks like you're trying to run app bar with python 2 (in my Debian 9 is python alias for python 2), but python 3 is required, so:

python3 qBrowser.py appbar

command should work
MarioMey's avatar
Yes, man! Also, I had to install python3-pyqt5.qtwebkit... but it works!

Thank you again.
xDaks's avatar
Ok, it seems the only reasonable solution is to switch to Qt5. I working on it hard, it'll be released soon... ;)
MarioMey's avatar
xDaks's avatar
Although I don't develop the AppBar, I still use it every day.

Give me few days to check the issue please.

I plan to switch to Qt5 in the future, part of code is rewriten, but isn't ready to release.
MarioMey's avatar
Hey, I think this is the bar I was looking for.

Some issues:
- The autohide is on top of the other programs, but appbar isn't. Also, it made me difficult to find it! I had to minimize everything. Where is the code that make one behind and the other on top of everything?
- In my OS, in autohide, the scrollbars appear because of the size. With 90 x 330 it's perfect for the example.

Suggestion:
- One of the commands could be "gedit autohide/index.html", for example. A fast way to edit the menu.
- (more difficult) Rewrite the code to get the menu from a more accesible file. For example, a XML or JSON or CSV like:

<menu>
<name="FileBrowser" command="nautilus"/>
...
</menu>

or

{
  "FileBrowser": {
  "command": "nautilus"
},
...
}

Thanks, man.
xDaks's avatar
Thanks for your feedback and suggestion, but I don't plan no changes or improvements now.
App Bar isn't application essentially, but prototype of platform for create desktop widgets, like Electron (electron.atom.io/), but a bit lighter.
I know examples aren't perfect - they are just demos, I pointed the way and everyone can go ahead...
MarioMey's avatar
Thanks for the response. I understand your non-plans!

Only one more question... Is it hard to implement the "Always on top" from the "autohide", to the "appbar"? It would be veeeryyyy niiiceee...

Thanks again!
xDaks's avatar
"Always on top" style is pretty depend on DE/WM, in my Openbox or Xfce works fine. What is your desktop?
MarioMey's avatar
I have Mate and "active_area" works at top of screen :D (Big Grin) .
MarioMey's avatar
Also, the posibility of moving appbar by clicking and dragging in its title, for example. It's uncomfortable to have it locked.
xeXpanderx's avatar
Hey man,

Setting the position is not working... I use Fluxbox 1.3.7. I tried changing the values in appbar index.html (in <script> part). Changing c.Top does not move the bar in any way... I just want to set the bar to left-center.
xDaks's avatar
Hey, try this: download current version of AppBar and run it from terminal. AppBar shows its position in terminal after start like this: (0, 220, 80, 310).
Open index.html in your text editor, change c.Top value in <script> section -> save file -> right click on AppBar (not on the item) and choose "Reload".
Positions should be changed (an also position values in terminal).
xeXpanderx's avatar
Nevermind, I moved the index.html - file to the right direction.

It works! Thanks man!
xDaks's avatar
Great news... :D
xeXpanderx's avatar
Hi man, I get this now:

python qBrowser.py                                                                                      
no source file...
/home/username/Downloads/webkit_app_bar/index.html
unknown
Traceback (most recent call last):
  File "qBrowser.py", line 63, in _on_pageLoaded
    self.pageConfig = self.getConfig()
  File "qBrowser.py", line 111, in getConfig
    for key in cfg:           
TypeError: 'NoneType' object is not iterable
sabyano's avatar
Text-mode on GUI is my favorite.
spotnili's avatar
Very nice app bar... a little minor information to add. Not displayed if we've active multiple desktop like desktop 2 3 4, only on one desktop work pretty fine.

Also,
Can you help me to launch Terminal applications like Weechat, Newsbeuter, Htop etc...
For weechat from obmenu/openbox i have this code
terminator --command="weechat" --geometry=1100x550
which launch weechat, but i want to launch also from your dock script, when i put the code to appbar/index.html not work, just open terminator but doesn't execute command for weechat

here is the code from index.html
<tr><td><a wytiwyg="1" href="cmd::terminator --command=" weechat"="" --geometry="1100x550"">weechat</a></td></tr>

Thank you, I always wanted to have a script dock panel like this. Really good snippet.
xDaks's avatar
Hello, I'm glad you like AppBar.

I guess you can run weechat:
href=""cmd::terminator --command='weechat-curses' --geometry=1100x550"

And if bar is displayed only on one desktop - there can be problem with non existing DESKTOP_SESSION variable. Solution is to write line to file /etc/xdg/openbox/environment (or ~/.config/openbox/environment):
export DESKTOP_SESSION=openbox

I hope it helps you...
spotnili's avatar
Thank you xDaks, the first weechat-curses command work pretty good, shame on me how i forgot such thing :)

2nd, i checked /etc/xdg/openbox/environment because doesn't exist on .config/openbox ...
so i wrote at "/etc/xdg/openbox/environment" but i did not see any difference... did the restart openbox but still
Webkit App Bar not appear on 2nd desktop.

Look, i also have conky which work on both desktop 1 and 2

Do
you've any other suggestions?

Thanks a lot for your help.
xDaks's avatar
Ok, I made small change of App Bar code, you can download new version and try if works for you...
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In