summaryrefslogtreecommitdiff
path: root/nix/hm-module.nix
diff options
context:
space:
mode:
authorBossCode45 <human.cyborg42@gmail.com>2024-12-19 15:00:45 +1300
committerBossCode45 <human.cyborg42@gmail.com>2024-12-24 15:56:39 +1300
commitd1d4a63d4473cd4910b678cf5b385f622186fbd3 (patch)
treee6a4a478ad63e29ab12479d88a700238b970ec26 /nix/hm-module.nix
parentc3791254bfb127d64b329098bc792acaa9c30832 (diff)
downloadYATwm-d1d4a63d4473cd4910b678cf5b385f622186fbd3.tar.gz
YATwm-d1d4a63d4473cd4910b678cf5b385f622186fbd3.zip
feat: Added IPC client side to main binary
Updated command line arguments to use `getopt_long' Made it so both -v and --version work Made it so that if you give it non recognised arguments they are sent through the socket to the running window manager if possible.
Diffstat (limited to 'nix/hm-module.nix')
-rw-r--r--nix/hm-module.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix
new file mode 100644
index 0000000..87b47f2
--- /dev/null
+++ b/nix/hm-module.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.xsession.windowManager.YATwm;
+in
+
+{
+ options.xsession.windowManager.YATwm = {
+ enable = mkEnableOption "YATwm";
+ package = mkPackageOption pkgs null { };
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ cfg.package ];
+ xsession.windowManager.command = "${cfg.package}/bin/YATwm";
+ xsession.enable = true;
+ };
+}