koldbyte / termoid

Terminal in a Plasmoid
https://store.kde.org/p/1169451/
45 stars 6 forks source link

[Feature request] Any chance for custom color schemes #21

Open ALexus1907 opened 3 years ago

ALexus1907 commented 3 years ago

I'd love to use my very own color scheme with this widget

Lateralus138 commented 1 year ago

It seems the color schemes are read/sourced from: /usr/lib/x86_64-linux-gnu/qt5/qml/QMLTermWidget/color-schemes

Screenshot_20220904_212510

so if you put your theme there and then add a new selection line to the file ~/.local/share/plasma/plasmoids/com.koldbyte.kde.termoid/contents/ui/config/ConfigGeneral.qml with the name in the Description= section of your theme file to it:

...
                ComboBox {
                    id: colorscheme
                    currentIndex: plasmoid.configuration.colorscheme
                    model: ListModel {
                        id: cbItems
                        ListElement { text: "BlackOnLightYellow"; }
                        ListElement { text: "BlackOnRandomLight"; }
                        ListElement { text: "Linux"; }
                        ListElement { text: "BlackOnWhite"; }
                        ListElement { text: "DarkPastels"; }
                        ListElement { text: "GreenOnBlack"; }
                        ListElement { text: "WhiteOnBlack"; }
                        ListElement { text: "BreezeModified"; }
                        ListElement { text: "cool-retro-term"; }
                        ListElement { text: "Tango"; }
                        ListElement { text: "Ubuntu"; }
                    }
                }
...

here I have added Tango and Ubuntu (which already exists) and I have tested and it works for me.

There are different styles of color scheme files and it only works with certain formats so I would just copy/rename one of the theme files that already works and edit it as needed to create your own theme (be sure to change the name in the Description so as to not have confusing duplicates in your menu).

Here is the Ubuntu color scheme in action:

Screenshot_20220904_212223

And a Metro-ish theme I just wrote using the base Ubuntu.colorscheme:

Screenshot_20220905_114619

Patr1ck28 commented 8 months ago

Was just trying to do this exact thing to sync my termoid colors with my konsole colors and @Lateralus138's comment popped up, thanks for the help! This should be in the github's readme, though for me the color schemes were found in /usr/lib64/qt5/qml/QMLTermWidget/color-schemes. For future reference, the way I found where they are is by doing rpm -ql qmltermwidget

Lateralus138 commented 8 months ago

...thanks for the help!

No problem, glad I could help!