Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for gnome 45 #339

Closed
diegomartarelo opened this issue Aug 31, 2023 · 41 comments · Fixed by #345
Closed

Support for gnome 45 #339

diegomartarelo opened this issue Aug 31, 2023 · 41 comments · Fixed by #345

Comments

@diegomartarelo
Copy link

Support for Gnome 45

@alephnull
Copy link

If you are interested in disabling the titlebars, you can,

  1. copy the CSS from unite@hardpixel.eu/styles/gtk{3,4}/buttons-right/both.css to ~/.local/gtk-3.0/gtk.css
  2. logout
  3. login

@Spinnekop
Copy link

Tried the above - didn't work for me...

@Svin-kun
Copy link

Svin-kun commented Sep 24, 2023

Tried the above - didn't work for me...

File both.css refers to maximized.css and tiled.css.
So, I took unite@hardpixel.eu/styles/gtk4/buttons-right/maximized.css and paste contents to ~/.local/gtk-4.0/gtk.css , 'cause GNOME Shell now uses GTK 4. Works as it must. GNOME 45.0 on Ubuntu 23.10.

UPD. Made a script, but removing titlebar of tiled windows not working.
remove-titlebar-gnome45-user.zip

@jonian jonian mentioned this issue Oct 1, 2023
@AlwynBarry
Copy link

Just to say that the comments above re. CSS don't really address the range of needs for support for Gnome 45.

There are various changes regarding the inclusion of modules which are covered here: https://gjs.guide/extensions/upgrading/gnome-shell-45.html#extensionutils

Of course, there will also be changes to reinstate the use of the topbar for maximised windows and various window info for non-maximised windows. I notice that the 'Window Title is Back' extension does one of these tasks, though it would be amazing if Unite did this for us (better to have one extension we rely on than many).

Thank you for all the amazing work on this extension!

@rsramkis
Copy link

Arch \ EndeavourOS just got Gnome 45 released to stable this morning. @jonian Please let us know how we might be able to help test and support your team. I am available as a tester.

@jonian
Copy link
Member

jonian commented Oct 10, 2023

Hey @rsramkis, thanks for offering to help. I'm on arch too and got the update. I will try to work on it on the weekend. Very busy with work unfortunately.

@jonian
Copy link
Member

jonian commented Oct 10, 2023

For anyone on arch that updated to gnome 45, disable unite before restart or logout because decorations on CSD apps will be hidden. If you already restarted without disabling unite, you must remove the css injected by the extension in the files below:

~/.config/gtk-3.0/gtk.css
~/.config/gtk-4.0/gtk.css

@rsramkis
Copy link

Hey @rsramkis, thanks for offering to help. I'm on arch too and got the update. I will try to work on it on the weekend. Very busy with work unfortunately.

I would not rush. Think we have all gone through Gnomes changes the past couple of years breaking the extensions. Suspect in the next 1 to 3 months there will be hot fixes from them as things are found. There seems to be significant changes to the extension development kit. So people should expect a couple months while we see how things evolve.

@rsramkis
Copy link

rsramkis commented Oct 10, 2023

~/.config/gtk-3.0/gtk.css
~/.config/gtk-4.0/gtk.css

So are you saying I should remove the configuration lines added by Unite:

File: ~/.config/gtk-3.0/gtk.css

Remove the contents tagged with in the "/* UNITE":

Therefore the following 3 lines will be removed:

/* UNITE windowDecorations */
@import url('/usr/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/maximized.css');
/* windowDecorations UNITE */

And keep "@import 'colors.css';"

And remove the following:

File: ~/.config/gtk-4.0/gtk.css

/* UNITE windowDecorations */
@import url('/usr/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk4/buttons-right/maximized.css');
/* windowDecorations UNITE */

@Tealk
Copy link

Tealk commented Oct 10, 2023

The error message with Gnome 45

The settings of extension unite@hardpixel.eu had an error:

SyntaxError: import declarations may only appear at top level of a module

Stack trace:

@file:///home/tealk/.local/share/gnome-shell/extensions/unite@hardpixel.eu/prefs.js:4:21
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

@jonian jonian pinned this issue Oct 14, 2023
@jonian
Copy link
Member

jonian commented Oct 14, 2023

There is now an GNOME 45 branch that is WIP. I have tested only the default settings. What does not work:

  1. Appmenu, has been removed from gnome, a custom appmenu will be created
  2. Titlebar actions on top panel click (left, right, middle)

If anyone wants to install the gnome 45 branch and report issues, that would be helpful.

@freddyw
Copy link

freddyw commented Oct 14, 2023

Installed the Gnome 45 branch, no issues thus far. Will report if anything comes up. Thanks for all the work you put in to this!

@rsramkis
Copy link

There is now an GNOME 45 branch that is WIP. I have tested only the default settings. What does not work:

1. Appmenu, has been removed from gnome, a custom appmenu will be created

2. Titlebar actions on top panel click (left, right, middle)

If anyone wants to install the gnome 45 branch and report issues, that would be helpful.

When we are making changes to the settings of the extension ... do only these 2 files get modified:

~/.config/gtk-3.0/gtk.css
~/.config/gtk-4.0/gtk.css

This will help me figure out if the setting files are being updated correctly.

@rsramkis
Copy link

@jonian

One of the items I can't seem to get to work is to see the application title bar in the top bar. Usually I maximize the application, and when the application is in focus the title shows in the top bar.

The tested applications:

  • Firefox
  • Cider (flatpak)
  • Gnome Text Editor (native Gnome app v45)
  • Signal (Arch repository app)

These are my settings:

image

image

Firefox Example:

image

Tests that have passed:

  1. Confirmed Extend top bar left box shifts time\date from center to the right before the system tray icons (network, volume control, battery life).

  2. Confirmed Extend top bar left box can be toggled on and off and title bar re-draws correctly.

  3. Confirmed when Steam runtime launches that Steam icon is show in system tray of the top bar.

  4. Confirm when "Show system tray in top bar" is toggled that Steam icon will appear and then disappear from the left of the native system tray icons.

  5. Confirmed the "Show windows button in top menu" when maximized.

  6. Confirmed the "Show windows button in top menu" always for the in focus program..

  7. Confirmed the Top Bar Windows button change based on the theme chosen (Awaita, Breeze, Dracula and Qogir tested).

  8. Confirmed the "Top bar windows button position is placed (left and right).

  9. Confirmed "Hide Activities button" always works when applications in windows or maximized.

@jonian
Copy link
Member

jonian commented Oct 14, 2023

@rsramkis As I said in my initial post appmenu is not working (not ready yet, gnome removed it), that's why you can't see the application title bar in the top bar.

@jonian
Copy link
Member

jonian commented Oct 15, 2023

Appmenu has been added in gnome45 branch. The extensions needs some minor tweaks. The titlebar actions feature still not working.

@jonian
Copy link
Member

jonian commented Oct 15, 2023

Version 73 that supports only GNOME 45 is available for download in the releases page. Make sure to watch the repository for new releases if you want to get updates for new versions. I will not publish this or any other extension on gnome extensions website any more.

@rsramkis
Copy link

Thanks for your hard work (and on your weekend of all things). Having the title of the application in the top bar and all the tuning in the extension really kept me holding onto Gnome. I don't quite get whey Gnome does not just make these features native to the desktop instead of all the extension development.

I'm going to just patiently wait (watch the Unite releases) page before I re-deploy the extension. I've really just shut off all my extensions living in vanilla land till December when I may turn things back on.

@7system7
Copy link

@jonian

I will not publish this or any other extension on gnome extensions website any more.

Can we know, why? I am just curious. It is not a problem to follow the releases here too. (Or I will download from AUR.) 🙂

@jonian
Copy link
Member

jonian commented Oct 16, 2023

@7system7 I looks like the review process has changed from checking if an extension does anything malicious and it works in general to the reviewers asking for changes that are personal opinions on how an extension should be coded. I'm not willing to do any changes, in this or the other extensions I maintain, just to satisfy the review process.

I also maintain the AUR package, so anyone that uses arch or arch-based distros will get the updates as soon as they are released.

@7system7
Copy link

I can absolutely understand your opinion. Thank you for your work!

@HeroBrine1st
Copy link

HeroBrine1st commented Oct 16, 2023

I don't want to create separate issues (but I can create if needed), just one question and one minor bug (both are regressions, I guess).

First, on GNOME 44 version there was an icon of application near its title:
image
On version 73 of this extension there's no icon (and no space for icon too). Is it intentional?
I don't see this icon in readme.md but I see it in other issues on this repo (for gnome <45 ofc). I can't show gnome 45 screenshot because I reverted back to gnome 44 until 45 is stable. For the same reason I can't test version 74, though I see that changes are purely internal (from this commit) and there won't be any change.

Second, "Top bar window buttons" are hidden when any menu on top bar is opened (be it notification menu, win+S, etc). On gnome 44 I see that focus is lost on those actions, but buttons aren't hidden, they stay in place. In combination with clipboard menu extension this behavior is very annoying: you click and nothing happens, because button moved right.

Also, I use AUR package of this extension.


UPD: now that I created an issue I look stupid and want to say why didn't I create an issue. It is simple: I was afraid that they are a known issue (both icon and buttons) and migration was still going, but I completely forgot that wayland is mainstream now.

@jonian
Copy link
Member

jonian commented Oct 16, 2023

@HeroBrine1st, it is better to open new issues about these.

First, on GNOME 44 version there was an icon of application near its title:

That is the appmenu that was part of gnome until 44. Now removed from gnome 45.
I implemented a minimal custom appmenu only to support unite settings for window title.

Second, "Top bar window buttons" are hidden when any menu on top bar is opened (be it notification menu, win+S, etc)

This looks like a regression, open a separate issue for it. (I can't replicate it)

@ysolis
Copy link

ysolis commented Oct 16, 2023

@7system7 I looks like the review process has changed from checking if an extension does anything malicious and it works in general to the reviewers asking for changes that are personal opinions on how an extension should be coded. I'm not willing to do any changes, in this or the other extensions I maintain, just to satisfy the review process.

I also maintain the AUR package, so anyone that uses arch or arch-based distros will get the updates as soon as they are released.

please update the README.md file to update the install process, the mention to use gnome extensions for gnome shell version up to gnome 44, and to install from the github repository for Gnome 45 and newer versions, and specific ones for Linux distros (Debian, Ubuntu, Archlinux ...)

@7system7
Copy link

Here would be good too, if it is possible w/o the review process. (I saw the comment, but it can be disappeared later.)

image

@jonian
Copy link
Member

jonian commented Oct 17, 2023

@HeroBrine1st I added support for application icon and busy loader in appmenu, no need to open an issue.

@7system7 and @ysolis I will update the installation instructions and add a message in the gnome extensions website (no review needed). I was thinking of using OBS to provide repositories for multiple distros. If anyone has experience with OBS that would be really helpful.

@ismasou
Copy link

ismasou commented Oct 23, 2023

Is it possible to get the new activity indicator working with Unite?
If I turn on Activities, it only shows the text.

@jonian
Copy link
Member

jonian commented Oct 23, 2023

Hi @ismasou, there is a new setting in "appearance" tab called "Use text in activities button"

@ismasou
Copy link

ismasou commented Oct 23, 2023

@jonian Sorry I didn't see that, thanks for the info.

@945fc41467
Copy link

Hello,

I just updated the extension from AUR under Manjaro. I still have the following error :

The settings of extension unite@hardpixel.eu had an error:

SyntaxError: import declarations may only appear at top level of a module

Stack trace:
_init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:23:33
ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:10:4
OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:124:33
async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35
_wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34
run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:186:20
main@resource:///org/gnome/Shell/Extensions/js/main.js:22:13
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
start@resource:///org/gnome/gjs/modules/script/package.js:190:8
@/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

@jonian
Copy link
Member

jonian commented Oct 25, 2023

Hi @945fc41467, it looks like it still loads the old version. Did you logout after the extension update? What is the unite version in the extensions application?

@945fc41467
Copy link

Hi,
I log out/log in after update, but I didn’t reboot. Isn’t enough ?

The version displayed is 77.

@jonian
Copy link
Member

jonian commented Oct 25, 2023

Logout should be enough. The version is correct, 77 is the latest. Maybe try reboot, I don't know what is the issue.

@945fc41467
Copy link

945fc41467 commented Oct 25, 2023

Rebooting didn’t make the job. How can I provide more information ?

EDIT : I just checked : the version of Gnome is 44.5 and not 45. Can this be the cause of the problem ? Maybe the extension indicate it is compatible with 44 or 45, but not 44.5 ? It’s just an idea.

@jonian
Copy link
Member

jonian commented Oct 25, 2023

That is a manjaro issue, not an issue with the extension. You might get better help if you ask in the manjaro forums.

@945fc41467
Copy link

I will ask. Thank you very much.

@jonian
Copy link
Member

jonian commented Oct 25, 2023

@945fc41467 what is the output of:

cat /usr/share/gnome-shell/extensions/unite@hardpixel.eu/prefs.js

and

ls ~/.local/share/gnome-shell/extensions

@945fc41467
Copy link

import Adw from 'gi://Adw'
import GLib from 'gi://GLib'
import GObject from 'gi://GObject'
import Gtk from 'gi://Gtk'
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'
import * as Theme from './theme.js'
import * as Convenience from './convenience.js'

const PrefsWidget = GObject.registerClass(
  class UnitePrefsWidget extends Gtk.Box {
    _init(params) {
      super._init(params)

      this._settings  = Convenience.getSettings()
      this._buildable = new Gtk.Builder()
      this._themes    = new Theme.WindowControlsThemes()

      this._loadTemplate()
      this._loadThemes()

      this._bindStrings()
      this._bindSelects()
      this._bindBooleans()
      this._bindEnumerations()
      this._bindIntegers()
    }

    _loadTemplate() {
      const template = GLib.build_filenamev([Convenience.getPath(), 'settings.ui'])
      this._buildable.add_from_file(template)

      this._container = this._getWidget('prefs_widget')
      this.append(this._container)
    }

    _loadThemes() {
      const widget = this._getWidget('window-buttons-theme')
      const themes = this._themes.available.sort((a, b) => {
        return a.uuid < b.uuid ? -1 : a.uuid > b.uuid ? 1 : 0
      })

      themes.forEach(theme => {
        if (theme.uuid !== 'default') {
          widget.append(theme.uuid, theme.name)
        }
      })
    }

    _getWidget(name) {
      let widgetName = name.replace(/-/g, '_')
      return this._buildable.get_object(widgetName)
    }

    _bindInput(setting, prop) {
      let widget = this._getWidget(setting)
      this._settings.bind(setting, widget, prop, this._settings.DEFAULT_BINDING)
    }

    _bindEnum(setting) {
      let widget = this._getWidget(setting)
      widget.set_active(this._settings.get_enum(setting))

      widget.connect('changed', combobox => {
        this._settings.set_enum(setting, combobox.get_active())
      })
    }

    _bindStrings() {
      let settings = this._settings.getTypeSettings('string')
      settings.forEach(setting => this._bindInput(setting, 'text'))
    }

    _bindSelects() {
      let settings = this._settings.getTypeSettings('select')
      settings.forEach(setting => this._bindInput(setting, 'active-id'))
    }

    _bindBooleans() {
      let settings = this._settings.getTypeSettings('boolean')
      settings.forEach(setting => this._bindInput(setting, 'active'))
    }

    _bindEnumerations() {
      let settings = this._settings.getTypeSettings('enum')
      settings.forEach(setting => this._bindEnum(setting))
    }

    _bindIntegers() {
      let settings = this._settings.getTypeSettings('int')
      settings.forEach(setting => this._bindInput(setting, 'value'))
    }
  }
)

export default class UnitePreferences extends ExtensionPreferences {
  fillPreferencesWindow(window) {
    const pages  = [
      { name: 'general', icon: 'emblem-system-symbolic' },
      { name: 'appearance', icon: 'emblem-photos-symbolic' }
    ]

    const widget = new PrefsWidget()

    pages.forEach(({ name, icon }) => {
      const page  = Adw.PreferencesPage.new()
      const group = Adw.PreferencesGroup.new()

      const label = widget._getWidget(`${name}_label`)
      const prefs = widget._getWidget(`${name}_prefs`)

      page.set_name(name)
      page.set_title(label.get_text())
      page.set_icon_name(icon)

      prefs.unparent()
      group.add(prefs)

      page.add(group)
      window.add(page)
    })

    window.set_default_size(620, 665)
    widget.unrealize()
  }
}

and

appindicatorsupport@rgcjonas.gmail.com
blur-my-shell@aunetx
caffeine@patapon.info
clipboard-indicator@tudmotu.com
date-menu-formatter@marcinjakubowski.github.com
desktop-cube@schneegans.github.com
hibernate-status@dromi
io.github.mreditor.gnome-shell-extensions.scroll-panel
lockkeys@vaina.lt
nightthemeswitcher@romainvigier.fr
panel-corners@aunetx
system-monitor-next@paradoxxx.zero.gmail.com
tactile@lundal.io
task-widget@juozasmiskinis.gitlab.io
transparent-top-bar@ftpix.com

@jonian
Copy link
Member

jonian commented Oct 26, 2023

@945fc41467 those look fine, you are using the gnome 45 compatible version. Are you sure you are on gnome 45?

It looks that manjaro is still on gnome 44.5 from what I can see here. If you are not on gnome 45, you should downgrade unite to v72

@945fc41467
Copy link

945fc41467 commented Oct 28, 2023

Hi, @jonian. As I said above : yes, it is 44.5. I first though it is Gnome 45, because I updated Gnome one week ago and it broke the extension. So, I though it was linked with this ticket. Did the maintainers skip the version 44.5 or something like that ?

I hope it will be solved when Manjaro will update Gnome.

@real-or-random
Copy link

@7system7 I looks like the review process has changed from checking if an extension does anything malicious and it works in general to the reviewers asking for changes that are personal opinions on how an extension should be coded. I'm not willing to do any changes, in this or the other extensions I maintain, just to satisfy the review process.

That's a concerning development. The popular argos extension had similar bad experiences with the review process... p-e-w/argos#108 (comment)

Are you willing to say a bit more about your experiences? If yes, I'll be volunteering to raise awareness to these issues somewhere in the GNOME community. (I still need to figure out what is the most promising place to complain about this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.