Compare commits

..

No commits in common. "4d23af8e34982b33103294eac9838f556766150c" and "5162143ca7192fba72f514823180c94dff41f7b6" have entirely different histories.

3 changed files with 13 additions and 40 deletions

View file

@ -63,7 +63,7 @@
__findFile = _: p: ./${p}; __findFile = _: p: ./${p};
ls = path: map (f: "${path}/${f}") ( findFiles = path: map (f: "${path}/${f}") (
builtins.filter (i: builtins.readFileType "${path}/${i}" == "regular") ( builtins.filter (i: builtins.readFileType "${path}/${i}" == "regular") (
builtins.attrNames (builtins.readDir path) builtins.attrNames (builtins.readDir path)
) )
@ -104,12 +104,12 @@
# HM config. # HM config.
./home/NixOs.nix ./home/NixOs.nix
] ]
++ (self.ls ./container) ++ (self.findFiles ./container)
++ (self.ls ./host/${system}/${hostname}) ++ (self.findFiles ./host/${system}/${hostname})
++ (self.ls ./option) ++ (self.findFiles ./option)
++ (self.ls ./config) ++ (self.findFiles ./config)
++ (self.ls ./overlay) ++ (self.findFiles ./overlay)
++ (self.ls ./system) ++ (self.findFiles ./system)
; ;
specialArgs = let specialArgs = let
pkgs = nixpkgs.legacyPackages.${system}.pkgs; pkgs = nixpkgs.legacyPackages.${system}.pkgs;
@ -148,7 +148,7 @@
{ home-manager.config.stylix.autoEnable = lib.mkForce false; } { home-manager.config.stylix.autoEnable = lib.mkForce false; }
./home/Android.nix ./home/Android.nix
] ]
++ (self.ls ./option) ++ (self.findFiles ./option)
; ;
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs self pkgsMaster pkgsUnstable; inherit inputs self pkgsMaster pkgsUnstable;

View file

@ -64,25 +64,16 @@
block = true; block = true;
run = openWith "radare2 -c V -w"; run = openWith "radare2 -c V -w";
}]; }];
picture = [{ image = [{
desc = "Picture"; desc = "Image";
orphan = true; orphan = true;
run = openWith "loupe"; run = openWith "loupe";
}]; }];
picture_edit = [{ image_edit = [{
desc = "Picture Edit"; desc = "Image Edit";
orphan = true; orphan = true;
run = openWith "gimp"; run = openWith "gimp";
}]; }];
picture_edit_quick = [{
desc = "Picture Quick Edit";
orphan = true;
run = openWith "pic_edit";
}];
picture_copy = [{
desc = "Picture Copy";
run = openWith "pic_copy";
}];
mount = [{ mount = [{
desc = "Mount"; desc = "Mount";
run = openWith "fmount"; run = openWith "fmount";
@ -142,7 +133,7 @@
(mkMime "application/pdf" [ "pdf" ]) (mkMime "application/pdf" [ "pdf" ])
(mkMime "audio/*" [ "audio" ]) (mkMime "audio/*" [ "audio" ])
(mkName "*.mka" [ "audio" ]) (mkName "*.mka" [ "audio" ])
(mkMime "image/*" [ "picture" "picture_copy" "picture_edit" "picture_edit_quick" ]) (mkMime "image/*" [ "image" "image_edit" ])
(mkMime "video/*" [ "video" ]) (mkMime "video/*" [ "video" ])
(mkMime "text/html" [ "browser" ]) (mkMime "text/html" [ "browser" ])
(mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ]) (mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ])

View file

@ -1,18 +0,0 @@
{ ... }: {
text = ''
# Quick edit a picture and copy to clipboard.
# Usage: pic_copy <FILE>
function pic_copy() {
swappy -f "''${1}" -o - | copy
}
# Quick edit a pictures inplace.
# Usage: pic_edit <FILES>
function pic_edit() {
local IFS=$'\n'
for file in "''${@}"; do
swappy -f "''${file}" -o "''${file}"
done
}
'';
}