ft: hyprland to home manager, mostly
This commit is contained in:
43
modules/desktop/hypr-workspaces.nix
Normal file
43
modules/desktop/hypr-workspaces.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ hyprLib, mainMod, ... }:
|
||||
|
||||
let
|
||||
inherit (hyprLib)
|
||||
bind
|
||||
focusWorkspace
|
||||
moveWorkspace
|
||||
submap
|
||||
makeSubmap
|
||||
;
|
||||
|
||||
mod = a: b: a - (b * (builtins.div a b));
|
||||
in
|
||||
{
|
||||
home-manager.users."djai".wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
(bind "${mainMod} + SHIFT + W" (submap "H") "") # hidden workspaces
|
||||
] ++ builtins.concatLists (builtins.genList (i:
|
||||
let ws = builtins.toJSON (mod i 11);
|
||||
in [
|
||||
(bind "${mainMod} + ${toString i}" (focusWorkspace ws) "Switch to workspace ${toString i}")
|
||||
(bind "${mainMod} + SHIFT + ${toString i} " (moveWorkspace ws false) "Move window to workspace ${toString i}")
|
||||
]
|
||||
) 9);
|
||||
|
||||
define_submap = [
|
||||
(makeSubmap "H" ([
|
||||
["ESCAPE" (submap "reset")]
|
||||
] ++ builtins.concatLists (builtins.genList (i:
|
||||
let ws = i+10;
|
||||
in [
|
||||
[(toString i) (focusWorkspace ws) ""]
|
||||
["SHIFT + ${toString i}" (moveWorkspace ws false)]
|
||||
]) 9)))];
|
||||
|
||||
window_rule = [
|
||||
{ match.class = ".*hideme.*"; workspace = "11 silent";}
|
||||
{ match.title = ".*hideme.*"; workspace = "11 silent";}
|
||||
{ match.class = ".*hideme.*"; no_screen_share = true;}
|
||||
{ match.title = ".*hideme.*"; no_screen_share = true;}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user