fix hoem manager config access
This commit is contained in:
parent
971d997920
commit
7dfa665b73
7 changed files with 79 additions and 51 deletions
|
|
@ -1,38 +1,56 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ osConfig, lib, ... }:
|
||||
let
|
||||
cfg = config.ringofstorms.dePlasma;
|
||||
cfg = osConfig.ringofstorms.dePlasma;
|
||||
inherit (lib) mkIf;
|
||||
workspaces = builtins.genList (i: i + 1) 9;
|
||||
kwinWorkspace = builtins.listToAttrs (map (i: {
|
||||
name = "Switch to Desktop ${toString i}";
|
||||
value = "Meta+${toString i}";
|
||||
}) workspaces);
|
||||
kwinMoveWorkspace = builtins.listToAttrs (map (i: {
|
||||
name = "Window to Desktop ${toString i}";
|
||||
value = "Meta+Shift+${toString i}";
|
||||
}) workspaces);
|
||||
krunnerShortcut = if cfg.shortcuts.launcher == "krunner" then {
|
||||
krunner = { "Run Command" = "Meta+Space"; };
|
||||
} else { };
|
||||
kwinWorkspace = builtins.listToAttrs (
|
||||
map (i: {
|
||||
name = "Switch to Desktop ${toString i}";
|
||||
value = "Meta+${toString i}";
|
||||
}) workspaces
|
||||
);
|
||||
kwinMoveWorkspace = builtins.listToAttrs (
|
||||
map (i: {
|
||||
name = "Window to Desktop ${toString i}";
|
||||
value = "Meta+Shift+${toString i}";
|
||||
}) workspaces
|
||||
);
|
||||
krunnerShortcut =
|
||||
if cfg.shortcuts.launcher == "krunner" then
|
||||
{
|
||||
krunner = {
|
||||
"Run Command" = "Meta+Space";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ };
|
||||
in
|
||||
{
|
||||
options = {};
|
||||
options = { };
|
||||
config = mkIf (cfg.enable && cfg.shortcuts.useI3Like) {
|
||||
programs.plasma.shortcuts =
|
||||
({
|
||||
programs.plasma.shortcuts = (
|
||||
{
|
||||
kwin = ({ "Close Window" = cfg.shortcuts.closeWindow; } // kwinWorkspace // kwinMoveWorkspace);
|
||||
} // krunnerShortcut);
|
||||
}
|
||||
// krunnerShortcut
|
||||
);
|
||||
|
||||
programs.plasma.hotkeys.commands = {
|
||||
ringofstorms_terminal = {
|
||||
key = "Meta+Return";
|
||||
command = cfg.shortcuts.terminal;
|
||||
};
|
||||
} // (if cfg.shortcuts.launcher == "rofi" then {
|
||||
ringofstorms_launcher = {
|
||||
key = "Meta+Space";
|
||||
command = "rofi -show drun";
|
||||
};
|
||||
} else {});
|
||||
}
|
||||
// (
|
||||
if cfg.shortcuts.launcher == "rofi" then
|
||||
{
|
||||
ringofstorms_launcher = {
|
||||
key = "Meta+Space";
|
||||
command = "rofi -show drun";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue