Giter VIP home page Giter VIP logo

streamdeckcontroller's People

Contributors

trilinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

doctorjax

streamdeckcontroller's Issues

Suggestion: Outline Font To Better See In Front Of Icon

So, as the title says, this is a suggestion instead of a bug. In the Streamdeck-ui that I used to use by timothycrosley, they made it so the font had a black outline which made it much easier to read as it made it stand out in front of button icons.

It's up to you whether or not you want to implement said feature, but I liked it enough to do it for myself, so if you want to, just change this line:
draw.text((x, y), text=self.caption, font=font, anchor="ms", fill=self.fontColor, align="center")
to:
draw.text((x, y), text=self.caption, font=font, anchor="ms", fill=self.fontColor, align="center", stroke_width=3, stroke_fill="black")

Button Text Alignment Issues On Arch Linux

This is my first time creating an issue on any project, so I'll try to keep it short and sweet.

Describe bug

Text on buttons are misaligned and longer words are cut off.

Operating System

OS: Arch Linux
Kernel: 5.17.1-zen1-1-zen
Python version: Python 3.10.4
StreamDeck version: V2 - 15 button

Suggested solution

In the controller.py file, the following lines seem to be what causes it.

if system == "windows" : #Fixing weird bug
    x = image.width / 2
else :
    x = image.width / 2 - (w/2)

More specifically, the else statement that includes x = image.width / 2 - (w/2) seems to be the issue.

I was messing with things, and by removing the - (w/2) at the end of the else statement, the issue seems to be fixed. Thus, I don't think the if statement is even needed (can just be replaced with x = image.width / 2 instead), as when I changed the system == "windows" to system == "linux" in the if statement, it worked as expected.

Expected behavior

The text should be centered left and right and words shouldn't be cut off, like the example images in the README and in the showcase post on Reddit.

Running Commands With Flags Results In "No such file or directory" On Arch Linux

Describe Bug

Unable to run commands with "runCommand" action that use flags (i.e. alacritty -e 'htop'). Instead it just gives an error of: No such file or directory.

Operating System

OS: Arch Linux
Kernel: 5.17.7-zen1-1-zen
Python version: Python 3.10.4
StreamDeck version: V2 - 15 button

Suggested Solution

In the controller.py file, this is the line which controls the "runCommand" action:

elif action == "runCommand" :
     subprocess.call(str(actionData), stderr=subprocess.DEVNULL)

To allow commands to be used with flags and other shell modifiers, the line:
subprocess.call(str(actionData), stderr=subprocess.DEVNULL)
should instead be:
subprocess.call(str(actionData), shell=True, stderr=subprocess.DEVNULL)

In which shell=True fixes the issue.

Expected Behavior

Should be able to run commands with flags and other shell based modifiers (i.e. alacritty -e 'htop' &).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.