Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headphone Icon has been gone #18

Open
Naginipython opened this issue Dec 1, 2022 · 3 comments
Open

Headphone Icon has been gone #18

Naginipython opened this issue Dec 1, 2022 · 3 comments

Comments

@Naginipython
Copy link

Hello,
I am using Manjaro KDE, Kernal 5.15.78 with DE being Plasma 5.26. I usually update my system apps with Manjaro's 'add/remove software' but about a month or 2 ago I downloaded and updated using KDE's 'Discover', and since then the icon for my headphone has disappeared. I am unaware if I did something else to mess with it, I don't believe its likely. I'm currently using Audio Device Switcher 0.3.0.
Its odd, the 'HDMI / DisplayPort 3' monitor icon has stayed visible, but where the headphone icon used to be, it's now a smaller square (compared to the monitor icon). The headphones are: 'Analog Output (HyperX Cloud Flight Wireless headset Analog Stereo)'. If there is anything I should do to give more information, let me know

@alihakkidemiral
Copy link

i did all of them same icon, but it still doesn't change. left icon still empty.
~/.local/share/plasma/plasmoids/org.kde.plasma.audiodeviceswitcher/contents/ui/main.qml

    function iconNameFromPort(port, fallback) {
        if (port) {
            if (port.name.indexOf("speaker") !== -1) {
                return "channelmixer";
            } else if (port.name.indexOf("headphones") !== -1) {
                return "channelmixer";
            } else if (port.name.indexOf("hdmi") !== -1) {
                return "channelmixer";
            } else if (port.name.indexOf("mic") !== -1) {
                return "audio-input-microphone";
            } else if (port.name.indexOf("phone") !== -1) {
                return "channelmixer";
            }
        }
        return fallback;
    }

@joestringer
Copy link

I wonder if these checks need to convert the port name to lower case before the comparison to make sure that they match?

@denilsonsa
Copy link

Hi! I decided to rewrite the icon selection logic in my own fork. The new logic tries matching multiple fields against multiple rules, and tries picking up the best icon somehow. It works on my computer, I hope it works on most cases, but there will certainly be some corner-case that will need tweaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants