From badacda762ae4eb1064c6167b4947c4a530949fe Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Fri, 17 Apr 2026 12:40:40 -0400 Subject: [PATCH] add fht compositor --- .../gnome/background.jpg => background.jpg | Bin clients/quadraticpc/dms.nix | 6 ++ clients/quadraticpc/fht-compositor.nix | 98 ++++++++++++++++++ flake.lock | 25 +++++ flake.nix | 8 ++ modules/common/backup.nix | 4 - modules/graphical/gnome/default.nix | 2 +- 7 files changed, 138 insertions(+), 5 deletions(-) rename modules/graphical/gnome/background.jpg => background.jpg (100%) create mode 100644 clients/quadraticpc/dms.nix create mode 100644 clients/quadraticpc/fht-compositor.nix delete mode 100644 modules/common/backup.nix diff --git a/modules/graphical/gnome/background.jpg b/background.jpg similarity index 100% rename from modules/graphical/gnome/background.jpg rename to background.jpg diff --git a/clients/quadraticpc/dms.nix b/clients/quadraticpc/dms.nix new file mode 100644 index 0000000..f45f1df --- /dev/null +++ b/clients/quadraticpc/dms.nix @@ -0,0 +1,6 @@ +{ + programs.dms-shell = { + enable = true; + systemd.enable = false; + }; +} diff --git a/clients/quadraticpc/fht-compositor.nix b/clients/quadraticpc/fht-compositor.nix new file mode 100644 index 0000000..c65e212 --- /dev/null +++ b/clients/quadraticpc/fht-compositor.nix @@ -0,0 +1,98 @@ +{ inputs, pkgs, ... }: +{ + imports = [ inputs.fht-compositor.nixosModules.default ]; + programs.fht-compositor = + let + config = { + autostart = [ "dms run" ]; + + general = { + focus-follows-mouse = true; + inner-gaps = 10; + outer-gaps = 30; + }; + + decorations = { + border = { + thickness = 4; + radius = 12; + }; + blur.disable = true; + }; + + keybinds = { + Alt-Tab = "focus-next-window"; + Super-f = "fullscreen-focused-window"; + Super-Ctrl-q = "quit"; + Super-Ctrl-r = "reload-config"; + Super-t = { + action = "run-command"; + arg = "ptyxis"; + }; + + Super-Down = { + action = "change-window-proportion"; + arg = 0.5; + }; + Super-Up = { + action = "change-window-proportion"; + arg = -0.5; + }; + Super-Left = { + action = "change-mwfact"; + arg = -0.1; + }; + Super-Right = { + action = "change-mwfact"; + arg = 0.1; + }; + + keybindings = builtins.listToAttrs ( + builtins.genList (i: { + name = "Super-${toString (i + 1)}"; + value = { + action = "focus-workspace"; + arg = i; + }; + }) 9 + ); + }; + + mousebinds = { + Super-Left = "swap-tile"; + Super-wheeldown = "focus-previous-workspace"; + Super-wheelup = "focus-next-workspace"; + }; + + rules = [ + { + match-app-id = [ ".*" ]; + floating = false; + } + ]; + + outputs = { + HDMI-A-1.position.x = 0; + DP-3.position.x = 1920; + }; + + cursor = { + name = "GoogleDot-Blue"; + size = 24; + }; + }; + in + { + enable = true; + package = + inputs.fht-compositor.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs + (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ]; + + postInstall = (old.postInstall or "") + '' + wrapProgram $out/bin/fht-compositor \ + --add-flags "-c ${(pkgs.formats.toml { }).generate "config.toml" config}" + ''; + }); + }; +} diff --git a/flake.lock b/flake.lock index b2f1364..174c817 100644 --- a/flake.lock +++ b/flake.lock @@ -665,6 +665,30 @@ "type": "github" } }, + "fht-compositor": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": [] + }, + "locked": { + "lastModified": 1776249126, + "narHash": "sha256-67QnaoJmncKx4Xj+TrnZ1qGjrE4lhTTYb51bWAuHAjM=", + "owner": "nferhat", + "repo": "fht-compositor", + "rev": "a6a03db175083749889dbcc0ab1e53fbc4e5d191", + "type": "github" + }, + "original": { + "owner": "nferhat", + "repo": "fht-compositor", + "type": "github" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -2656,6 +2680,7 @@ "continuwuity": "continuwuity", "cozybot": "cozybot", "disko": "disko", + "fht-compositor": "fht-compositor", "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_3", "gnome-mobile": "gnome-mobile", diff --git a/flake.nix b/flake.nix index 00c6f82..1359db8 100755 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,14 @@ url = "github:Henry-Hiles/dotfiles-fork"; inputs.nixpkgs.follows = "nixpkgs"; }; + fht-compositor = { + url = "github:nferhat/fht-compositor"; + inputs = { + nixpkgs.follows = "nixpkgs"; + rust-overlay.follows = ""; + flake-parts.follows = "flake-parts"; + }; + }; }; outputs = diff --git a/modules/common/backup.nix b/modules/common/backup.nix deleted file mode 100644 index ccbf66c..0000000 --- a/modules/common/backup.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ inputs, ... }: -{ - environment.etc."backup".source = inputs.self; -} diff --git a/modules/graphical/gnome/default.nix b/modules/graphical/gnome/default.nix index 9c559de..e3ea322 100644 --- a/modules/graphical/gnome/default.nix +++ b/modules/graphical/gnome/default.nix @@ -14,7 +14,7 @@ ]; background = rec { - picture-uri = "file://${./background.jpg}"; + picture-uri = "file://${../../../background.jpg}"; picture-uri-dark = picture-uri; };