• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Boot on Arch

General Discussion
3
27
3.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    Gustavo Soares
    last edited by Gustavo Soares Sep 19, 2021, 8:11 PM Sep 18, 2021, 12:46 PM

    hi, i also use arch linux (manjaro in my case) and i followed all the steps exactly as presented. Triggercmd keeps running in the background but when it's triggered, it doesn't perform the action (at least not in the foreground). I can see the logs in systemctl showing that it was triggered, but the action does not happen (open a program for example).

    Entered I propose a rather simple solution. I'm using a dropdown terminal (in my case guake) to run the triggercmd in the foreground, but in a way that it's hidden.

    For this solution to work completely, you need to create a script that executes this command:

    guake -e "node ~/TRIGGERcmd-Agent/src/agent.js --console" -r "triggercmd" &
    

    the -r flag is just to rename the guake tab.

    add a sleep 20 a line before the command to ensure that it will run with some delay and avoid any possible problems.

    The script looks like this:

    #!/bin/bash
    echo "Iniciando..."
    sleep 20
    guake -e "node ~/TRIGGERcmd-Agent/src/agent.js --console" -r "triggercmd" &
    

    then you can create a triggercmd-agent.desktop file in .config/autostart.

    inside the file inform this:

    [Desktop Entry]
    Encoding=UTF-8
    Version=0.9.4
    Type=Application
    Name=TriggerCMD Agent
    Comment=initialize triggercmd agent
    Exec=sh -c "~/<path_to_script>/<script>.sh"
    OnlyShowIn=XFCE;
    RunHook=0
    StartupNotify=true
    Terminal=false
    hidden=false
    

    done that, when logging in, an instance of guake will be started that executes the command to open the triggercmd, all in a hidden way.

    The main reason for this solution is that, at least for me, running triggercmd in the background doesn't work.

    I'm also developing a CLI to create, edit, list and remove commands in a friendlier way, since in arch linux it's not yet possible to run the triggercmd graphical interface.

    triggercmd command list
    list.png

    triggercmd command new
    new.png

    R 1 Reply Last reply Sep 18, 2021, 9:48 PM Reply Quote 0
    • R
      Russ @Gustavo Soares
      last edited by Sep 18, 2021, 9:48 PM

      @Gustavo-Soares, your solution makes sense. Also that TUI (text user interface) is really cool. I hope you publish that.

      Russell VanderMey

      G 1 Reply Last reply Sep 19, 2021, 8:03 PM Reply Quote 0
      • G
        Gustavo Soares @Russ
        last edited by Sep 19, 2021, 8:03 PM

        @Russ thank you very much for the feedback, I will publish it, it's already on my GitHub (see here). This week I will document the solution and publish it on PyPI. Your TriggerCMD is amazing, congratulations!

        R 1 Reply Last reply Sep 20, 2021, 2:18 AM Reply Quote 0
        • R
          Russ @Gustavo Soares
          last edited by Sep 20, 2021, 2:18 AM

          Thank you @Gustavo-Soares

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • G
            Gustavo Soares
            last edited by Sep 22, 2021, 2:33 PM

            Hi @Russ, I finish to publish a package on PyPi. Feel free to test and submit your contributions. To access click here.

            R 1 Reply Last reply Oct 2, 2021, 1:55 AM Reply Quote 0
            • R
              Russ @Gustavo Soares
              last edited by Russ Oct 2, 2021, 2:20 AM Oct 2, 2021, 1:55 AM

              @Gustavo-Soares, sorry it took me so long to try this.

              I just tried to download it with pip and pip3 and it fails with this message:

              pip install triggercmd
              Collecting triggercmd
                Could not find a version that satisfies the requirement triggercmd (from versions: )
              No matching distribution found for triggercmd
              

              EDIT: That was in Ubuntu Linux, but I tried it in Windows and on my Raspberry Pi and it worked. Very cool.

              Russell VanderMey

              G 1 Reply Last reply Oct 5, 2021, 11:38 AM Reply Quote 0
              • G
                Gustavo Soares @Russ
                last edited by Gustavo Soares Oct 5, 2021, 11:45 AM Oct 5, 2021, 11:38 AM

                @Russ, strange, a friend of mine uses ubuntu and managed to install normally. I'm going to create a ubuntu virtual machine and try this. Thanks for the feedback.

                [offtopic] I see here that you have a PWA, very nice!! Congratulations, I really liked it.

                R 1 Reply Last reply Oct 5, 2021, 12:38 PM Reply Quote 0
                • R
                  Russ @Gustavo Soares
                  last edited by Russ Oct 5, 2021, 12:38 PM Oct 5, 2021, 12:38 PM

                  Thanks @Gustavo-Soares, that's the first feedback I've gotten on the PWA. I'm glad you like it.

                  How about the new panels option? Do you think that will be useful? I plan to add features, like an option to replace the Trigger button with an On and Off button to send on or off as the parameter.

                  BTW, your triggercmd cli tool is really cool. As I get time I plan to test it more and maybe contribute.

                  Russell VanderMey

                  G 1 Reply Last reply Oct 5, 2021, 5:01 PM Reply Quote 0
                  • G
                    Gustavo Soares @Russ
                    last edited by Gustavo Soares Oct 5, 2021, 5:03 PM Oct 5, 2021, 5:01 PM

                    @Russ I think very nice this resource of panels, I just use this. Could be intersting in cards shape (for example), would be very beatiful and pleasant. I am thinking too that you can create a dashboard, and the data of runs could be showed there in graphics shape

                    And if you have more ideas and features for the CLI, feels free open pull requests if possible.

                    R 1 Reply Last reply Oct 6, 2021, 12:35 AM Reply Quote 0
                    • R
                      Russ @Gustavo Soares
                      last edited by Oct 6, 2021, 12:35 AM

                      @Gustavo-Soares, thanks for the ideas. I agree the interface could be much better, but at least this works for now.

                      I'll probably have ideas for your triggercmd cli tool. Again, thanks for doing that.

                      I did just find a bug in the tool. I'll open an issue on github, and if I get time soon I can try to fix it too.

                      I found that it changes the text when there are special characters like the á. It changed "automático" to this:

                          "voice": "autom\u00c3\u00a1tico",
                      

                      Also I edited my Notepad command, not the command that got changed.

                      Russell VanderMey

                      G 1 Reply Last reply Oct 6, 2021, 11:46 AM Reply Quote 0
                      • G
                        Gustavo Soares @Russ
                        last edited by Oct 6, 2021, 11:46 AM

                        @Russ, very good. I think applying a decode('utf-8') should solve this problem. I really hadn't tried using special characters yet.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post