mirror of
https://github.com/pjones/plasma-manager.git
synced 2024-09-11 15:56:02 +03:00
Update home.nix example with widget-specific options and README (#262)
This commit is contained in:
parent
18ae86b008
commit
809d86d6a8
15
README.md
15
README.md
@ -4,14 +4,17 @@ This project aims to provide [Home Manager][home-manager] modules which allow yo
|
||||
to configure KDE Plasma using Nix.
|
||||
|
||||
## Table of contents
|
||||
- [Manage KDE Plasma with Home Manager](#manage-kde-plasma-with-home-manager)
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [Supported versions](#supported-versions)
|
||||
- [What's supported](#whats-supported)
|
||||
- [What's not supported](#whats-not-well-supported-at-the-moment)
|
||||
- [What's not well supported (at the moment)](#whats-not-well-supported-at-the-moment)
|
||||
- [What will not be supported](#what-will-not-be-supported)
|
||||
- [Getting started](#getting-started)
|
||||
- [Enabling declarative configuration](#make-your-configuration-more-declarative-with-overrideconfig)
|
||||
- [Capturing existing configuration](#capturing-your-current-configuration-with-rc2nix)
|
||||
- [Contributions and maintenance](#contributions-and-maintenance)
|
||||
- [Special thanks](#special-thanks)
|
||||
- [Make your configuration more declarative with overrideConfig](#make-your-configuration-more-declarative-with-overrideconfig)
|
||||
- [Capturing Your Current Configuration with rc2nix](#capturing-your-current-configuration-with-rc2nix)
|
||||
- [Contributions and Maintenance](#contributions-and-maintenance)
|
||||
- [Special Thanks](#special-thanks)
|
||||
|
||||
## Supported versions
|
||||
`plasma-manager` supports both plasma 5 and plasma 6. The `trunk` branch is the
|
||||
@ -33,7 +36,7 @@ At the moment `plasma-manager` supports configuring the following:
|
||||
- Configuration of spectacle shortcuts (via the `spectacle` module)
|
||||
- Shortcuts (via the `shortcuts` module)
|
||||
- Hotkeys (via the `hotkeys` module)
|
||||
- Panels (via the `panels` module)
|
||||
- Panels and Extra Widgets (via the `panels` module)
|
||||
- Screen locker (via the `kscreenlocker` module)
|
||||
- Fonts (via the `fonts` module)
|
||||
- Window Rules (via the `window-rules` module)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
programs.plasma = {
|
||||
enable = true;
|
||||
extraWidgets = [ "application-title-bar" "plasmusic-toolbar" ];
|
||||
|
||||
#
|
||||
# Some high-level settings:
|
||||
@ -45,21 +46,44 @@
|
||||
{
|
||||
name = "org.kde.plasma.kickoff";
|
||||
config = {
|
||||
General.icon = "nix-snowflake-white";
|
||||
General = {
|
||||
icon = "nix-snowflake-white";
|
||||
alphaSort = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
# Or you can configure the widgets by adding the widget-specific options for it.
|
||||
# See modules/widgets for supported widgets and options for these widgets.
|
||||
# For example:
|
||||
{
|
||||
kickoff = {
|
||||
sortAlphabetically = true;
|
||||
icon = "nix-snowflake-white";
|
||||
};
|
||||
}
|
||||
# Adding configuration to the widgets can also for example be used to
|
||||
# pin apps to the task-manager, which this example illustrates by
|
||||
# pinning dolphin and konsole to the task-manager by default.
|
||||
# pinning dolphin and konsole to the task-manager by default with widget-specific options.
|
||||
{
|
||||
name = "org.kde.plasma.icontasks";
|
||||
config = {
|
||||
General.launchers = [
|
||||
iconTasks = {
|
||||
launchers = [
|
||||
"applications:org.kde.dolphin.desktop"
|
||||
"applications:org.kde.konsole.desktop"
|
||||
];
|
||||
};
|
||||
}
|
||||
# Or you can do it manually, for example:
|
||||
{
|
||||
name = "org.kde.plasma.icontasks";
|
||||
config = {
|
||||
General = {
|
||||
launchers = [
|
||||
"applications:org.kde.dolphin.desktop"
|
||||
"applications:org.kde.konsole.desktop"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
# If no configuration is needed, specifying only the name of the
|
||||
# widget will add them with the default configuration.
|
||||
"org.kde.plasma.marginsseparator"
|
||||
@ -94,12 +118,75 @@
|
||||
];
|
||||
hiding = "autohide";
|
||||
}
|
||||
# Global menu at the top
|
||||
# Application name, Global menu and Song information and playback controls at the top
|
||||
{
|
||||
location = "top";
|
||||
height = 26;
|
||||
widgets = [
|
||||
{
|
||||
applicationTitleBar = {
|
||||
behavior = {
|
||||
activeTaskSource = "activeTask";
|
||||
};
|
||||
layout = {
|
||||
elements = [ "windowTitle" ];
|
||||
horizontalAlignment = "left";
|
||||
showDisabledElements = "deactivated";
|
||||
verticalAlignment = "center";
|
||||
};
|
||||
overrideForMaximized.enable = false;
|
||||
titleReplacements = [
|
||||
{
|
||||
type = "regexp";
|
||||
originalTitle = "^Brave Web Browser$";
|
||||
newTitle = "Brave";
|
||||
}
|
||||
{
|
||||
type = "regexp";
|
||||
originalTitle = ''\\bDolphin\\b'';
|
||||
newTitle = "File manager";
|
||||
}
|
||||
];
|
||||
windowTitle = {
|
||||
font = {
|
||||
bold = false;
|
||||
fit = "fixedSize";
|
||||
size = 12;
|
||||
};
|
||||
hideEmptyTitle = true;
|
||||
margins = {
|
||||
bottom = 0;
|
||||
left = 10;
|
||||
right = 5;
|
||||
top = 0;
|
||||
};
|
||||
source = "appName";
|
||||
};
|
||||
};
|
||||
}
|
||||
"org.kde.plasma.appmenu"
|
||||
"org.kde.plasma.panelspacer"
|
||||
{
|
||||
plasmusicToolbar = {
|
||||
panelIcon = {
|
||||
albumCover = {
|
||||
useAsIcon = false;
|
||||
radius = 8;
|
||||
};
|
||||
icon = "view-media-track";
|
||||
};
|
||||
preferredSource = "spotify";
|
||||
showPlaybackControls = true;
|
||||
songText = {
|
||||
displayInSeparateLines = true;
|
||||
maximumWidth = 640;
|
||||
scrolling = {
|
||||
behavior = "alwaysScroll";
|
||||
speed = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
@ -165,4 +252,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user