current
linted
This commit is contained in:
parent
4e99a0e323
commit
7485de646a
95 changed files with 2743 additions and 2282 deletions
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) range mapAttrsToList;
|
||||
inherit (builtins) toString;
|
||||
workspaceRange = range 1 6;
|
||||
makeWorkspaceBinding = modifiers: action:
|
||||
makeWorkspaceBinding =
|
||||
modifiers: action:
|
||||
map (i: {
|
||||
inherit modifiers;
|
||||
key = toString i;
|
||||
|
@ -14,10 +15,9 @@
|
|||
type = action;
|
||||
data = i;
|
||||
};
|
||||
})
|
||||
workspaceRange;
|
||||
focusWsBindings = makeWorkspaceBinding ["Super"] "Workspace";
|
||||
moveWsBindings = makeWorkspaceBinding ["Super" "Shift"] "SendToWorkspace";
|
||||
}) workspaceRange;
|
||||
focusWsBindings = makeWorkspaceBinding [ "Super" ] "Workspace";
|
||||
moveWsBindings = makeWorkspaceBinding [ "Super" "Shift" ] "SendToWorkspace";
|
||||
|
||||
hjkl = {
|
||||
"h" = "Left";
|
||||
|
@ -27,24 +27,18 @@
|
|||
# "i" = "In";
|
||||
# "u" = "Out";
|
||||
};
|
||||
makeDirBinding = modifiers: action:
|
||||
mapAttrsToList (
|
||||
key: dir: {
|
||||
inherit key modifiers;
|
||||
action = {
|
||||
type = action;
|
||||
data = dir;
|
||||
};
|
||||
}
|
||||
)
|
||||
hjkl;
|
||||
focusBindings = makeDirBinding ["Super"] "Focus";
|
||||
moveBindings = makeDirBinding ["Super" "Shift"] "Move";
|
||||
winManagementBindings =
|
||||
focusWsBindings
|
||||
++ moveWsBindings
|
||||
++ focusBindings
|
||||
++ moveBindings;
|
||||
makeDirBinding =
|
||||
modifiers: action:
|
||||
mapAttrsToList (key: dir: {
|
||||
inherit key modifiers;
|
||||
action = {
|
||||
type = action;
|
||||
data = dir;
|
||||
};
|
||||
}) hjkl;
|
||||
focusBindings = makeDirBinding [ "Super" ] "Focus";
|
||||
moveBindings = makeDirBinding [ "Super" "Shift" ] "Move";
|
||||
winManagementBindings = focusWsBindings ++ moveWsBindings ++ focusBindings ++ moveBindings;
|
||||
binding = key: modifiers: action: {
|
||||
inherit key modifiers action;
|
||||
};
|
||||
|
@ -62,97 +56,96 @@
|
|||
data = action;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../util/cosmic.nix
|
||||
];
|
||||
config.cosmic = {
|
||||
enable = true;
|
||||
defaultKeybindings = false;
|
||||
keybindings =
|
||||
winManagementBindings
|
||||
++ [
|
||||
# System bindings appear broken?
|
||||
(binding "q" ["Super" "Shift"] "Close")
|
||||
(binding "w" ["Super"] "ToggleStacking")
|
||||
(binding "s" ["Super"] "ToggleOrientation")
|
||||
(binding "space" ["Super"] "ToggleWindowFloating")
|
||||
(binding "space" ["Super" "Shift"] "Maximize")
|
||||
(binding "minus" ["Super"] "Minimize")
|
||||
(binding "r" ["Super"] {
|
||||
type = "Resizing";
|
||||
data = "Outwards";
|
||||
})
|
||||
(binding "r" ["Super" "Shift"] {
|
||||
type = "Resizing";
|
||||
data = "Inwards";
|
||||
})
|
||||
(binding "tab" ["Super"] "NextOutput")
|
||||
(binding "tab" ["Super" "Shift"] "MoveToNextOutput")
|
||||
(binding "grave" ["Super"] "PreviousOutput")
|
||||
(binding "grave" ["Super" "Shift"] "MoveToPreviousOutput")
|
||||
(spawnBinding "equal" ["Super"] "keepassxc")
|
||||
(systemBinding "f" ["Super"] "WebBrowser")
|
||||
# my mime handling is fucked
|
||||
# (systemBinding "e" ["Super"] "HomeFolder")
|
||||
# (systemBinding "return" ["Super"] "Terminal")
|
||||
(spawnBinding "return" ["Super"] "kitty")
|
||||
# (systemBinding "s" ["Super" "Shift"] "Screenshot")
|
||||
(systemBinding null ["Super"] "Launcher")
|
||||
(systemBinding "d" ["Super"] "AppLibrary")
|
||||
(systemBinding "XF86AudioRaiseVolume" [] "VolumeRaise")
|
||||
(systemBinding "XF86AudioLowerVolume" [] "VolumeLower")
|
||||
(systemBinding "XF86AudioMute" [] "Mute")
|
||||
(spawnBinding "XF86AudioNext" [] "playerctl next")
|
||||
(spawnBinding "XF86AudioPrev" [] "playerctl previous")
|
||||
(spawnBinding "XF86AudioPlay" [] "playerctl play-pause")
|
||||
(spawnBinding "XF86AudioStop" [] "playerctl stop")
|
||||
(systemBinding "XF86MonBrightnessUp" [] "BrightnessUp")
|
||||
(systemBinding "XF86MonBrightnessDown" [] "BrightnessDown")
|
||||
(spawnBinding "e" ["Super" "Shift"] "wlogout")
|
||||
keybindings = winManagementBindings ++ [
|
||||
# System bindings appear broken?
|
||||
(binding "q" [ "Super" "Shift" ] "Close")
|
||||
(binding "w" [ "Super" ] "ToggleStacking")
|
||||
(binding "s" [ "Super" ] "ToggleOrientation")
|
||||
(binding "space" [ "Super" ] "ToggleWindowFloating")
|
||||
(binding "space" [ "Super" "Shift" ] "Maximize")
|
||||
(binding "minus" [ "Super" ] "Minimize")
|
||||
(binding "r" [ "Super" ] {
|
||||
type = "Resizing";
|
||||
data = "Outwards";
|
||||
})
|
||||
(binding "r" [ "Super" "Shift" ] {
|
||||
type = "Resizing";
|
||||
data = "Inwards";
|
||||
})
|
||||
(binding "tab" [ "Super" ] "NextOutput")
|
||||
(binding "tab" [ "Super" "Shift" ] "MoveToNextOutput")
|
||||
(binding "grave" [ "Super" ] "PreviousOutput")
|
||||
(binding "grave" [ "Super" "Shift" ] "MoveToPreviousOutput")
|
||||
(spawnBinding "equal" [ "Super" ] "keepassxc")
|
||||
(systemBinding "f" [ "Super" ] "WebBrowser")
|
||||
# my mime handling is fucked
|
||||
# (systemBinding "e" ["Super"] "HomeFolder")
|
||||
# (systemBinding "return" ["Super"] "Terminal")
|
||||
(spawnBinding "return" [ "Super" ] "kitty")
|
||||
# (systemBinding "s" ["Super" "Shift"] "Screenshot")
|
||||
(systemBinding null [ "Super" ] "Launcher")
|
||||
(systemBinding "d" [ "Super" ] "AppLibrary")
|
||||
(systemBinding "XF86AudioRaiseVolume" [ ] "VolumeRaise")
|
||||
(systemBinding "XF86AudioLowerVolume" [ ] "VolumeLower")
|
||||
(systemBinding "XF86AudioMute" [ ] "Mute")
|
||||
(spawnBinding "XF86AudioNext" [ ] "playerctl next")
|
||||
(spawnBinding "XF86AudioPrev" [ ] "playerctl previous")
|
||||
(spawnBinding "XF86AudioPlay" [ ] "playerctl play-pause")
|
||||
(spawnBinding "XF86AudioStop" [ ] "playerctl stop")
|
||||
(systemBinding "XF86MonBrightnessUp" [ ] "BrightnessUp")
|
||||
(systemBinding "XF86MonBrightnessDown" [ ] "BrightnessDown")
|
||||
(spawnBinding "e" [ "Super" "Shift" ] "wlogout")
|
||||
|
||||
# old, pre-System bindings
|
||||
# (binding "q" ["Super" "Shift"] "Close")
|
||||
# (binding "w" ["Super"] "ToggleStacking")
|
||||
# (binding "s" ["Super"] "ToggleOrientation")
|
||||
# (binding "space" ["Super"] "ToggleWindowFloating")
|
||||
# (binding "space" ["Super" "Shift"] "Maximize")
|
||||
# (binding "minus" ["Super"] "Minimize")
|
||||
# (binding "r" ["Super"] {
|
||||
# type = "Resizing";
|
||||
# data = "Outwards";
|
||||
# })
|
||||
# (binding "r" ["Super" "Shift"] {
|
||||
# type = "Resizing";
|
||||
# data = "Inwards";
|
||||
# })
|
||||
# (binding "tab" ["Super"] "NextOutput")
|
||||
# (binding "tab" ["Super" "Shift"] "MoveToNextOutput")
|
||||
# (binding "grave" ["Super"] "PreviousOutput")
|
||||
# (binding "grave" ["Super" "Shift"] "MoveToPreviousOutput")
|
||||
# (spawnBinding "f" ["Super"] "firefox")
|
||||
(spawnBinding "e" ["Super"] "nautilus")
|
||||
# (spawnBinding "equal" ["Super"] "keepassxc")
|
||||
# (spawnBinding "return" ["Super"] "kitty")
|
||||
(spawnBinding "s" ["Super" "Shift"] "cosmic-screenshot")
|
||||
# (spawnBinding null ["Super"] "cosmic-launcher")
|
||||
# (spawnBinding "d" ["Super"] "cosmic-app-library")
|
||||
# (spawnBinding "XF86AudioRaiseVolume" [] "amixer sset Master 5%+")
|
||||
# (spawnBinding "XF86AudioLowerVolume" [] "amixer sset Master 5%-")
|
||||
# (spawnBinding "XF86AudioMute" [] "amixer sset Master toggle")
|
||||
# (spawnBinding "XF86AudioNext" [] "playerctl next")
|
||||
# (spawnBinding "XF86AudioPrev" [] "playerctl previous")
|
||||
# (spawnBinding "XF86AudioPlay" [] "playerctl play-pause")
|
||||
# (spawnBinding "XF86AudioStop" [] "playerctl stop")
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessUp" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon IncreaseDisplayBrightness"
|
||||
# )
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessDown" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon DecreaseDisplayBrightness"
|
||||
# )
|
||||
# (spawnBinding "e" ["Super" "Shift"] "wlogout")
|
||||
];
|
||||
# old, pre-System bindings
|
||||
# (binding "q" ["Super" "Shift"] "Close")
|
||||
# (binding "w" ["Super"] "ToggleStacking")
|
||||
# (binding "s" ["Super"] "ToggleOrientation")
|
||||
# (binding "space" ["Super"] "ToggleWindowFloating")
|
||||
# (binding "space" ["Super" "Shift"] "Maximize")
|
||||
# (binding "minus" ["Super"] "Minimize")
|
||||
# (binding "r" ["Super"] {
|
||||
# type = "Resizing";
|
||||
# data = "Outwards";
|
||||
# })
|
||||
# (binding "r" ["Super" "Shift"] {
|
||||
# type = "Resizing";
|
||||
# data = "Inwards";
|
||||
# })
|
||||
# (binding "tab" ["Super"] "NextOutput")
|
||||
# (binding "tab" ["Super" "Shift"] "MoveToNextOutput")
|
||||
# (binding "grave" ["Super"] "PreviousOutput")
|
||||
# (binding "grave" ["Super" "Shift"] "MoveToPreviousOutput")
|
||||
# (spawnBinding "f" ["Super"] "firefox")
|
||||
(spawnBinding "e" [ "Super" ] "nautilus")
|
||||
# (spawnBinding "equal" ["Super"] "keepassxc")
|
||||
# (spawnBinding "return" ["Super"] "kitty")
|
||||
(spawnBinding "s" [ "Super" "Shift" ] "cosmic-screenshot")
|
||||
# (spawnBinding null ["Super"] "cosmic-launcher")
|
||||
# (spawnBinding "d" ["Super"] "cosmic-app-library")
|
||||
# (spawnBinding "XF86AudioRaiseVolume" [] "amixer sset Master 5%+")
|
||||
# (spawnBinding "XF86AudioLowerVolume" [] "amixer sset Master 5%-")
|
||||
# (spawnBinding "XF86AudioMute" [] "amixer sset Master toggle")
|
||||
# (spawnBinding "XF86AudioNext" [] "playerctl next")
|
||||
# (spawnBinding "XF86AudioPrev" [] "playerctl previous")
|
||||
# (spawnBinding "XF86AudioPlay" [] "playerctl play-pause")
|
||||
# (spawnBinding "XF86AudioStop" [] "playerctl stop")
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessUp" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon IncreaseDisplayBrightness"
|
||||
# )
|
||||
# (
|
||||
# spawnBinding "XF86MonBrightnessDown" []
|
||||
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon DecreaseDisplayBrightness"
|
||||
# )
|
||||
# (spawnBinding "e" ["Super" "Shift"] "wlogout")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue