cleanup/style changes + tweaks + ideas
This commit is contained in:
parent
c6231ec13a
commit
0c25328d6f
8 changed files with 71 additions and 87 deletions
|
@ -2,51 +2,7 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
# possible actions:
|
||||
# -----------------
|
||||
# Terminate,
|
||||
# Debug,
|
||||
# Close,
|
||||
# Escape,
|
||||
# Workspace(u8),
|
||||
# NextWorkspace,
|
||||
# PreviousWorkspace,
|
||||
# LastWorkspace,
|
||||
# MoveToWorkspace(u8),
|
||||
# MoveToNextWorkspace,
|
||||
# MoveToPreviousWorkspace,
|
||||
# MoveToLastWorkspace,
|
||||
# SendToWorkspace(u8),
|
||||
# SendToNextWorkspace,
|
||||
# SendToPreviousWorkspace,
|
||||
# SendToLastWorkspace,
|
||||
# NextOutput,
|
||||
# PreviousOutput,
|
||||
# MoveToNextOutput,
|
||||
# MoveToPreviousOutput,
|
||||
# SendToNextOutput,
|
||||
# SendToPreviousOutput,
|
||||
# SwitchOutput(Direction),
|
||||
# MoveToOutput(Direction),
|
||||
# SendToOutput(Direction),
|
||||
# MigrateWorkspaceToNextOutput,
|
||||
# MigrateWorkspaceToPreviousOutput,
|
||||
# MigrateWorkspaceToOutput(Direction),
|
||||
# Focus(FocusDirection),
|
||||
# Move(Direction),
|
||||
# ToggleOrientation,
|
||||
# Orientation(crate::shell::layout::Orientation),
|
||||
# ToggleStacking,
|
||||
# ToggleTiling,
|
||||
# ToggleWindowFloating,
|
||||
# ToggleSticky,
|
||||
# SwapWindow,
|
||||
# Resizing(ResizeDirection),
|
||||
# Minimize,
|
||||
# Maximize,
|
||||
# Spawn(String),
|
||||
let
|
||||
}: let
|
||||
inherit (lib) filterAttrs concatStrings concatStringsSep mapAttrsToList concatLists foldlAttrs concatMapAttrs mapAttrs' nameValuePair boolToString;
|
||||
inherit (builtins) typeOf toString stringLength;
|
||||
|
||||
|
@ -129,6 +85,13 @@ let
|
|||
key_bindings = mapBindings a;
|
||||
data_control_enabled = false;
|
||||
};
|
||||
mapCosmicSettings = application: options:
|
||||
mapAttrs' (k: v:
|
||||
nameValuePair "xdg/cosmic/${application}/v${options.version}/${k}" {
|
||||
enable = true;
|
||||
text = serialise.${typeOf v} v;
|
||||
})
|
||||
options.option;
|
||||
in {
|
||||
options.services.desktopManager.cosmic.keybindings = with lib;
|
||||
mkOption {
|
||||
|
@ -184,12 +147,7 @@ in {
|
|||
}
|
||||
// concatMapAttrs (
|
||||
application: options:
|
||||
mapAttrs' (k: v:
|
||||
nameValuePair "xdg/cosmic/${application}/v${options.version}/${k}" {
|
||||
enable = true;
|
||||
text = serialise.${typeOf v} v;
|
||||
})
|
||||
options.option
|
||||
mapCosmicSettings application options
|
||||
)
|
||||
config.services.desktopManager.cosmic.otherSettings;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue