I am trying to make the command flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder -w screen -f 60 -r 30 -c mp4 -o /home/USER/Videos of the GPU Screen Recorder program to make the program from a shortcut key to do a background replay of my screen without having to go to the program and do it manually.

The command in a terminal works without any problem but assigning the command to a shortcut in the KDE Plasma settings does absolutely nothing, maybe someone more experienced can help me.

P.S.: Is this community also intended for user comments, or is it an instance dedicated to official KDE releases?

  • azvasKvklenko
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    You can add any number of desktop files and the name doesn’t really matter unless there’s the .desktop extension at the end. You can take any other desktop file as an example (on most systems you will have a lot of such files in /usr/share/applications) or refer to specification. It could go like this:

    [Desktop Entry]
    Type=Application
    Name=GPU Recorder (background)
    Icon=media-record
    Exec=flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder -w screen -f 60 -r 30 -c mp4 -o /home/USER/Videos
    Terminal=false
    Categories=AudioVideo;Audio;Video;
    

    It should then appear in your application menu and you should be able to add it to shortcuts. I think if you want to bind more shortcuts, you can try with Actions https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#extra-actions

    though I think you shouldn’t be required to do any of theese and it should just take your any command and fire it on key press. I hope it’ll get fixed.

    • Xirup@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Work in absolute wonder, thank you very much for example and for the link, now I feel a little more hacker using Linux haha.