Hyprshot icon indicating copy to clipboard operation
Hyprshot copied to clipboard

FreeBSD support... Hyprshot just doesn't works in FreeBSD

Open Dolbaeb777K opened this issue 1 year ago • 5 comments

I have installed Hyprshot with manual way and also all dependencies. But it just doesn't works.. Idk why

Dolbaeb777K avatar Oct 27 '24 07:10 Dolbaeb777K

Also I haven't any output... 20241027_08h26m48s_grim

Dolbaeb777K avatar Oct 27 '24 08:10 Dolbaeb777K

Does your Hyprland works fine in FreeBSD?

ProMix0 avatar Oct 28 '24 16:10 ProMix0

Does your Hyprland works fine in FreeBSD?

.. Nope. Waybar appears slow. When you switching workspaces which have, for example, 5 Nautilus file managers. It so laggy...

Also Hyprland from freebsd ports has a latest version.

Dolbaeb777K avatar Nov 02 '24 11:11 Dolbaeb777K

My Hyprland works fine but no Hyprshot, same as OP`s issue... nothing happens.

evofromko avatar Mar 17 '25 11:03 evofromko

First off - this a great utility, thanks for your work in creating it. I have stopped trying to use Hyprland on FreeBSD (a number of other problems make it impractical for the moment - but I'm checking back occasionally), but did a little troubleshooting on this issue, and found a couple of points:

First, the version of getopt in the FreeBSD base system is not the same as the GNU version. Hyprshot uses the GNU syntax. As a quick workaround, you can install the misc/getopt port and modify the line in the args function to call /usr/local/bin/getopt. You could modify the code to choose the correct getopt based on the host operating system.

Second, the output of wc -m on FreeBSD is indented so that the conditional in checkRunning will never cause the script to exit - it simply keeps going round the loop and determining that <TAB>0 is not the same as 0! If you run Hyprshot from the terminal, you can just CTRL-C to stop it. I'd suggest a better approach is to rely on the exit status of pgrep, rather than trying to parse its output:

    if ! pgrep -q slurp; then
        pkill hyprpicker
        exit
    fi

dbye avatar Apr 10 '25 13:04 dbye