jstkdng / ueberzugpp

Drop in replacement for ueberzug written in C++
GNU General Public License v3.0
854 stars 29 forks source link

feat: Hyprland support #52

Closed rukh-debug closed 1 year ago

rukh-debug commented 1 year ago

ueberzugpp 2.8.5 alacritty 0.12.1 (5fdfd47f) Wayland (if that matters)

20230528_05h39m59s_grim

Please let me know if this is not an issue related to ueberzugpp.

jstkdng commented 1 year ago

hi, is there a variable called SWAYSOCK? or does it have another name

rukh-debug commented 1 year ago

Are you referring to environment variables? If so, I dont have any env variable by that name.

rukh-debug commented 1 year ago

support for wayland (sway only) and MacOS tmux support on X11 and Sway GIF and animated WEBP support on X11, Sixel and Sway

I tested on hyprland when I reported this issue. I was unaware of the Desktop Environment thing mentioned. Just now i tested on sway aswell, but the result were same. So i think DE does not matter much.

jstkdng commented 1 year ago

Which file manager are you using?

rukh-debug commented 1 year ago

it's ranger.

jstkdng commented 1 year ago

Can you test lf using the integration script here? https://github.com/jstkdng/ueberzugpp/tree/master/scripts/lf

rukh-debug commented 1 year ago
rukh@  √ temp bat 1.jpg | ./preview
stat: cannot statx '': No such file or directory
error: a value is required for '[FILE]...' but none was supplied

For more information, try '--help'.
rukh@  √ temp ls
 1.jpg   cleaner   ifub   preview   s
rukh@  √ temp ./preview 1.jpg
The following arguments were not expected: 1.jpg add
Run with --help for more information.
rukh@  ?1 temp

I dont understand what am I supposed to do.

jstkdng commented 1 year ago

hmmmm, have you used lf before? if not lets just stay on ranger.

What is the output of /tmp/ueberzugpp-rukh.log?

rukh-debug commented 1 year ago

Never used, just installed, don't even know how it works.

Sending you the latest log of a single image test.

 _    _      _
| |  | |    | |                                _     _
| |  | | ___| |__   ___ _ __ _____   _  __ _ _| |_ _| |_
| |  | |/ _ \ '_ \ / _ \ '__|_  / | | |/ _` |_   _|_   _|
| |__| |  __/ |_) |  __/ |   / /| |_| | (_| | |_|   |_|
 \____/ \___|_.__/ \___|_|  /___|\__,_|\__, |
                                        __/ |
                                       |___/     v2.8.5
[2023-05-28 07:09:24.466] [terminal] [info] TERM="tmux-256color", TERM_PROGRAM="tmux"
[2023-05-28 07:09:24.491] [main] [info] Wayland detected, X11 output will not be used unless forced to
[2023-05-28 07:09:24.491] [chafa] [info] Canvas created
[2023-05-28 07:09:24.491] [chafa] [warning] This canvas is meant to be used as a last resort. Please use the X11 output or switch to a terminal that has kitty, sixel or iterm2 support.
[2023-05-28 07:09:24.542] [main] [info] Listening for commands on socket /tmp/ueberzugpp-250564.socket.
[2023-05-28 07:09:24.575] [main] [info] Command received: {"action":"add","identifier":"preview","max_height":63,"max_width":137,"path":"/home/rukh/temp/1.jpg","x":134,"y":1}
[2023-05-28 07:09:24.600] [opencv] [info] Loading image /home/rukh/temp/1.jpg
[2023-05-28 07:09:26.217] [main] [error] SIGTERM received, exiting.
[2023-05-28 07:09:26.247] [main] [info] Exiting ueberzugpp.
jstkdng commented 1 year ago

Is there no variable called SWAYSOCK in your sway setup? if not sway won't work.

rukh-debug commented 1 year ago
rukh@  √ temp echo $SWAYSOCK

rukh@  √ temp neofetch
                   -`                    rukh@archlinux
                  .o+`                   --------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: Inspiron 5575 1.3.3
               `+oooooo:                 Kernel: 6.1.30-1-lts
               -+oooooo+:                Uptime: 13 hours, 7 mins
             `/:-:++oooo+:               Packages: 1307 (pacman)
            `/++++/+++++++:              Shell: zsh 5.9
           `/++++++++++++++:             Resolution: 1920x1080
          `/+++ooooooooooooo/`           DE: Hyprland
         ./ooosssso++osssssso+`          WM: sway
        .oossssso-````/ossssss+`         Theme: Gruvbox-Material-Dark [GTK2/3]
       -osssssso.      :ssssssso.        Icons: oomox-gruvbox-dark [GTK2], gruvbox-dark-icons-gtk [GTK3]
      :osssssss/        osssso+++.       Terminal: tmux
     /ossssssss/        +ssssooo/-       CPU: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx (8) @ 2.000GHz
   `/ossssso+/:-        -:/+osssso+-     GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
  `+sso+:-`                 `.-/+oso:    Memory: 3303MiB / 7583MiB
 `++:.                           `-/+/
 .`                                 `/

rukh@  √ temp

There is no SWAYSOCK in my sway setup.

jstkdng commented 1 year ago

but it says you are running hyprland, not sway

rukh-debug commented 1 year ago

https://old.reddit.com/r/hyprland/comments/12gm2ds/why_does_hyprland_show_up_as_a_de_instead_of_a_wm/

Idk its an issue with neofetch it seems. I just realized myself. But i am currently inside swaywm

jstkdng commented 1 year ago

what does this return? echo $HYPRLAND_INSTANCE_SIGNATURE

rukh-debug commented 1 year ago

rukh@ ?1 ~ echo $HYPRLAND_INSTANCE_SIGNATURE a2bb95fc60c717c873eff273f5ee035e622565d0_1685193909

jstkdng commented 1 year ago

then that means you are running hyprland, not sway. Hyprland support will be tricky to achieve, if possible.

rukh-debug commented 1 year ago

Looks like exiting the session and chaning the WM still keeps the env variables. That's why there was HYPRLAND_INSTANCE_SIGNATURE and no SWAYSOCK, after a restart without opening hyprland, directly opening sway fixed the issue. It a hyprland issue. Thanks for your effort. Sorry for you time.

jstkdng commented 1 year ago

hyprland support should be working on master now, you need to add the -DENABLE_WLROOTS=ON flag now though. Still not sure if I should disable animations though.

rukh-debug commented 1 year ago

Will there be any issue by making like this, if we detect hyprland we automatically set this flag?

jstkdng commented 1 year ago

that flag is only set on compilation, on runtime it will try to detect sway or hyprland

jstkdng commented 1 year ago

I've added general support for wayland, but wm specific changes will be required. Closing as this is now on master.