Code Monkey home page Code Monkey logo

dde-top-panel's Introduction

DDE Top Panel

【中文请看】:Deepin 论坛 【全局菜单基本原理请看】:Github WIKI

Top panel for deepin desktop environment v20.

This is a modification of dde-dock for top panel. Comparing to dde-dock, it:

  • remove the launcher, show desktop, multi tasking, and application icons
  • full support for dde-dock plugins and tray
  • remove lots of unnecessary things so it is just a top panel. It is fixed to the top of the screen, and there is no way to change that.
  • separate plugin config gsetting path /com/deepin/dde/toppanel
  • different plugin directories: /usr/lib/dde-top-panel/plugins and ~/.local/lib/dde-top-panel/plugins

Features

  • global menu support (with dde-globalmenu-service)
  • show window title on top panel
  • show title buttons on top panel when current window maximized
  • double click on empty area on top panel will maximize current window
  • dragging and moving current maximized window by dragging empty area of top panel
  • coping with ~/.config/kwinrc can remove the window title bar when maximized
  • support multi monitors
  • personal customization

Know issues:

  • panels on non-primary monitors only have the window title function. The plugins can not work on them. It is not an issue because the QPluginLoader can only create one instance from one plugin file. So the panel cannot create as many plugin widgets as the panels. Still trying to add the plugin back to all panels
  • Shortcuts of the global menu not work yet

Behaviors

  • Always show title buttons for maxmized window and hide for unmaxminzed window (optional: show menu for maximized window on hover)
  • Show window title only when no global menu for current window

Screenshot

How to run

For Deepin V20

  1. download zip from release page and unzip it
  2. cp *.xml to /usr/share/glib-2.0/schemas, and run sudo glib-compile-schemas /usr/share/glib-2.0/schemas
  3. run ./dde-top-panel
  4. for removing the title bar of maximized windows, make sure your ~/.config/kwinrc contains items below, then logout.
[Windows]
BorderlessMaximizedWindows=true
  1. If you want to use plugins on top panel, just copy the plugin files to ~/.local/lib/dde-top-panel/plugins. For example, if you want to get tray icons on top panel, just cp /usr/lib/dde-dock/plugins/libtray.so ~/.local/lib/dde-top-panel/plugins
  2. If you want to enable the global menu, please install !(dde-globalmenu-service)[https://github.com/SeptemberHX/dde-globalmenu-service.git]

For Arch

Thanks to @JunioCalu . dde-top-panel is in the AUR now. https://aur.archlinux.org/packages/dde-top-panel

For Other distributions

I only have deepin v20 installed on my computer, and I cannot compile it for other distributions. So it needs to be built from source.

Dependency: Qt5Widgets, Qt5Concurrent, Qt5X11Extras, Qt5DBus, Qt5Svg, DtkWidget, DtkCMake, KF5WindowSystem, XCB_EWMH, DFrameworkDBus, QGSettings, DtkGUI

git clone https://github.com/SeptemberHX/dde-top-panel.git
cd dde-top-panel
mkdir build
cd build
cmake ..
make

Then dde-top-panel should be in build/frame/dde-top-panel. Then go to step 2 in How to run for Deepin V20

For tray icons of wine applications

Due to the logical of tray plugins, only one tray widget can hold the wine trays (You can click the icon and it will response to the click).

The main code of wine trays is in plugins/tray/xembedtraywidget. Generally, it wraps the raw wine trays with a new widget and embeds it to the tray, then it operates on the new widget. The problem is every tray widget will create a new container widget for each wine trays, and the tray widgets launched before can't the window id of the new container widget.

This part needs help.


Icons made by Freepik from www.flaticon.com

dde-top-panel's People

Contributors

septemberhx avatar felixonmars avatar huiyifyj avatar siamsami 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.