diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-01 03:45:58 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-01 03:45:58 +0200 |
commit | 71b70ecb3a3772c60948a433ee1dead366cef404 (patch) | |
tree | 728f1c85c1ea2e582f63b05568cf88e5a8a18d91 | |
parent | 528ef530c041bb45d444d4f1cd48058056f307b2 (diff) | |
download | nixos-configuration-71b70ecb3a3772c60948a433ee1dead366cef404.tar.gz nixos-configuration-71b70ecb3a3772c60948a433ee1dead366cef404.tar.bz2 nixos-configuration-71b70ecb3a3772c60948a433ee1dead366cef404.zip |
chore: attach binds to common variables filefeature-commons
-rw-r--r-- | common/variables.nix | 12 | ||||
-rw-r--r-- | home-manager/stvnliu/hypr/hyprland/binds.nix | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/common/variables.nix b/common/variables.nix index f4af0f1..ddada2f 100644 --- a/common/variables.nix +++ b/common/variables.nix @@ -10,7 +10,11 @@ in { # Type definitions for nix variables used in this configuration options = with lib; with types; { - defaultApplications = {fileManager = mkOption {type = str;};}; + defaultApplications = { + fileManager = mkOption {type = str;}; + appLauncher = mkOption {type = str;}; + terminal = mkOption {type = str;}; + }; myWallPaperPath = mkOption {type = path;}; myUserName = mkOption {type = str;}; myHostName = mkOption {type = str;}; @@ -45,6 +49,10 @@ in { "${pkgs.pa-notify}/bin/pa-notify" "${pkgs.networkmanagerapplet}/bin/nm-applet" ]; - defaultApplications.fileManager = "${pkgs.nemo}/bin/nemo"; + defaultApplications = { + terminal = "${pkgs.foot}/bin/footclient"; + fileManager = "${pkgs.nemo}/bin/nemo"; + appLauncher = "${pkgs.walker}/bin/walker"; + }; }; } diff --git a/home-manager/stvnliu/hypr/hyprland/binds.nix b/home-manager/stvnliu/hypr/hyprland/binds.nix index 692a2f2..e02c08b 100644 --- a/home-manager/stvnliu/hypr/hyprland/binds.nix +++ b/home-manager/stvnliu/hypr/hyprland/binds.nix @@ -1,11 +1,9 @@ { config, pkgs, - lib, ... }: let - terminalCmd = "${pkgs.foot}/bin/footclient"; - appLauncherCmd = "${pkgs.walker}/bin/walker"; + terminalCmd = config.defaultApplications.terminal; screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png"; in [ @@ -22,7 +20,7 @@ in # keysyms for util functions # Example volume button that allows press and hold, volume limited to 150% "$mod, Q, killactive" - "$mod, D, exec, ${appLauncherCmd}" + "$mod, D, exec, ${config.defaultApplications.appLauncher}" "$mod, F, fullscreen" "$mod, E, exec, ${config.defaultApplications.fileManager}" # foot terminal |