flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
23.95k stars 1.52k forks source link

Hyprland Wayland Copy to Clipboard doesn't work #3529

Open enk-it opened 3 months ago

enk-it commented 3 months ago

Flameshot Version

Flameshot v12.1.0 (3d21e496)

Installation Type

User repository (AUR)

Operating System type and version

ArcoLinux

Description

I use Hyprland and copy to clipboard works only if i'm currently focused on some application. For example i have 3 applications opened: yandex-browser-stable, discord and xfce4-terminal. If i'm focused on discord, i can take screenshot and copy it to CB (i can take any region by the way not only discord), but if i'm, focused on yandex or terminal i'm unable to copy screenshot to CB. Saving screenshot in file works fine in any scenarios. I start flameshot this way: flameshot gui When focused on gnome-calculator or Insomnia Flameshot behaves fine. focused on Galculator doesn't copy as well

Steps to reproduce

1) Focus on xfce4-terminal 2) start flameshot with flameshot gui 3) press ctrl+c or double click on region (if activated option in settings)

Screenshots or screen recordings

No response

System Information

System: Host: silencer-a320mh Kernel: 6.7.9-arch1-1 arch: x86_64 bits: 64 Desktop: Hyprland v: 0.36.0-77-g717d5b3c Distro: ArcoLinux Graphics: Device-1: NVIDIA TU117 [GeForce GTX 1650] driver: nvidia v: 550.54.14 Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4 compositor: Hyprland v: 0.36.0-77-g717d5b3c driver: X: loaded: nvidia unloaded: modesetting gpu: nvidia,nvidia-nvswitch resolution: 1920x1080~144Hz API: EGL Message: EGL data requires eglinfo. Check --recommends.

MrMasrozYTLIVE commented 3 months ago

Can confirm on:

User repository (AUR) - flameshot-git ArchLinux 6.8.1-arch1-1 Hypr (Hyprland 0.35.0-2)

U.P.D. Same happens on Hyprland 0.37.1-1

gwstorm commented 3 months ago

fwiw, I was cruising through here for a different issue and figured I'd mention that I can't duplicate this one.

hyprland 37.1 flameshot-git arch 6.8.1

MrMasrozYTLIVE commented 3 months ago

fwiw, I was cruising through here for a different issue and figured I'd mention that I can't duplicate this one.

hyprland 37.1 flameshot-git arch 6.8.1

Got an update. I cant replicate it neither now

enk-it commented 3 months ago

Looks like it was fixed somehow. Thanks everybody!

enk-it commented 3 months ago

Guys i've reinstalled flameshot and it started working fine, but then i rebooted and it works the same way as it was before! I thing that problem is on my side/ Can anyone help?

tinmarr commented 3 months ago

Can confirm it's back (wasn't there about a week ago). Reinstall fixes nothing

yay -Qii flameshot
Name            : flameshot-git
Version         : r1944.f2884330-1
Description     : Powerful yet simple to use screenshot software
Architecture    : x86_64
URL             : https://github.com/flameshot-org/flameshot
Licenses        : GPL
Groups          : None
Provides        : flameshot
Depends On      : qt5-base  hicolor-icon-theme  qt5-svg  kguiaddons5
Optional Deps   : xdg-desktop-portal: To make Sway, Hyprland, and wlroots work [installed]
                  xdg-desktop-portal-wlr: To make Sway, Hyprland, and wlroots work
                  [installed]
                  grim: To make Sway, Hyprland, and wlroots work [installed]
                  xdg-desktop-portal-kde: For KDE Plasma
Required By     : None
Optional For    : None
Conflicts With  : flameshot
Replaces        : None
Installed Size  : 2.78 MiB
Packager        : Unknown Packager
Build Date      : Wed 03 Apr 2024 03:19:33 PM EDT
Install Date    : Wed 03 Apr 2024 03:21:47 PM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None
Backup Files    : None
Extended Data   : pkgtype=pkg

arch 6.8.2 Hyprland 0.38.0

untainsYD commented 2 months ago

Have the same issue, it has recently stopped working.

More details here.

enk-it commented 2 months ago

guys if you are using wl-copy, i can suggest using a little bash script.

!/usr/bin/env bash

screen_shot_result=$(flameshot gui 2>&1 >/dev/null | grep -o 'aborted')

if [ "$screen_shot_result" = "aborted" ]; then echo 'error screenshot stopped' else ls_result=$(ls -t ~/flame_screenshots | head -1) cat ~/flame_screenshots/$ls_result | wl-copy fi

exit 0

It runs flameshot in gui mode and after saving screenshot to folder ~/flame_screenshots/ copies the last image to CB. Im not quite familiar with bash scripting but it works for me. For better usability you can bind flameshot to save picture with ctrl+c instead of ctrl+s. Also you need to configure your flameshot to save pictures at ~/flame_screenshots/

insunaa commented 1 month ago

Check your systemd logs. For me this issue was caused because I had no notifications daemon running (despite having Notifications disabled in Flameshot :unamused: ) After I installed dunst and ran it as a systemd user service flameshot reliably worked to copy into clipboard.

Elektroplayer commented 1 month ago

Can confirm.

I installed mako, but screenshots are still not copied to the clipboard

Название             : flameshot-git
Версия               : r1947.5f30631a-1
Описание             : Powerful yet simple to use screenshot software
Архитектура          : x86_64
URL                  : https://github.com/flameshot-org/flameshot
Лицензии             : GPL
Группы               : Нет
Предоставляет        : flameshot
Зависит от           : qt5-base  hicolor-icon-theme  qt5-svg  kguiaddons5
Доп. зависимости     : xdg-desktop-portal: To make Sway, Hyprland, and wlroots work [установлено]
                       xdg-desktop-portal-wlr: To make Sway, Hyprland, and wlroots work [установлено]
                       grim: To make Sway, Hyprland, and wlroots work [установлено]
                       xdg-desktop-portal-kde: For KDE Plasma
Требуется            : Нет
Опционально для      : Нет
Конфликтует с        : flameshot
Заменяет             : Нет
Установленный размер : 3,31 MiB
Сборщик              : Unknown Packager
Дата сборки          : Пн 13 мая 2024 21:10:11
Дата установки       : Пн 13 мая 2024 21:16:29
Причина установки    : Явно установлен
Установочный скрипт  : No
Проверен             : Нет
Резервные копии      : Нет
Extended Data   : pkgtype=pkg

arch, hyprland 0.40.0-1.1