fix hoem manager config access
This commit is contained in:
parent
971d997920
commit
7dfa665b73
7 changed files with 79 additions and 51 deletions
|
|
@ -1,6 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.ringofstorms.dePlasma;
|
cfg = osConfig.ringofstorms.dePlasma;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
delayMs = cfg.monitors.scriptDelayMs;
|
delayMs = cfg.monitors.scriptDelayMs;
|
||||||
script = pkgs.writeShellScriptBin "plasma-kscreen-overrides" ''
|
script = pkgs.writeShellScriptBin "plasma-kscreen-overrides" ''
|
||||||
|
|
@ -10,7 +15,7 @@ let
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {};
|
options = { };
|
||||||
config = mkIf (cfg.enable && cfg.monitors.enableOverrides && cfg.monitors.commands != [ ]) {
|
config = mkIf (cfg.enable && cfg.monitors.enableOverrides && cfg.monitors.commands != [ ]) {
|
||||||
# Use XDG autostart
|
# Use XDG autostart
|
||||||
xdg.autostart."ringofstorms-kscreen-overrides" = {
|
xdg.autostart."ringofstorms-kscreen-overrides" = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
./shortcuts.nix
|
./shortcuts.nix
|
||||||
./panel.nix
|
./panel.nix
|
||||||
./theme.nix
|
./theme.nix
|
||||||
./polkit.nix
|
|
||||||
./autostart.nix
|
./autostart.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,28 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.ringofstorms.dePlasma;
|
cfg = osConfig.ringofstorms.dePlasma;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
mkPanel = {
|
mkPanel =
|
||||||
location ? cfg.panel.location,
|
{
|
||||||
height ? cfg.panel.height,
|
location ? cfg.panel.location,
|
||||||
opacity ? cfg.panel.opacity,
|
height ? cfg.panel.height,
|
||||||
widgets ? cfg.panel.widgets
|
opacity ? cfg.panel.opacity,
|
||||||
}: {
|
widgets ? cfg.panel.widgets,
|
||||||
location = location;
|
}:
|
||||||
height = height;
|
{
|
||||||
opacity = opacity;
|
location = location;
|
||||||
widgets = widgets;
|
height = height;
|
||||||
};
|
opacity = opacity;
|
||||||
|
widgets = widgets;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {};
|
options = { };
|
||||||
config = mkIf (cfg.enable && cfg.panel.enabled) {
|
config = mkIf (cfg.enable && cfg.panel.enabled) {
|
||||||
programs.plasma.panels = [ (mkPanel {}) ];
|
programs.plasma.panels = [ (mkPanel { }) ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ osConfig, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.ringofstorms.dePlasma;
|
cfg = osConfig.ringofstorms.dePlasma;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
# Plasma ships polkit-agent in its session; keep placeholder for parity
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +1,56 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ osConfig, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.ringofstorms.dePlasma;
|
cfg = osConfig.ringofstorms.dePlasma;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
workspaces = builtins.genList (i: i + 1) 9;
|
workspaces = builtins.genList (i: i + 1) 9;
|
||||||
kwinWorkspace = builtins.listToAttrs (map (i: {
|
kwinWorkspace = builtins.listToAttrs (
|
||||||
name = "Switch to Desktop ${toString i}";
|
map (i: {
|
||||||
value = "Meta+${toString i}";
|
name = "Switch to Desktop ${toString i}";
|
||||||
}) workspaces);
|
value = "Meta+${toString i}";
|
||||||
kwinMoveWorkspace = builtins.listToAttrs (map (i: {
|
}) workspaces
|
||||||
name = "Window to Desktop ${toString i}";
|
);
|
||||||
value = "Meta+Shift+${toString i}";
|
kwinMoveWorkspace = builtins.listToAttrs (
|
||||||
}) workspaces);
|
map (i: {
|
||||||
krunnerShortcut = if cfg.shortcuts.launcher == "krunner" then {
|
name = "Window to Desktop ${toString i}";
|
||||||
krunner = { "Run Command" = "Meta+Space"; };
|
value = "Meta+Shift+${toString i}";
|
||||||
} else { };
|
}) workspaces
|
||||||
|
);
|
||||||
|
krunnerShortcut =
|
||||||
|
if cfg.shortcuts.launcher == "krunner" then
|
||||||
|
{
|
||||||
|
krunner = {
|
||||||
|
"Run Command" = "Meta+Space";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {};
|
options = { };
|
||||||
config = mkIf (cfg.enable && cfg.shortcuts.useI3Like) {
|
config = mkIf (cfg.enable && cfg.shortcuts.useI3Like) {
|
||||||
programs.plasma.shortcuts =
|
programs.plasma.shortcuts = (
|
||||||
({
|
{
|
||||||
kwin = ({ "Close Window" = cfg.shortcuts.closeWindow; } // kwinWorkspace // kwinMoveWorkspace);
|
kwin = ({ "Close Window" = cfg.shortcuts.closeWindow; } // kwinWorkspace // kwinMoveWorkspace);
|
||||||
} // krunnerShortcut);
|
}
|
||||||
|
// krunnerShortcut
|
||||||
|
);
|
||||||
|
|
||||||
programs.plasma.hotkeys.commands = {
|
programs.plasma.hotkeys.commands = {
|
||||||
ringofstorms_terminal = {
|
ringofstorms_terminal = {
|
||||||
key = "Meta+Return";
|
key = "Meta+Return";
|
||||||
command = cfg.shortcuts.terminal;
|
command = cfg.shortcuts.terminal;
|
||||||
};
|
};
|
||||||
} // (if cfg.shortcuts.launcher == "rofi" then {
|
}
|
||||||
ringofstorms_launcher = {
|
// (
|
||||||
key = "Meta+Space";
|
if cfg.shortcuts.launcher == "rofi" then
|
||||||
command = "rofi -show drun";
|
{
|
||||||
};
|
ringofstorms_launcher = {
|
||||||
} else {});
|
key = "Meta+Space";
|
||||||
|
command = "rofi -show drun";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ }
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.ringofstorms.dePlasma;
|
cfg = osConfig.ringofstorms.dePlasma;
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {};
|
options = { };
|
||||||
config = mkIf (cfg.enable && cfg.appearance.dark.enable) {
|
config = mkIf (cfg.enable && cfg.appearance.dark.enable) {
|
||||||
programs.plasma = {
|
programs.plasma = {
|
||||||
workspace = {
|
workspace = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue