freevo/freevo2

A Commands pluggin

Closed this issue · 4 comments

enhancement:
I would like to have a commands plugin.

I would like to define 4 things:

  • path/to/executable_or_binary pe. "nautilus", or "/abosolute/path/to/my/command.sh"
  • parameters pe. "--var something --info anotherthing"
  • if the command has to be run in background and return control to freevo immediately or have to wait untill it is finished. (I think it can be replaced with a & at the end of the parameters line)
  • a human readable name and/or a description to show at command line menu in freevo instead of listing the contents of a folder looking for ".sh" files.

addons:
Retrieve command line info in some way without exiting freevo and going to the config file to know how is launched.

Thanks for your support.

PE.
my commands file: is
01-start_transmission.sh

and contains:

#!/bin/sh
transmission-gtk -m &

I would like to define the command line directly at freevo config.

What about a layout like this:

Commands
-> xterm
-> nautilus
----> Home
----> Root

The command menu in this example has two entries: xterm and nautilus. Xterm starts xterm, nautilus shows a submenu with Home and Root starting nautilus with different parameters. Would this also fit a basic games menu?

I think that one level is enough. Later, you could group automatically commands that have the same "executable". But this should be "automatic", and maybe on a later improve.

Yes, I think this command menu could fit a basic games menu, but can not substitute games menu because some games (specially emulators) need a 2nd argument: "The binary rom" which changes every time you launch one. This command menu can run simple games as executables (pe. tuxmath), but I wouldn't like too much to find a game in this section.

This a screenshot with my command content.

commands menu copia

02-kill_transmission.sh

#!/bin/sh
killall -9 transmission-gtk &

03-Nautilus.sh

#!/bin/sh
nautilus --browser /home/pablo

04-Firefox.sh

#!/bin/sh
/usr/bin/firefox

Firefox it is opened at fullscreen because it remembers its last windowed mode. Firefox is better than a smart tv browser. ;)


05-start_DLNA server.sh

#!/bin/sh
rygel &

06-stop_DLNA server.sh

#!/bin/sh
killall rygel &

07-Serve_pelis.sh

#!/bin/sh
cd /home/pablo/.freevo/Serve/Pelis
python -m SimpleHTTPServer &

This is a easy way to fetch content on my home-net vía http. I put symb-links inside ..../Serve/Pelis and they are published.


08-Serve_music.sh

#!/bin/sh
cd /home/pablo/.freevo/Serve/Music
python -m SimpleHTTPServer &

The same for music.


09-Procesar_Peliculas.sh

#!/bin/sh
cd /home/pablo/.freevo/start/
python3 PROCavipull.py &

The last one, fires a script to do a format conversion for a list of videos that have been put into a pull file.


This is one of the Freevo's strengths, that others HTPC doesn't have. ;)
On others words: Freevo is not everything at my HTPC, but it's the main part.

I added a simple command plugin to github.