ass icon indicating copy to clipboard operation
ass copied to clipboard

update flameshot script to be universal

Open NotAShelf opened this issue 2 years ago • 0 comments

  • wayland support
  • experimental local screenshots if domain & key are left empty

Checklist

  • [x] I have read the Contributing Guidelines
  • [x] I acknowledge that any submitted code will be licensed under the ISC License
  • [x] I confirm that submitted code is my own work (partially)
  • [x] I have tested the code, and confirm that it works

Enviroment

  • Operating System: Arch Linux 5.17.5-arch1-2
  • Tested On:
    • Fedora 36, Arch Linux 5.17.5-arch1-2
    • Sway, GNOME, i3wm, qtile and KDE Plasma

Description

(PR made on behalf of Skye#2411 on Discord, under his permission) The work is the collaborated effort of @EPNero & @NotAShelf

Description: The script now supports Wayland through the help of wayland native tools instead of attempting to get Flameshot to work on Sway and other wl-roots based compositors. Additionally, it fixes a possible bug that went unnoticed with the if [[ -f $FILE ]] condition check. Lastly, support for local screenshots are added and any screenshot taken with the script while KEY and DOMAIN values are null will be copied to the clipboard directly instead of throwing an error and exiting the script.

tl;dr:

  • wayland support
  • error turned into feature (local screenshots)
  • bug fix
  • logic and syntax improvements
  • script is now more verbose

Dependencies: (Wayland)

Current problems: ~~Local screenshots only work on Wayland due to wl-clipboard providing functionality that xclip does not, an alternative could be to unify the clipboard utilities by using wl-clipboard for wayland and wl-clipboard-x11 for xorg, but wl-clipboard-x11 seems to be abandoned. An xclip-based solution to the problem is also possible, but apparently works only on GTK environments according to askubuntu~~

~~Found a fix, applying soon. (Previous comments left in for documentation reasons)~~

Local screenshots are implemented on Xorg as of the 2nd commit.

NotAShelf avatar May 13 '22 04:05 NotAShelf