p-e-w / argos

Create GNOME Shell extensions in seconds
https://extensions.gnome.org/extension/1176/argos/
1.66k stars 112 forks source link

Incompatible with top bar organizer #155

Closed moritztim closed 4 months ago

moritztim commented 4 months ago

I couldn't find any relevant logs. This happened immediately after logging in. One of my 2 plugins is working, this one isn't:

$ cat ~/.config/argos/tltt_1_menu.sh
#!/bin/env bash
"$(dirname $0)/tl-time-tracker/tltt.sh" menu "󱎬 | font='Jetbrainsmono Nerd Font'"
moritztim commented 4 months ago

I logged out and back in and can't reproduce.

moritztim commented 4 months ago

I can reproduce again, it's been happening after the first refresh of this:

$ cat ~/.config/argos/tltt_1_menu.sh
#!/bin/bash
"$(dirname $0)/tl-time-tracker/tltt.sh" menu ""
$ cat ~/.config/argos/tl-time-tracker/
#!/bin/bash
response=$(curl -s "http://localhost:9999/$1")

if [ -z "$response" ]; then
    echo "$2"
    echo "---"
    echo "󰑐 Neu laden | refresh=true"
else
    echo "$response"
fi

The output looks something like this:

$ curl -s http://localhost:9999/menu
󱫠| font="JetBrainsMono Nerd Font" | trim=false | bash="true" | terminal=false
---
󰓛  Stop                    | font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | refresh=true | param1="http://localhost:9999/toggle"
󰑐  Neu Laden| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | refresh=true | param1="http://localhost:9999/refresh"
---
󰦒  Zeit bearbeiten| font="JetBrainsMono Nerd Font" | trim=false
--󰐕  5 Minuten| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=5"
--󰐕  15 Minuten| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=15"
--󰐕  1 Stunde| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=60"
--󰍴  5 Minuten| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=-5"
--󰍴  15 Minuten| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=-15"
--󰍴  1 Stunde| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | param1="http://localhost:9999/edit?minutes=-60"
---
---
󰏌  Website Öffnen| font="JetBrainsMono Nerd Font" | trim=false | href="https://example.com/"

When I click on "Neu Laden" the error happens.

moritztim commented 4 months ago
Feb 20 09:06:34 moritz gnome-shell[23345]: Extension argos@pew.worldwidemann.com: TypeError: appIndicator is undefined

Stack trace:
  #handleAppIndicatorItem@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extensionModules/BoxOrderManager.js:51:27
  addNewItemsToBoxOrder@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extensionModules/BoxOrderManager.js:232:60
  saveNewTopBarItems@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extensionModules/BoxOrderManager.js:258:30
  #handleNewItemsAndOrderTopBar@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extension.js:164:31
  handleNewItemsAndOrderTopBar@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extension.js:69:47
  #overwritePanelAddToPanelBox/Panel.Panel.prototype._addToPanelBox@file:///home/mtw/.local/share/gnome-shell/extensions/top-bar-organizer@julian.gse.jsts.xyz/extension.js:77:13
  addToStatusArea@resource:///org/gnome/shell/ui/panel.js:950:14
  addButtons@file:///home/mtw/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/extension.js:105:16
  enable@file:///home/mtw/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/extension.js:54:8
  _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:253:38
  async*_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:606:24
  _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:705:18
  createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:730:46
  enableExtension@resource:///org/gnome/shell/ui/extensionSystem.js:277:29
  EnableExtension@resource:///org/gnome/shell/ui/shellDBus.js:453:38
  _handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:329:38
  _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34
  @resource:///org/gnome/shell/ui/init.js:21:20

This time it happened immediately after enabling the extension.

moritztim commented 4 months ago

Now that I read the error message, I see this is an issue with top bar organizer.

moritztim commented 4 months ago

The problem seems to lie with top bar organizer more than with argos. https://gitlab.gnome.org/julianschacher/top-bar-organizer/-/issues/15

mwilck commented 4 months ago

Thanks for investigating yourself, appreciated.