Comments (5)
Imo the best way to do this would be to have the widgets accept either a string with the widget name, or a submodule with the name and the config for that widget, kinda like this:
panels = [
{
location = "bottom";
widgets = [
{
name = "org.kde.plasma.kickoff";
config = {
General.icon = "nix-snowflake-white";
};
}
"org.kde.plasma.icontasks"
"org.kde.plasma.marignsseperator"
"org.kde.plasma.systemtray"
"org.kde.plasma.digitalclock"
]
}
];
from plasma-manager.
Ow nice that will work! I noticed that the widget number varies on installs so I'll try this out. No worries about not having time, I might have a jab at implementing something but it's a relatively niche project. All the effort is very welcome
from plasma-manager.
This would be great, I only have one widget I'd like to configure and now every-time my system restarts the widget setting is reset.
from plasma-manager.
Sorry for not doing anything about this, I want it too but I have been pretty busy lately
I did remember I was trying to see how I would do this and I managed to get it working with this
panels = [
{
location = "top";
extraSettings = ''
for (i = 0; i < panel.widgetIds.length; i++ ) {
currentWidget = panel.widgetById(panel.widgetIds[i])
if (currentWidget.type == "org.kde.plasma.kickoff" ) {
// You can change the config here
currentWidget.currentConfigGroup = ["General"]
currentWidget.writeConfig("icon", "nix-snowflake-white")
}
}
'';
}
];
This is not per panel and changes every widget but I hope it's good enough until I can get back to doing stuff @martijnboers
from plasma-manager.
Do note that the above for-loop should not be neccesary as all the widgets are saved in a panelWidgets
dictionary, so you should be able to use currentWidget = panelWidgets["org.kde.plasma.kickoff"]
. That said there a.t.m. is no proper nix interface for the writeConfig
thing above (I'll see if I can add this in the weekend, as it should be quite a simple tweak).
from plasma-manager.
Related Issues (20)
- kate config options changed to plasma6 HOT 1
- Systray module fails with "error: cannot coerce null to a string." HOT 2
- Digital clock panel widget does not show week numbers in calendar HOT 3
- Move from using autostart scripts to a systemd service HOT 1
- How to Handle Themes HOT 5
- Khotkeysrc attributes defined multiple times HOT 3
- Add option `everythingImmutable` or `immutableByDefault` HOT 1
- Missing settings in plasma settings HOT 1
- Panel disable "Mouse Wheel: cycles though tasks" HOT 3
- Implement widget-specific options and installation for third-party widgets. HOT 1
- Add support for multiple activities
- [Feature] rc2nix support backup system-monitor applet HOT 2
- Run rc2nix multiple times cause duplicate lines HOT 1
- Feature: Supports fine-grained (option-level) declarative configuration (overrideConfig) HOT 3
- [Feature]: Add option to control the data range of system monitor sensors HOT 2
- (Some?) boolean options in /modules/widgets/icon-tasks.nix don't get converted to strings HOT 2
- kscreenlocker.wallpaper is not working, but workspace.wallpaper works with the same value HOT 2
- Add ability to specify "all" for the screen option of a panel
- Application-title-bar, plasmusic undefined wuth Auto installing HOT 7
- ApplicationTitleBar widget module is missing BorderlessMaximizedWindows option HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plasma-manager.