hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
348 stars 15 forks source link

[BUG] Flatpak apps not working as others are (scratchpads) #51

Closed haseebabid72 closed 6 months ago

haseebabid72 commented 7 months ago

Pyprland version 2.0 (latest)

Bug Unable to get flatpak apps to run as scratchpads properly. The app (in this case: Spotify) does launch but with the following errors:

  1. The command terminated normally. is it already running?
  2. Failed to show scratch "spotify" Also the app does not work as "Scratch", as the hide feature is not working here

Configuration

fdev31 commented 7 months ago

try with

process_tracking = false
class_match = true

process_tracking = "false" is considered true...

haseebabid72 commented 6 months ago

try with

process_tracking = false
class_match = true

process_tracking = "false" is considered true...

It did work (ig) but my windows aren't floating (thunar and spotify) Also the hide feature is still not working for spotify

fdev31 commented 6 months ago

can you show the full pypr log and also verify those flatpak's apps class ? (output of hyprctl -j clients).

Also provide your full pyprland.toml, you mention things you didn't share...

haseebabid72 commented 6 months ago

hyprctl -j clients

[{
    "address": "0x55b7efd5d670",
    "mapped": false,
    "hidden": false,
    "at": [0, 0],
    "size": [0, 0],
    "workspace": {
        "id": -1,
        "name": ""
    },
    "floating": false,
    "monitor": -1,
    "class": "",
    "title": "",
    "initialClass": "",
    "initialTitle": "",
    "pid": -1,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": -1
},{
    "address": "0x55b7efd6bb40",
    "mapped": true,
    "hidden": false,
    "at": [10, 42],
    "size": [1420, 848],
    "workspace": {
        "id": 2,
        "name": "2"
    },
    "floating": false,
    "monitor": 0,
    "class": "firefox",
    "title": "[BUG] Flatpak apps not working as others are (scratchpads) · Issue #51 · hyprland-community/pyprland — Mozilla Firefox",
    "initialClass": "firefox",
    "initialTitle": "Mozilla Firefox",
    "pid": 3713,
    "xwayland": false,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": 2
},{
    "address": "0x55b7efeae010",
    "mapped": false,
    "hidden": false,
    "at": [0, 0],
    "size": [0, 0],
    "workspace": {
        "id": -1,
        "name": ""
    },
    "floating": false,
    "monitor": -1,
    "class": "",
    "title": "",
    "initialClass": "",
    "initialTitle": "",
    "pid": -1,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": -1
},{
    "address": "0x55b7efeb8440",
    "mapped": false,
    "hidden": false,
    "at": [0, 0],
    "size": [0, 0],
    "workspace": {
        "id": -1,
        "name": ""
    },
    "floating": false,
    "monitor": -1,
    "class": "",
    "title": "",
    "initialClass": "",
    "initialTitle": "",
    "pid": -1,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": -1
},{
    "address": "0x55b7efeb9d20",
    "mapped": false,
    "hidden": false,
    "at": [0, 0],
    "size": [0, 0],
    "workspace": {
        "id": -1,
        "name": ""
    },
    "floating": false,
    "monitor": -1,
    "class": "",
    "title": "",
    "initialClass": "",
    "initialTitle": "",
    "pid": -1,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": -1
},{
    "address": "0x55b7efebbbf0",
    "mapped": true,
    "hidden": false,
    "at": [10, 42],
    "size": [1420, 848],
    "workspace": {
        "id": 3,
        "name": "3"
    },
    "floating": false,
    "monitor": 0,
    "class": "Spotify",
    "title": "Spotify Free",
    "initialClass": "Spotify",
    "initialTitle": "Spotify",
    "pid": 5013,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": 1
},{
    "address": "0x55b7efebd4d0",
    "mapped": false,
    "hidden": false,
    "at": [0, 0],
    "size": [0, 0],
    "workspace": {
        "id": -1,
        "name": ""
    },
    "floating": false,
    "monitor": -1,
    "class": "",
    "title": "",
    "initialClass": "",
    "initialTitle": "",
    "pid": -1,
    "xwayland": true,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": -1
},{
    "address": "0x55b7efeb4080",
    "mapped": true,
    "hidden": false,
    "at": [10, 42],
    "size": [704, 848],
    "workspace": {
        "id": -97,
        "name": "special:scratch_thunar"
    },
    "floating": false,
    "monitor": 0,
    "class": "thunar",
    "title": "activator - Thunar",
    "initialClass": "thunar",
    "initialTitle": "activator - Thunar",
    "pid": 5033,
    "xwayland": false,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": 3
},{
    "address": "0x55b7eed9ea00",
    "mapped": true,
    "hidden": false,
    "at": [324, 480],
    "size": [792, 360],
    "workspace": {
        "id": 3,
        "name": "3"
    },
    "floating": true,
    "monitor": 0,
    "class": "kitty-dropterm",
    "title": "hyprctl -j clients",
    "initialClass": "kitty-dropterm",
    "initialTitle": "Alacritty",
    "pid": 4018,
    "xwayland": false,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x0",
    "focusHistoryID": 0
}]

PyprLog

pypr --debug /tmp/pypr.log
                      ipc - Logger "ipc" initialized // common.py:78
                  startup - Logger "startup" initialized // common.py:78
                      ipc - notify 3 10000 rgb(ff1010)  Trying to run pypr more than once ? // ipc.py:94
                  startup - /tmp/hypr/84ab8d11e8951a6551d1e1bf87796a8589da6d47_1708528277/.pyprland.sock exists,
is pypr already running ?
If that's not the case, delete this file and run again. // command.py:380

Pypr toml

[pyprland]
    plugins = [
      "scratchpads"
]

[scratchpads.term]
command= "alacritty --class kitty-dropterm"
animation= "fromBottom"
unfocus= "hide"

[scratchpads.thunar]
command= "thunar --class tunaar"
animation= "fromTop"
class= "tunaar"
unfocus= "hide"

[scratchpads.btop]
command= "kitty --class btop -e btop"
animation= "fromLeft"
lazy= "true"
unfocus= "hide"

[scratchpads.spotify]
command="flatpak run com.spotify.Client"
class= "spotify"
process_tracking= false
class_match= true
animation= "fromRight"
lazy= "true"
unfocus= "hide"
fdev31 commented 6 months ago

try: class= "Spotify" instead of class= "spotify"

You may have a second read at your configuration, I see a few typos (eg: double letters)... in general, if values aren't exact, it will not work, some seem to be "on purpose" but still worth having a look ;)

fdev31 commented 6 months ago

Also to send the log, you need to send the file /tmp/pypr.log, here you just show a failed run of the daemon...

haseebabid72 commented 6 months ago

Also to send the log, you need to send the file /tmp/pypr.log, here you just show a failed run of the daemon...

pypr.log

haseebabid72 commented 6 months ago

try: class= "Spotify" instead of class= "spotify"

You may have a second read at your configuration, I see a few typos (eg: double letters)... in general, if values aren't exact, it will not work, some seem to be "on purpose" but still worth having a look ;)

Spotify worked. And so did Thunar. Can you tell how it worked?

fdev31 commented 6 months ago

Yes, the real class needs to "perfectly" match the "class" option in Hyprland.

fdev31 commented 6 months ago

For Thunar you had the same typo in two places, so it matched :)