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

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

Closed
haseebabid72 opened this issue Feb 20, 2024 · 10 comments
Closed

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

haseebabid72 opened this issue Feb 20, 2024 · 10 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@haseebabid72
Copy link

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

  • pyprland.toml
    [scratchpads.spotify] command="flatpak run com.spotify.Client" class= "spotify" process_tracking= "false" class_match= "true" animation= "fromRight" lazy= "true" unfocus= "hide"
  • hyprland.conf
    bind = $mainMod CTRL,s,exec,pypr toggle spotify $spotiify = ^(spotify)$ windowrule = size 75% 60%,$spotiify windowrule = move 50% -200%,$spotiify
@haseebabid72 haseebabid72 added the enhancement New feature or request label Feb 20, 2024
@haseebabid72 haseebabid72 changed the title [BUG] Flatpak apps not working as others are (scratchpads0 [BUG] Flatpak apps not working as others are (scratchpads) Feb 20, 2024
@fdev31
Copy link
Collaborator

fdev31 commented Feb 20, 2024

try with

process_tracking = false
class_match = true

process_tracking = "false" is considered true...

@fdev31 fdev31 removed the enhancement New feature or request label Feb 20, 2024
@haseebabid72
Copy link
Author

haseebabid72 commented Feb 21, 2024

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
Copy link
Collaborator

fdev31 commented Feb 21, 2024

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
Copy link
Author

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
Copy link
Collaborator

fdev31 commented Feb 21, 2024

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
Copy link
Collaborator

fdev31 commented Feb 21, 2024

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

fdev31 commented Feb 21, 2024

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

@fdev31
Copy link
Collaborator

fdev31 commented Feb 21, 2024

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

@fdev31 fdev31 added the invalid This doesn't seem right label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants