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

[Feature Request]: Trigger colorchange by terminal command / bash script #126

Open
2 tasks done
k1llerk3ks opened this issue Dec 11, 2024 · 2 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@k1llerk3ks
Copy link

I have:

Is your feature request related to a problem? Please describe.
I would love to change the color of the bar, depending on the activity i am on. basically i would love to trigger this by a bash command.

Describe the solution you'd like
some command i can run or file i can edit to change the custom color, without having to open the widget everytime
Describe alternatives you've considered
trying to create an extra bar for every activity, but that does not seem to work either

Additional context
thx for this amazing piece of software :)

@k1llerk3ks k1llerk3ks added the enhancement New feature or request label Dec 11, 2024
@k1llerk3ks
Copy link
Author

So, i tinkered around a bit. I have a solution that kind of works, but is just a workaround that works mostly.

I created a preset and chose to load this preset on any of those change options.
Before switching the activity, i replace the color string in the presetfile. then i switch -
If i have a window maximized on that screen, the color changes, if not, then it doesn't change. is there some possibility to resync/update the color? I suppose, some bus command is sent out from the plugin.

@luisbocanegra
Copy link
Owner

Supporting preset auto-loading based on the current activity should be possible, an example of a widget that uses them is Activity Pager or Task Manager https://github.com/KDE/plasma-desktop/blob/master/applets/taskmanager/package/contents/ui/ContextMenu.qml.

I already use org.kde.taskmanager to detect maximized/active window so it should be a matter of listing and linking presets to them in the presets auto-loading tab, then implement the detection and switch similar to existing ones.

For future reference here's an example of what presetAutoloading (https://github.com/luisbocanegra/plasma-panel-colorizer/blob/0b3fa70a665a69c073e3e20cdc05000e14251507/package/contents/config/main.xml#L40C15-L40C32) currently stores:

{
    "enabled": true,
    "maximized": "/home/luis/.config/panel-colorizer/presets/border",
    "touchingWindow": "/home/luis/.config/panel-colorizer/presets/border",
    "floating": "/home/luis/.config/panel-colorizer/presets/border",
    "normal": "/home/luis/.config/panel-colorizer/presets/border",
    "maximizedFilterByActive": true
}

Maybe activities could be added like this:

{
    "enabled": true,
    "maximized": "/home/luis/.config/panel-colorizer/presets/border",
    "touchingWindow": "/home/luis/.config/panel-colorizer/presets/border",
    "floating": "/home/luis/.config/panel-colorizer/presets/border",
    "normal": "/home/luis/.config/panel-colorizer/presets/border",
    "maximizedFilterByActive": true,
    "activity": {
        "activity-identifier-1": "/home/luis/.config/panel-colorizer/presets/border",
        "activity-identifier-2": "/home/luis/.config/panel-colorizer/presets/border"
    }
}

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

No branches or pull requests

2 participants