Git Product home page Git Product logo

cosmic-panel's Introduction

Cosmic Panel (WIP)

Building and Installing .deb

dpkg-buildpackage -b -d
cd ..
sudo dpkg -i cosmic-panel_0.1.0_amd64.deb

Configuring the panel / dock

See the provided configs for the panel and dock in data/default_schema. The com.system76.CosmicPanel directory contains a key called entries, which is a list of profiles to be loaded. Each profile then has its own directory, for example, com.system76.CosmicPanel.Panel. You can make changes to the keys in this directory to alter the config. After making changes to copies of the provided config in data data/, you may install each to $HOME/.config/cosmic/ find data/default_schema_copy -type f -exec install -Dm0644 {} {{$HOME/.config/cosmic}}/{} \;

Usage

cosmic-panel

Installing Plugins and Applets

See the following for examples of applets and plugins which can be installed and used:
https://github.com/pop-os/cosmic-applets

cosmic-panel's People

Contributors

drakulix avatar git-f0x avatar ids1024 avatar maciekk64 avatar ryanabx avatar wash2 avatar wsx-udscbt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cosmic-panel's Issues

Tiling windows are partially obscured by non-hiding dock.

I believe this is a relatively recent regression, but am not positive.

When tiling, windows spawn such that their bottoms edges are obscured by the dock, but not such that their tops are obscured by the panels. Given that I believe this used to be working, and that as I understand it, the dock and the panel are built from the same underlying architecture, I'm inclined to think that the dock is the potential root cause.

[NVIDIA] Clicking an already-open applet in the panel crashes the panel

Version: 5749874.

Steps to recreate:

  1. Log in on an NVIDIA system (I'm seeing the issue on oryp8 with an RTX 3080, only when booted in NVIDIA mode; I am not seeing the issue on lemp10).
  2. Click an applet in the top panel (e.g. the clock).
  3. After it's open, click it again.

Actual behavior: All panels (top and bottom) disappear from the screen after a brief pause. The following is logged:

Aug 29 16:03:32 pop-os kernel: show_signal_msg: 42 callbacks suppressed
Aug 29 16:03:32 pop-os kernel: cosmic-panel[4057]: segfault at 55c7b13f6826 ip 00007f93c6297f74 sp 00007ffddaa028f8 error 4 in libc.so.6[7f93c6228000+195000]
Aug 29 16:03:32 pop-os kernel: Code: 14 00 e8 ff 1e fa ff 48 8d 0d e8 98 14 00 ba 53 02 00 00 48 8d 35 2a 16 14 00 48 8d 3d 4e 16 14 00 e8 e0 1e fa ff f3 0f 1e fa <8b> 47 10 89 c2 81 e2 7f 01 00 00 90 83 e0 7c 0f 85 a7 00 00 00 53
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166752Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166777Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166783Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166789Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166811Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166818Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166824Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166841Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.166847Z ERROR cosmic-panel: cosmic_session::generic: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: Gdk-Message: 16:03:33.166: Error reading events from display: Broken pipe
Aug 29 16:03:33 pop-os cosmic-session[3996]: 'cosmic-panel' exited with status signal: 11 (SIGSEGV) (core dumped)
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.183719Z  INFO cosmic-panel: cosmic_session::process: 'cosmic-panel' exited with status signal: 11 (SIGSEGV) (core dumped)
Aug 29 16:03:33 pop-os /usr/libexec/gdm-wayland-session[3996]: 2022-08-29T22:03:33.183765Z ERROR cosmic-panel: cosmic_session::generic: exited with status signal: 11 (SIGSEGV) (core dumped)
Aug 29 16:03:33 pop-os cosmic-session[3996]: exited with status signal: 11 (SIGSEGV) (core dumped)

Expected behavior: Clicking an applet that's already open should close the applet.

Other notes: I wasn't sure if this should be opened in cosmic-panel, cosmic-session (since the logs refer to that more), or cosmic-comp (since it's specific to NVIDIA). Feel free to transfer.

Applets can cause rendering issues for vertically oriented panels.

Related to pop-os/cosmic-applets#247

While testing panel/dock orientations with different combination of applets, I noticed that the App Library Button applet can cause issues for correctly rendering other applets on the panel. This is most noticeable with the dynamic workspace selectors in the following screenshots.

screenshot-2024-02-27-23-11-28 screenshot-2024-02-27-23-15-04

At a quick glance, it looks like the text is being centered, but that anything much beyond the centerline isn't shown. This is similar with the Workspaces Button. In both cases, the last fully rendered letter of the Application or Workspaces button is the 50%+1 letter (The 7th letter for "Applications" and the 6th for "Workspaces")

It might be helpful to test longer strings. And, it might also be important to find some way to test "tall" strings as well, to see if the same issue impacts horizontally oriented panels.

Consider how panel configuration is passed to applet

It looks like load_from_env loads the config file from the filesystem, which has a few issues:

  • The configuration in the fs may not be the one the panel is using, depending on how applet restarting and configuration changes end up being handled.
  • This would fail if an applet were sandboxed without access to this. And it isn't really necessary for an applet to read the full configuration.
  • An applet needs a ron parser, and needs to know the schema used by the config file. This is fine for applets in GTK and Rust, or potentially other languages, if libcosmic_applet is used, but seems unnecessary in general.

Does an applet need to know anything other than size and orientation? It would be easy to just pass those as env vars. If those change as the user configures the panel, applets would need to be restarted. If we wanted something that could adjust dynamically, that's more complicated.

I'm also somewhat concerned about how get_applet_icon_size() works and is used. I believe as currently implemented, this is the size of the icon, but the applet itself has additional padding, based on how GtkButtons work and what the GTK theme defines? I guess it's important to have a consistent size for icons and any additional padding...

regression: weird panel shenanigans

Not sure if this is the fault of cosmic-panel or cosmic-applets, but I am having lots of issues with the panel/applets

  • Adding applets to the dock doesn't make them visible
  • The main panel is blank and super small, setting the panel to have a gap between it and the screen edges reveals exactly one applet (the network applet)

screenshot-2024-03-29-03-07-17

screenshot-2024-03-29-02-56-57

cc: @wash2

Stacked Panel and Dock Auto-hide/Reveal Interactions

Stack the Panel and Dock to one side or top/bottom.

  • Automatically hide just the panel: can not reveal panel
  • Automatically hide just the dock: hard to reveal (should reveal pushing against screen edge)
  • Automatically hide both: only the dock reveals

Dock exhibits very odd visual behavior

The panel has different behavior depending on whether a window is maximized or not.

When a window is maximized, the panel is auto-hide, and doesn't show any applications:

Panel1

When no window is maximized, the panel looks like this, but only if I bring the mouse down to the bottom-middle of the screen.
Panel2

Additionally, when first starting the desktop session, the panel looks like this:
White square?

Wrong panel order on same edge when changing settings

When the extended Panel is moved to the same edge as a non-extended Dock, it is often placed over the Dock instead of the screen edge (occurs on all screen edges, but sometimes works correctly). Usually happens when moving a panel to the edge where the dock is anchored.
screenshot-2024-03-27-11-42-51

Panel/Dock do not instantiate correctly on freshly attached display

When attaching a display after boot, I noticed that the panel and dock on the new display did not correctly instantiate. Each instead presents as a thin bar the width of the screen with the correct colour and opacity settings, but no applets and without respecting settings like extending to screen edges or gaps between dock and screen edge.

This log is for a boot in which I attempted to attached a display via USB-C/DP twice. Each time the panel/dock failed to instantiate correctly.
thinbar.log

Sometimes, after an extended period, something seems to prompt a redraw which fixes the dock and panel on the external. But this is indeterminate enough for me that it sometimes takes as little as a minute, and sometimes more than 20 minutes, and a sometimes seemingly never.

I do not believe that this is 100% a panel/dock issue, as the issue wasn't present on 3aad790 on 22nd May, but was on 25th May on the same commit. It is also present on subsequent commits.

I'll attach screenshots in future if needed - currently, cosmic-screenshot is broken.

Panel wont appear at all.

Hi, followed instructions to install COSMIC on PopOS and all looks great, but panel wont work at all, created config file as described in instruction, end cosmic-panel process, rebooted, panel wont appear at all, someone know how to fix that

Applet processes sometimes outlive panel

This stands out since the applets using GApplication don't show up when the panel is started again.

Maybe the way the Wayland socket is being created could be done differently so that an EPIPE is generated? Or if subprocesses could be killed when the panel stops...

But then, stopping with ctrl+c doesn't generally seem to have this issue, so I don't know exactly in what cases this happens...

Adjust Default Applets on the Top Panel

  • Add the tiling applet to the left of the sound applet
  • Add the bluetooth applet to the left of the power applet (right of network)
  • Add the applications-button applet to the right of the current workspaces applet (leave the workspaces button off for now)

Panel Design and Function Matching

This issue outlines remaining changes to match the design.

Design issue
Figma file

  • Auto-hiding panel current leaves a couple pixels visible. The panel should hide entirely.
  • Revealing the auto-hidden panel should cover windows instead of moving them when tiling is enabled (works in floating mode)
  • Use 8px corner radius when the panel is floating (gap enabled)
  • Contracted panel (not extended) and disabled gap should contract the panel background (currently only contracts content)
  • When the panel is contracted and gap is disabled, use 8px corner radius for the two corners not adjacent to the screen edge
  • Clicking from one applet to the next often doesn't work the first time requiring a second click

In the Figma file "Components" page, active applet icons use the accent color. I haven't seen this in prototypes but it's a cool idea. Is this possible with the work @mmstick has done recently for accent color in window headers?

Moving panel to opposite screen edge doesn't reset applets

Example for the App List:
When a panel containing the App List is moved to the opposite screen edge (e.g. bottom to top, left to right), the dots retain their original placement with respect to the app icons (e.g. the dots stay below the icon when the panel is moved to the top from the bottom).
This also causes the multiple window popup to partially overlap the panel.
Restarting the applet fixes this.

Initially wanted to create this in cosmic-applets for the App List, but I saw that other applet popups (e.g. the power menu) also overlap the panel in this state.

Activating and Deactivating the Dock can move the panel position

Initial settings:

Panel Active Top
Dock Active Bottom

To reproduce:

  • Set the panel position to Left
  • Deactivate dock and the panel moves to the top

I've also reproduced this way:

  • Dock deactivated
  • Set panel to the left (perhaps logout/login or restart)
  • Set panel to top
  • Activate dock and the panel moves to the left

Panel doesn't shrink when setting is disabled

I don't currently have access to my regular system, but on an old laptop (doesn't support Vulkan), disabling the extend to screen edges setting doesn't shrink the panel/dock.
The only visible change is seen if the panel isn't floating, and disabling the setting causes the corners away from the screen edge to be rounded.
I didn't originally want to create this issue because of the very old laptop, but I saw a post on Reddit that says that the panel doesn't shrink (COSMIC on Fedora 40).
The last time I tested on my regular system it worked, so I'm not sure if this still works there, or if it's related to hardware, or if it might be caused if COSMIC is installed (not upgraded) recently.

Unrelated but don't want to create a separate issue due to the very old hardware:
The app thumbnails on the minimize applet don't show up on this laptop (i.e. there's a larger app icon inside a square outline and the same smaller icon in the bottom right corner).

Panel and Dock Stacked and Corner Interaction Bugs

When stacked

General rule: panel always takes takes the screen edge unless the dock is extended and the panel contracted.

  • When both panel and dock are stacked and extended with gaps, dock takes the screen edge. Panel should take the screen edge.
  • Extend the dock. Don't extend the panel. Dock should take screen edge.
  • Automatically hide just the panel: can not reveal panel
  • Automatically hide just the dock: hard to reveal (should reveal pushing against screen edge)
  • Automatically hide both: only the dock reveals
  • Gaps panel on top/bottom/right/left, Extended dock next to the panel: Should be an 8px gap between the panel and dock (DOCK NOW TAKES screen edge in this case. Not certain if it should but it removes this bug.)

Corner layout interactions (when panels and dock meet in the corner)

  • Extended Panel w/ gaps / Extended Dock w/out gaps: Dock should take corner
  • Extend Panel w/gaps. / Extend Dock w/ gaps: Panel should take corner

A few adjustments for panel padding and applet button sizes.

  1. Currently, panel has a default padding of 2. In the designs, there is no padding around the icon buttons (applet buttons).

  2. The smallest applet button size in the designs is 16. So that means the sizes are as follows:

  • XS - 16px icon with 8px padding on each side
  • S - 16px icon with 12px padding
  • M - 32px icon with 12px padding
  • L - 40pz icon with 12px padding
  • XL - 56px icon with 12px padding

For comparison, some of the icon buttons with app icons have different padding and icon sizes in the design system. This is done to compensate for the visual difference between symbolic and hicolor icons while keeping the overall icon button size consistent.

  • XS - 16px icon with 8px padding on each side
  • S - 24px icon with 8px padding
  • M - 32px icon with 12px padding
  • L - 48pz icon with 8px padding
  • XL - 64px icon with 8px padding

For now, we can fix the sizes using symbolic icons since there was a separate change for the app icons.

Switch default order of CosmicPanelAppButton and CosmicAppletWorkspaces applets in panel

Currently, the Applications button is to the right of the Workspaces buttons in the panel. Because of this, opening additional workspaces causes the Applications button to be shifted toward the center of the screen.

I request that the Applications and Workspaces applets be switched so that the Applications button is in a constant position.

See https://en.wikipedia.org/wiki/Fitts's_law#Implications_for_UI_design

Feature: API for applet settings.

Changing settings can be done through comic-config. Displaying all settings in the applet is not practical.
You can launch a new application, which changes the settings, but this add extra boilerplate and is not unified like with Gnome extensions.

Panel configured as `All` only appears on first monitor

May be a known issue, but might as well have an issue. I believe this was working correctly at one point, but it doesn't seem to be functional now.

SpaceContainer::spawn_clients seems to be run when the PanelSpaces for the first monitor have been created, but before the ones for the second monitor exist. So it only calls PanelSpace::spawn_clients for the first monitor.

This will need to also work in a way that handles hotplug.

Center segment goes left when panel is extended

Caused by #128. The uneven padding on the left side is fixed, but the center segment now behaves like the start segment if the start segment is empty. The uneven padding (from an empty end segment) on the right is still there.

Also a top-anchored panel goes mostly off screen when Gap between panel and screen edges is enabled (or isn't drawn properly since when autohide is enabled it shows the same thin bottom part of the panel when the mouse is at the screen edge). Disabling Extend panel to screen edges makes the top-anchored panel not show up.

Edit: Probably unrelated

The panel on the left and right edge also seems to not be drawn properly when there's a non-extended non-autohiding dock that might intersect when maximized (though this might not be related to that PR).
screenshot-2024-03-16-20-59-25
This might have been there before. Not sure how that would be best handled to not have the panel cut off when not maximized. Maybe by mimicking part of the behavior when the panel is placed intersecting with an autohiding non-extended dock, then disabling autohide for that dock and then maximizing (i.e. the panel resizes to accommodate the extended dock, and extends back when the dock retracts(this second part doesn't happen at the moment)).

Only first panel applet rendering on Nvidia 1650 gaze15

After updating to the latest commit of cosmic-panel (and master staging builds of everything else), the segfault from #12 seems to be addressed, but I seem to see only the first applet in each panel being rendered. Popups open fine, and behavior is otherwise as expected.

Is something not working with creating multiple EGLSurfaces from the panel WlSurface? Not sure exactly how to debug this sort of behavior.

eDP-1_1662053040
eDP-1_1662053044
eDP-1_1662053047

Dock: Settings retention bugs

  • Some Gaps are removed when adjusting other settings like size and opacity
  • Customized/added dock applets disappear when adjusting some settings like position, gaps and extended dock. The config file has "None" in wings after changing a setting.
  • When the dock is in a non-default position (top/left/right), adding an applet moves it to the bottom

`cosmic-panel-config` has transitive dependency on smithay

cosmic-panel-config ends up pulling in smithay since that is a hard dependency of xdg-shell-wrapper, which cosmic-panel-config uses a few types from.

It would be good to avoid this if possible, if cosmic-panel-config is widely used in applets that have no need for smithay (trying to update it, I'm seeing complains about compiling smithay, which should be resolvable but seems unnecessary).

Autohide only if window needs the space

Enhancement

when auto hide activated the panel disappears from the screen only if an app takes the space. like when auto tiling activated and an app goes full screen.

`OnDemand` interactivity not working on Sway

Running cosmic-panel on Sway, to test if another issue is related to cosmic-comp, I noticed that once the panel started other windows no longer gained keyboard focus. I had to set both the panel and dock to keyboard_interactivity: None for other windows to be properly interactable.

I'm not sure exactly what the panel is doing wrong here, given this seems to be what on_demand interactivity is for. But it should be work, and I'm guessing the issue isn't in wlroots.

This may or may not also indicate that the layer-shell implementation in Smithay isn't correct. (Given the protocol allows some flexibility in implementation. So it needn't necessarily work exactly as in wlroots.)

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.