aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/cfg/foot.nix23
1 files changed, 22 insertions, 1 deletions
diff --git a/share/cfg/foot.nix b/share/cfg/foot.nix
index 310283c..9786e5e 100644
--- a/share/cfg/foot.nix
+++ b/share/cfg/foot.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
let
cfg = config.programs.foot;
foot-pkg = pkgs.symlinkJoin {
@@ -25,4 +30,20 @@ in
};
};
};
+
+ programs.fish.functions.icat =
+ # TODO: find window manager agnostic way to get current window size
+ lib.mkIf (cfg.enable && config.wayland.windowManager.hyprland.enable) {
+ body = ''
+ set --local width $(hyprctl -j activewindow | jaq '.size[0]')
+ set --local maximgwidth $(math "ceil($width * 0.7)")
+ img2sixel --width $maximgwidth $argv
+ '';
+ };
+
+ home.packages = lib.mkIf cfg.enable (
+ builtins.attrValues {
+ inherit (pkgs) libsixel jaq hyprland;
+ }
+ );
}