Giter Site home page Giter Site logo

menu's Introduction

Menu Build Status Translation status

Global menu bar written in Qt with as few Kf5 dependencies as possible

On FreeBSD:

On FreeBSD-based LIVEstep:

Dependencies

On Arch Linux:

sudo pacman -Sy
sudo pacman -S cmake gcc qt5-base qt5-tools qt5-svg qt5-x11extras kwindowsystem libxtst libxdamage libxcomposite libxrender libxcomposite libxcb xcb-util libdbusmenu-qt5 kdbusaddons libpulse glibc make pkgconf qt5-base icu

Note that not all functionality is implemented for anything else than FreeBSD at this point. So building the Menu for operating systems other than FreeBSD will result in partly non-functional menu, currently only usable for development.

On FreeBSD:

sudo pkg install -y cmake pkgconf qt5-x11extras qt5-qmake qt5-widgets qt5-buildtools kf5-kdbusaddons kf5-kwindowsystem libdbusmenu-qt5 qt5-concurrent

Build

mkdir build
cd build
cmake ..
make
sudo make install

How to use

Qt applications (KDEPlasmaPlatformTheme.so and libqgtk3.so work, plain Qt and qt5ct don't work yet)

Currently only works with QT_QPA_PLATFORMTHEME=kde and https://github.com/helloSystem/QtPlugin using QT_QPA_PLATFORMTHEME=panda. FIXME: Make it work with e.g., QT_QPA_PLATFORMTHEME=qt5ct.

For this, it would probably need to support the Unity protocol?

Gtk applications (Inkscape, GIMP, Audacity work; Firefox, Thunderbird do not work yet)

Prerequisite: https://www.freshports.org/x11/gtk-app-menu/

E.g., Firefox and Chrome use

/usr/local/lib/gtk-2.0/modules/libappmenu-gtk-module.so
/usr/local/lib/gtk-3.0/modules/libappmenu-gtk-module.so

On FreeBSD:

git clone https://github.com/NorwegianRockCat/FreeBSD-my-ports
cd FreeBSD-my-ports/
cd x11/gtk-app-menu/
sudo make
sudo make install

gmenudbusmenuproxy https://phabricator.kde.org/D10461?id=28255

user@FreeBSD$ sudo pkg which /usr/local/bin/gmenudbusmenuproxy 
/usr/local/bin/gmenudbusmenuproxy was installed by package plasma5-plasma-workspace-5.19.2

Can we get it "standalone", without KDE Plasma?

This application finds windows using GTK GMenu DBus interfaces [1] and forwards them through DBusMenu. (...) LibreOffice with appmenu-gtk-module (...) Works with Gimp or Inkscape if you have appmenu-gtk-module (there's GTK2 and GTK3 variants) installed and GTK_MODULES=appmenu-gtk-module environment variable set.

More information regarding it: https://blog.broulik.de/2018/03/gtk-global-menu/

user@FreeBSD$ export GTK_MODULES=appmenu-gtk-module # Not needed!
user@FreeBSD$ ls /usr/local/lib/gtk-3.0/modules/libappmenu-gtk-module.so
# /usr/local/lib/gtk-3.0/modules/libappmenu-gtk-module.so = Needed!
user@FreeBSD$ gmenudbusmenuproxy &
# Now launch inkscape
user@FreeBSD$ inkscape

Initially the menu is empty, but when I bring a Qt application to the front and then switch back to the Inkscape window, then the menus work.

user@FreeBSD$ export GTK_MODULES=appmenu-gtk-module # Not needed!
user@FreeBSD$ ls /usr/local/lib/gtk-3.0/modules/libappmenu-gtk-module.so
# /usr/local/lib/gtk-3.0/modules/libappmenu-gtk-module.so = Needed!
user@FreeBSD$ gmenudbusmenuproxy &
# Now launch gimp
user@FreeBSD$ gimp

Same: Initially the menu is empty, but when I bring a Qt applciation to the front and then switch back to the Inkscape window, then the menus work.

Seeing lots of

QDBusSignature: invalid signature ""
QDBusSignature: invalid signature ""
QDBusSignature: invalid signature ""

in gmenudbusmenuproxy.

Same for Audacity.

TODO: Can we get it to work for Firefox and Thunderbird? Are they missing this functionality lately?

user@FreeBSD$ export GTK_MODULES=appmenu-gtk-module
user@FreeBSD$ gmenudbusmenuproxy &
# Now launch firefox
kde.dbusmenuproxy: Got an empty menu for 0 on ":1.103" at "/org/appmenu/gtk/window/0"

Same for Thunderbird. `kde.dbusmenuproxy: Got an empty menu for 0 on ":1.152" at "/org/appmenu/gtk/window/1".

License

menubar is licensed under GPLv3.

Also see

https://github.com/cutefishos/statusbar/

menu's People

Contributors

probonopd avatar reionwong avatar weblate avatar antony-jr avatar preyk avatar satoq9 avatar louies0623 avatar bitigchi avatar felixonmars avatar skyonal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.