feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -1,13 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
];
|
||||
imports = [ ../profiles/wayland-desktop.nix ];
|
||||
|
||||
services = {
|
||||
gnome-keyring.enable = false;
|
||||
|
@ -25,85 +18,83 @@ in {
|
|||
|
||||
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
dconf.settings = let
|
||||
manualKeybindings = [
|
||||
{
|
||||
binding = "Print";
|
||||
command = "flameshot gui";
|
||||
name = "flameshot";
|
||||
}
|
||||
dconf.settings =
|
||||
let
|
||||
manualKeybindings = [
|
||||
{
|
||||
binding = "Print";
|
||||
command = "flameshot gui";
|
||||
name = "flameshot";
|
||||
}
|
||||
|
||||
{
|
||||
binding = "<Super>t";
|
||||
command = "alacritty";
|
||||
name = "alacritty";
|
||||
}
|
||||
];
|
||||
{
|
||||
binding = "<Super>t";
|
||||
command = "alacritty";
|
||||
name = "alacritty";
|
||||
}
|
||||
];
|
||||
|
||||
numWorkspaces = 10;
|
||||
customKeybindingBaseName = "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom";
|
||||
customKeybindingsNames =
|
||||
builtins.genList (i: "/${customKeybindingBaseName}${toString i}/")
|
||||
(
|
||||
(builtins.length manualKeybindings)
|
||||
+ numWorkspaces # for sending to the workspace
|
||||
numWorkspaces = 10;
|
||||
customKeybindingBaseName = "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom";
|
||||
customKeybindingsNames = builtins.genList (i: "/${customKeybindingBaseName}${toString i}/") (
|
||||
(builtins.length manualKeybindings) + numWorkspaces # for sending to the workspace
|
||||
);
|
||||
|
||||
workspacesKeyBindingsOffset = builtins.length manualKeybindings;
|
||||
workspacesKeyBindingsOffset = builtins.length manualKeybindings;
|
||||
|
||||
# with this we can make use of all number keys [0-9]
|
||||
mapToNumber = i:
|
||||
if i < 10
|
||||
then i
|
||||
else if i == 10
|
||||
then 0
|
||||
else throw "i exceeds 10: ${i}";
|
||||
in
|
||||
# with this we can make use of all number keys [0-9]
|
||||
mapToNumber =
|
||||
i:
|
||||
if i < 10 then
|
||||
i
|
||||
else if i == 10 then
|
||||
0
|
||||
else
|
||||
throw "i exceeds 10: ${i}";
|
||||
in
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = customKeybindingsNames;
|
||||
screenreader = "@as []";
|
||||
screensaver = ["<Alt><Super>l"];
|
||||
screensaver = [ "<Alt><Super>l" ];
|
||||
};
|
||||
|
||||
# disable the builtin <Super>[1-9] functionality
|
||||
"org/gnome/shell/keybindings" = builtins.listToAttrs ((builtins.genList
|
||||
(i: {
|
||||
name = "switch-to-application-${toString (i + 1)}";
|
||||
value = [];
|
||||
})
|
||||
numWorkspaces)
|
||||
"org/gnome/shell/keybindings" = builtins.listToAttrs (
|
||||
(builtins.genList (i: {
|
||||
name = "switch-to-application-${toString (i + 1)}";
|
||||
value = [ ];
|
||||
}) numWorkspaces)
|
||||
++ [
|
||||
{
|
||||
name = "toggle-overview";
|
||||
value = [];
|
||||
value = [ ];
|
||||
}
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
# remap it to switching to the workspaces
|
||||
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "switch-to-workspace-${toString (i + 1)}";
|
||||
value = [
|
||||
"<Super>${toString (mapToNumber (i + 1))}"
|
||||
];
|
||||
})
|
||||
numWorkspaces);
|
||||
value = [ "<Super>${toString (mapToNumber (i + 1))}" ];
|
||||
}) numWorkspaces
|
||||
);
|
||||
}
|
||||
// builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
// builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "${customKeybindingBaseName}${toString i}";
|
||||
value = builtins.elemAt manualKeybindings i;
|
||||
})
|
||||
(builtins.length manualKeybindings))
|
||||
// builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
}) (builtins.length manualKeybindings)
|
||||
)
|
||||
// builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "${customKeybindingBaseName}${toString (workspacesKeyBindingsOffset + i)}";
|
||||
value = {
|
||||
binding = "<Control><Super>${toString (mapToNumber (i + 1))}";
|
||||
command = "wmctrl -r :ACTIVE: -t ${toString i}";
|
||||
name = "Send to workspace ${toString (i + 1)}";
|
||||
};
|
||||
})
|
||||
numWorkspaces);
|
||||
}) numWorkspaces
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue