Plasmoid config file
I also managed to read out the selected value. But how can I make the selection persistent? Finally, I can answer this question myself. The above code does actually work and the configuration is stored automagically — as soon as the package has been installed via plasmapkg and started by the plasma desktop tools.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Saving config of a Python plasmoid Ask Question. Asked 8 years, 1 month ago. Active 7 years, 10 months ago. Viewed times.
Here's my code which can be started with plasma-windowed : metadata. Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Describe the bug After i updated arch after a week panon just stopped visualizing the audio as if there was no audio playing. Any error message shown in the console QML debugging is enabled. Only use this in a safe environment. Icon theme "Numix-Circle" not found. SoundCardSource spectrum.
Iterable : AttributeError: module 'collections' has no attribute 'Iterable'. The text was updated successfully, but these errors were encountered:. Sorry, something went wrong. Same thing happened to me a few days ago. I thought it was pipewire's fault but after going back to a previous snapshot and updating only pipewire, panon was still working, but completly stopped after a full system update. I'm using Arch with latest stable kernel.
We import the ConfigModel and ConfigCategory , and define the tab name, icon, and qml file that will be loaded.
Please note that your should not use PlasmaComponents. The normal QtQuick. FormLayout is used to layout the controls in the center of the page. The Kirigami. You can use it for CheckBoxes as a section seperator though. You do not need to set a Kirigami label. This is so the user can hit discard or apply the changes.
A SpinBox is used for numbers. If you want decimal places, a QtQuick. QtQuickControls1 has a SpinBox. QtControls1 has a SpinBox. A TextField is used for a single line of text. It can be used as a base for many other data types as well. You will also want to look at the base TextInput for more properties. A TextArea is used for paragraphs of text. You will also want to look at the base TextEdit for more properties.
You can also assign directly to plasmoid. I leave this up to the reader wither this is a pro or con. It still uses the QtQuick. Translated strings need to be wrapped in the i18n Note that single quotes i18n 'Test' will be ignored by the tool that parses your code for all the translation strings.
Always use double quotes i18n "Test". The i18n An example from the Ki18n docs is:. Using i18np When unreadEmailCount was 1 , the tooltip would have read "1 unread emails".
The latest copy of my merge. After running build. To do this, we need to install the gettext package. First thing we need to do in our merge. The latest copy of my complete merge. We then remove the beginning of the namespace so we are left with helloworld and store that in widgetName.
We also grab the website which a link to the GitHub repo for use as the bugAddress. Then we generate a template. After generating it, we use sed to replace a few placeholder strings. Continuing our merge. Lastly, we delete the infiles. The messages we want to translate appear as msgid "Show Thing" , with the file it came from appearing in a comment in the line above. Underneath is an empty msgstr "" which is where the translator will place the translated messages.
A full list of locale codes can be found on StackOverflow. Translators can then start filling out the empty msgstr "" with translations.
Our merge. We should next merge any new messages extracted for translation into our fr. Then for each. We then use another GetText command msgmerge to generate a new fr.
Once our fr. So lets get started on our build. The latest copy of my complete build. We start with the same code that we used in our merge. We also reuse the same code to iterate the. Then we use another GetText command msgfmt to convert the fr.
Then we copy the fr. First make sure you run our build. Then we need to override the locale environment variables just for our plasmoidviewer instance. If you run the locale command, it should list all the environment variables available to override. While it is bad practice to link to private code, if you know another widget has translated a string, you can use i18nd domain, string, An example can be found in org.
To simplify testing, I added Plasmoid. The new Date should be familiar if you come from a javascript background. We could use a Timer with the Date type, but we want to precisely sync all clock widgets so they all show the same time on all screens.
They are used to share data between widgets. There are various dataengines for notifications, plugged in usb drives hotplug , and event the weather data so it only has to fetch the data once to show it in all widgets on each screen.
DataSource to connect to it. Once connected, it gives us a DateTime object we can access using dataSource.
0コメント