chore(wm): Fix hyprland keybinds
This commit is contained in:
parent
db861d807a
commit
2c218306b9
6 changed files with 25 additions and 18 deletions
|
|
@ -164,6 +164,8 @@ in {
|
||||||
"vboxusers"
|
"vboxusers"
|
||||||
"video"
|
"video"
|
||||||
"audio"
|
"audio"
|
||||||
|
"scanner"
|
||||||
|
"lp"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{lib, ...}: let
|
let
|
||||||
browserName = config:
|
browserName = config:
|
||||||
if (builtins.isString config.mods.homePackages.browser)
|
if (builtins.isString config.mods.homePackages.browser)
|
||||||
then config.mods.homePackages.browser
|
then config.mods.homePackages.browser
|
||||||
|
|
@ -247,8 +247,8 @@ in {
|
||||||
else {}
|
else {}
|
||||||
)
|
)
|
||||||
|
|
||||||
(mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | wl-copy''] "Take Screenshot")
|
(mkBindWithDesc ["Mod"] "S" "spawn-sh" [''grim -g "$(slurp)" - | wl-copy''] "Take Screenshot")
|
||||||
(mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g \"$(slurp)\" - | satty -f -''] "Take Screenshot and edit")
|
(mkBindWithDesc ["Mod" "Shift"] "S" "spawn-sh" [''grim -g "$(slurp)" - | satty -f -''] "Take Screenshot and edit")
|
||||||
|
|
||||||
(
|
(
|
||||||
if config.mods.scripts.audioControl
|
if config.mods.scripts.audioControl
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
defaultWmConf = import ../../../lib/wm.nix {inherit lib;};
|
defaultWmConf = import ../../../lib/wm.nix;
|
||||||
in {
|
in {
|
||||||
options.mods.hypr.hyprland = {
|
options.mods.hypr.hyprland = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
|
|
@ -137,7 +137,7 @@ in {
|
||||||
if args != []
|
if args != []
|
||||||
then (lib.strings.concatStringsSep " " args)
|
then (lib.strings.concatStringsSep " " args)
|
||||||
else "";
|
else "";
|
||||||
shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat;
|
shouldRepeat = bind: bind ? meta && bind.meta ? hyprland && bind.meta.hyprland ? repeat && bind.meta.hyprland.repeat == true;
|
||||||
|
|
||||||
defaultBinds = cfg:
|
defaultBinds = cfg:
|
||||||
if cfg.mods.wm.useDefaultBinds
|
if cfg.mods.wm.useDefaultBinds
|
||||||
|
|
@ -148,7 +148,7 @@ in {
|
||||||
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
||||||
in
|
in
|
||||||
binds
|
binds
|
||||||
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !hasInvalidCustomCommand bind)
|
|> builtins.filter (bind: bind ? command && shouldRepeat bind && !(hasInvalidCustomCommand bind))
|
||||||
|> builtins.map (
|
|> builtins.map (
|
||||||
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
||||||
);
|
);
|
||||||
|
|
@ -156,7 +156,7 @@ in {
|
||||||
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
binds = cfg.mods.wm.binds ++ defaultBinds cfg;
|
||||||
in
|
in
|
||||||
binds
|
binds
|
||||||
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !hasInvalidCustomCommand bind)
|
|> builtins.filter (bind: bind ? command && !(shouldRepeat bind) && !(hasInvalidCustomCommand bind))
|
||||||
|> builtins.map (
|
|> builtins.map (
|
||||||
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
bind: "${mkMods bind},${bind.key},${mkCommand bind}"
|
||||||
);
|
);
|
||||||
|
|
@ -338,13 +338,13 @@ in {
|
||||||
"noanim, selection"
|
"noanim, selection"
|
||||||
];
|
];
|
||||||
|
|
||||||
workspace = mkDashDefault (mkWorkspace config.mods.wm.workspaces);
|
workspace = mkWorkspace config.mods.wm.workspaces;
|
||||||
monitor = mkDashDefault (mkMonitors config.mods.wm.monitors);
|
monitor = mkMonitors config.mods.wm.monitors;
|
||||||
env = mkDashDefault (mkEnv config);
|
env = mkEnv config;
|
||||||
bind = mkDashDefault (mkBinds config);
|
bind = mkBinds config;
|
||||||
binde = mkDashDefault (mkEBinds config);
|
binde = mkEBinds config;
|
||||||
windowrule = mkDashDefault (mkWindowRule config);
|
windowrule = mkWindowRule config;
|
||||||
exec-once = mkDashDefault (mkAutoStart config);
|
exec-once = mkAutoStart config;
|
||||||
plugin = config.mods.hypr.hyprland.pluginConfig;
|
plugin = config.mods.hypr.hyprland.pluginConfig;
|
||||||
}
|
}
|
||||||
config.mods.hypr.hyprland.customConfig
|
config.mods.hypr.hyprland.customConfig
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
defaultWmConf = import ../../lib/wm.nix {inherit lib;};
|
defaultWmConf = import ../../lib/wm.nix;
|
||||||
in {
|
in {
|
||||||
options.mods.niri = {
|
options.mods.niri = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
|
|
@ -66,7 +66,10 @@ in {
|
||||||
|> lib.strings.concatStringsSep "";
|
|> lib.strings.concatStringsSep "";
|
||||||
mkNiriArg = args:
|
mkNiriArg = args:
|
||||||
if args != []
|
if args != []
|
||||||
then "\"${(lib.strings.concatStringsSep " " args)}\""
|
then let
|
||||||
|
concatCommand = lib.strings.concatStringsSep " " args;
|
||||||
|
validCommand = builtins.replaceStrings [''"''] [''\"''] concatCommand;
|
||||||
|
in "\"${validCommand}\""
|
||||||
else "";
|
else "";
|
||||||
mkNiriCommand = bind: let
|
mkNiriCommand = bind: let
|
||||||
args = bind.args or [];
|
args = bind.args or [];
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@
|
||||||
config = lib.mkIf config.mods.printing.enable (
|
config = lib.mkIf config.mods.printing.enable (
|
||||||
lib.optionalAttrs (options ? services.printing) {
|
lib.optionalAttrs (options ? services.printing) {
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
simple-scan
|
||||||
|
];
|
||||||
|
hardware.sane.enable = true;
|
||||||
services = {
|
services = {
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,6 @@ in {
|
||||||
qemu = {
|
qemu = {
|
||||||
package = mkDashDefault pkgs.qemu_kvm;
|
package = mkDashDefault pkgs.qemu_kvm;
|
||||||
swtpm.enable = mkDashDefault true;
|
swtpm.enable = mkDashDefault true;
|
||||||
ovmf.enable = mkDashDefault true;
|
|
||||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
spiceUSBRedirection.enable = mkDashDefault true;
|
spiceUSBRedirection.enable = mkDashDefault true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue