Skip to content

simple cli utility #164

Closed
Closed

Description

@marvin1099

Describe the feature idea
A simple cli utility to update things on the steam deck.
I used this in streamdeck-linux-gui to display my obs recording time.
Something to change text would be great.
I should probably work like this (or simelar):
actions.py --device 1092 --page 10 --button 3 --label set "wellcome"

Activity

  1. Core447 commented on Jul 13, 2024

    @Core447
    Member

    This is not a priority right now, but if I have some time I can add this. For now you can use the OBS plugin to show the current recording time. Currently there's an option to change the current page via the command line using the --change-page argument

  2. marvin1099 commented on Jul 14, 2024

    @marvin1099
    Author

    This is not a priority right now, but if I have some time I can add this. For now you can use the OBS plugin to show the current recording time. Currently there's an option to change the current page via the command line using the --change-page argument

    Yep I saw that the obs plugin has a timer included, thats nice,
    it would still be nice if a interaction over the cli was possible,
    the change page arg is already nice there just inst that much
    you can do with it if you want a reactive button.
    Take your time, the main feature i used this for in streamdeck-linux-gui
    was showing the real time and the obs rec time,
    these are both supported, so all ready pretty nice.

  3. Core447 commented on Jul 14, 2024

    @Core447
    Member

    A short-term alternative might be to add a auto-run option to the "Run command" action and use its "show output" option

  4. marvin1099 commented on Jul 14, 2024

    @marvin1099
    Author

    A short-term alternative might be to add a auto-run option to the "Run command" action and use its "show output" option

    I have thought about that to, i mean how difficult would that be, it would be nice to have.
    Well the long term cli option is still nicer,
    but I'm fine for now if you implement the auto run option.

    In that case it will probably make sense to have two commands.
    One that gets executed every x seconds, for that one we show the output.
    And the second one we execute when the button is pressed.
    The way this could then be used, would be, that in the main file,
    we could then detect a file or something that gets created by the button script.
    Well that's my first thought is at least.
    Feel free to adjust this in a way that makes sense in your context.

    Or here is a other way that also works.
    Maybe we add a argument to the script that gets run instead.
    So we have one file that gets executed each x seconds,
    that we show the output of and we just pass the button state as argument,
    for that the script may be run when the button is pressed / unpressed with the arg
    or it could be added to a waitlist.

  5. Core447 commented on Jul 16, 2024

    @Core447
    Member

    I added a simple auto run feature to "Run command" with StreamController/OSPlugin@8d7c733 (available in the store), what do you think?

  6. moved this to Backlog in Devon Jul 17, 2024
  7. marvin1099 commented on Aug 6, 2024

    @marvin1099
    Author

    I do like the option,
    but a option to add argument in the command box that will send the button status to the script, would be so good.
    the status could be "autorun" or "pressed" or "released".
    The box input may look like this:

    /home/marvin/Documents/Coding/Python/StreamController/Test-st.sh %s
    

    where %s will be replaced by "autorun" or "pressed" or "released".
    That way it can be detected if the button was pressed / released and still display live info.

    For "released" a option to run the script on release would be needed, so I'm not shure how viable that is.

  8. Core447 commented on Aug 7, 2024

    @Core447
    Member

    For "released" a option to run the script on release would be needed, so I'm not shure how viable that is.

    That's already possible using the event assigner.

    I think adding the argument stuff is a bit too much for the "run command" action, environment variables might be nicer. However, with a way better cli coming at some point, idk if it's really necessary.

  9. marvin1099 commented on Aug 7, 2024

    @marvin1099
    Author

    Using a env var would also make it impossible to tell what button was pressed,
    the single argument I'm suggesting i think is a good option,
    the thing is how else will i tell if a auto run button was pressed,
    some way to check this would be great.

    You can of course suggest some other way of doing this if you can think of it.
    Let me also give an example of when this would be useful.
    lets say we have 3 types of live info we want to see,
    lets assume battery time and gpu encoding,
    this is just a examlpe of course, this could be any live info we can get from the terminal.
    so this would be a lot of info all at once so instead switching between the info might be a good idea,
    thats where this feature comes in, it can then be detect the user presses and swap what info we display.

  10. Core447 commented on Aug 13, 2024

    @Core447
    Member

    You can of course suggest some other way of doing this if you can think of it.

    I don't want to add a ton of options to the "Run command" action, but what about a separate "Run script" action that is meant for such things and provides the arguments etc?

    swap what info we display.

    For swapping you can already use states with their own actions (e.g. "Run command").

  11. marvin1099 commented on Aug 13, 2024

    @marvin1099
    Author

    I don't want to add a ton of options to the "Run command" action, but what about a separate "Run script" action that is meant for such things and provides the arguments etc?

    Like it, that would be nice I think,
    well take your time,
    Now that you mention it the idea I had can be solved by having 2 run command actions.

    But I think its still a good idea,
    The reason is that then pressing a button and releasing it can then be detected by a script,

    Then users can have custom button patterns.
    (if they can realize then in a bash script or something like it of course.)

    By using "run script" you could have:
    Do something specific if button was pressed for around one sec, released for around one Sec, then pressed once more. And do something else if its just pressed once.

    Well that's what I think at least,
    give it some thought.

    Thanks for all the awnsers,
    and the implementation of some things I have asked for.

  12. teras commented on Sep 29, 2024

    @teras

    When I try to use the command line option --change-page to use the app in a script, the command works but the app keeps popup, which might be distracting. I believe the expected way should be to silently perform the action and exit, if command line arguments are present?

    About states, I am confused, I don't see a way to change the state of the button through command line options. The idea that I am trying to immitate is, to have a lock-like icon. When the icon is unlocked, then when I enter a page, the page will jump back to the home screen (this feature is already implemented. But if, in the mean time, the user presses the lock icon, then the page is "locked" and won't jump to the home page.

    I am not asking to implement this feature. Actually I am a long time streamdeck-(linux-)ui user and I had created a "daemon" script that was doing a bunch of clever stuff, most of them you already have (and well done! 👏 ) But this "lock" feature is something that I still miss.

  13. dixonte commented on Nov 23, 2024

    @dixonte
    Contributor

    When I try to use the command line option --change-page to use the app in a script, the command works but the app keeps popup, which might be distracting.

    I have submitted pull request #287 to change this behaviour.

  14. WakanaYuki commented on Jul 24, 2025

    @WakanaYuki
    Contributor

    I have submitted a pull request that implements this feature/enhancement request here: #460

  15. Core447 commented on Aug 11, 2026

    @Core447
    Member

    Added with a12d044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions