So the script itself works quite well but when I try to open it by bindsym then it doesn open and rofi itself just doesnt work anymore and I have to kill it.
bindsym $mod+c exec /home/scripts/gpaste.sh
and nothing happens
Then if I try to run the script get this manually
(process:24274): Helper-WARNING **: 21:59:52.297: Failed to set lock on pidfile: Rofi already running?
(process:24274): Helper-WARNING **: 21:59:52.297: Got error: -1 Socket operation on non-socket
So I need to kill rofi by htop.
If I run the script in terminal I get it work and rofi opens up a correct menu.
The script (that I found and tried)
#!/usr/bin/env bash
line=gpaste-client --oneline | \ rofi -theme Adapta-Nokto -dmenu -i -p gpaste -kb-custom-1 Ctrl+x $@
exit_code=$?
index=echo $line | cut -d ':' -f1
if ! [[ $index =~ ^[0-9]+$ ]]; then
exit 0
fi
if [ $exit_code == 0 ]; then
gpaste-client select $index
elif [ $exit_code == 10 ]; then
gpaste-client delete $index
fi
Why might it be working like this?