yazi updates, misc
This commit is contained in:
parent
8e58c5c986
commit
e9c6a1a6da
12 changed files with 1270 additions and 32 deletions
|
@ -22,9 +22,9 @@
|
||||||
((nix-mode
|
((nix-mode
|
||||||
. ((eglot-workspace-configuration
|
. ((eglot-workspace-configuration
|
||||||
. (:nixd
|
. (:nixd
|
||||||
(:formatting (:command ["alejandra"]))
|
;; (:formatting (:command [ "alejandra" ]))
|
||||||
(:nixpkgs (:expr "import (builtins.getFlake \"/home/emenel/source/nixos-config/\").inputs.nixpkgs { }"))
|
;; (:nixpkgs (:expr "import (builtins.getFlake \"/home/emenel/source/nixos-config\").inputs.nixpkgs { } "))
|
||||||
(:options (:nixos (:expr "(builtins.getFlake \"/home/emenel/source/nixos-config/\").nixosConfigurations.eddie.options"))))))))
|
(:options (:nixos (:expr "(builtins.getFlake \"/home/emenel/source/nixos-config\").nixosConfigurations.eddie.options"))))))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'dir-locals)
|
(provide 'dir-locals)
|
||||||
|
|
57
flake.lock
generated
57
flake.lock
generated
|
@ -42,17 +42,37 @@
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"emacs-lsp-booster": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1716274896,
|
||||||
|
"narHash": "sha256-WsyEkdt8ReGQ40+yV4Cb99A2MEmV0O/i6rmFQura5ww=",
|
||||||
|
"owner": "slotThe",
|
||||||
|
"repo": "emacs-lsp-booster-flake",
|
||||||
|
"rev": "7d110295988fc9bf7fd43bb0cabfbe58a4a5ecf8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "slotThe",
|
||||||
|
"repo": "emacs-lsp-booster-flake",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"emacs-overlay": {
|
"emacs-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740243501,
|
"lastModified": 1740302110,
|
||||||
"narHash": "sha256-F4p3c/8DglyNCYNyF6bRIzTyW4i4TzWDSN6ONxkCRoI=",
|
"narHash": "sha256-rQY2wY+KTGIH2oZFyqdsODjqmOJqyn+0BNURADQHi/s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "f6f9a60d81a5c651e6d0f59153e38f30a6d30063",
|
"rev": "920cd4e86af18bd67a60013d80a79ff2cd7a176b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -302,11 +322,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740265252,
|
"lastModified": 1740318342,
|
||||||
"narHash": "sha256-+LFsCsIUF/pJWL9S21m5NLcK5bgwRB4MwfV0Iu7tggY=",
|
"narHash": "sha256-fjr9+3Iru6O5qE+2oERQkabqAUXx4awm0+i2MBcta1U=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fb568d75cf6c81f30d49eeb73787e9b56454ba16",
|
"rev": "b5ab2c7fdaa807cf425066ab7cd34b073946b1ca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -872,11 +892,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739923778,
|
"lastModified": 1740162160,
|
||||||
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
|
"narHash": "sha256-SSYxFhqCOb3aiPb6MmN68yEzBIltfom8IgRz7phHscM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
|
"rev": "11415c7ae8539d6292f2928317ee7a8410b28bb9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -984,11 +1004,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739866667,
|
"lastModified": 1740126099,
|
||||||
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
"narHash": "sha256-ozoOtE2hGsqh4XkTJFsrTkNxkRgShxpQxDynaPZUGxk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
"rev": "32fb99ba93fea2798be0e997ea331dd78167f814",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1071,6 +1091,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"affinity-nix": "affinity-nix",
|
"affinity-nix": "affinity-nix",
|
||||||
|
"emacs-lsp-booster": "emacs-lsp-booster",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hypridle": "hypridle",
|
"hypridle": "hypridle",
|
||||||
|
@ -1316,11 +1337,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "nix",
|
"dir": "nix",
|
||||||
"lastModified": 1740259252,
|
"lastModified": 1740317044,
|
||||||
"narHash": "sha256-Aoqs7WupQProspwQFLQ4ZfweGgCAA+kBiwy2F9yhkNI=",
|
"narHash": "sha256-s4D7XkF3IgxQWgXtPHe9FzRXKkakTNH2Utp7zNbPT2o=",
|
||||||
"owner": "wez",
|
"owner": "wez",
|
||||||
"repo": "wezterm",
|
"repo": "wezterm",
|
||||||
"rev": "f7db9554f532e12d3cb68b6877d1323e9a3fd6ca",
|
"rev": "4ff581a8aa3460d04f859fdadb50f29b3c507763",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1372,11 +1393,11 @@
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740150522,
|
"lastModified": 1740325055,
|
||||||
"narHash": "sha256-SkH7Zm+ZgvyWpjGyqLq2PKbtxQ7YA2Q8v4OBxp8LbNw=",
|
"narHash": "sha256-zJL60juW5K8NmEYI2BFX3QxEF2LnqNr8xpP+Q57N7to=",
|
||||||
"owner": "sxyazi",
|
"owner": "sxyazi",
|
||||||
"repo": "yazi",
|
"repo": "yazi",
|
||||||
"rev": "52a5ab59e943447c0d6d4e04b7afffc1a4ab23f2",
|
"rev": "36ed32d2c3e6ff58f3cbf88ffefa5f3f0a433974",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -14,6 +14,11 @@
|
||||||
|
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
|
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
|
||||||
|
|
||||||
|
emacs-lsp-booster = {
|
||||||
|
url = "github:slotThe/emacs-lsp-booster-flake";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
yazi = {
|
yazi = {
|
||||||
url = "github:sxyazi/yazi";
|
url = "github:sxyazi/yazi";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -46,11 +51,6 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# audio = {
|
|
||||||
# url = "git+https://gt.emenel.ca/emenel/audio.nix.git";
|
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# };
|
|
||||||
|
|
||||||
wezterm = {
|
wezterm = {
|
||||||
url = "github:wez/wezterm?dir=nix";
|
url = "github:wez/wezterm?dir=nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
GSK_RENDERER = "ngl";
|
GSK_RENDERER = "ngl";
|
||||||
MOZ_ENABLE_WAYLAND = 1;
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
LSP_USE_PLISTS = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 yazi-rs
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,56 @@
|
||||||
|
# mime-ext.yazi
|
||||||
|
|
||||||
|
A mime-type provider based on a file extension database, replacing the [builtin `file(1)`](https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/mime.lua) to speed up mime-type retrieval at the expense of accuracy.
|
||||||
|
|
||||||
|
See https://yazi-rs.github.io/docs/tips#make-yazi-even-faster for more information.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ya pack -a yazi-rs/plugins:mime-ext
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Add this to your `~/.config/yazi/yazi.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[plugin.prepend_fetchers]]
|
||||||
|
id = "mime"
|
||||||
|
name = "*"
|
||||||
|
run = "mime-ext"
|
||||||
|
prio = "high"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Advanced
|
||||||
|
|
||||||
|
You can also customize it in your `~/.config/yazi/init.lua` with:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
require("mime-ext"):setup {
|
||||||
|
-- Expand the existing filename database (lowercase), for example:
|
||||||
|
with_files = {
|
||||||
|
makefile = "text/makefile",
|
||||||
|
-- ...
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Expand the existing extension database (lowercase), for example:
|
||||||
|
with_exts = {
|
||||||
|
mk = "text/makefile",
|
||||||
|
-- ...
|
||||||
|
},
|
||||||
|
|
||||||
|
-- If the mime-type is not in both filename and extension databases,
|
||||||
|
-- then fallback to Yazi's preset `mime` plugin, which uses `file(1)`
|
||||||
|
fallback_file1 = false,
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
- Add more file types (PRs welcome!).
|
||||||
|
- Compress mime-type tables.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
|
1126
homes/emenel/dotfiles/dot_config/yazi/plugins/mime-ext.yazi/main.lua
Normal file
1126
homes/emenel/dotfiles/dot_config/yazi/plugins/mime-ext.yazi/main.lua
Normal file
File diff suppressed because it is too large
Load diff
|
@ -26,8 +26,8 @@
|
||||||
overlays = builtins.attrValues nix-config.overlays ++ [
|
overlays = builtins.attrValues nix-config.overlays ++ [
|
||||||
inputs.niri.overlays.niri
|
inputs.niri.overlays.niri
|
||||||
inputs.emacs-overlay.overlays.default
|
inputs.emacs-overlay.overlays.default
|
||||||
# inputs.audio.overlays.default
|
|
||||||
inputs.nix-rice.overlays.default
|
inputs.nix-rice.overlays.default
|
||||||
|
inputs.emacs-lsp-booster.overlays.default
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
wineWowPackages.stagingFull = nix-config.pkgs-stable.wineWowPackages.stagingFull.overrideAttrs (old: {
|
wineWowPackages.stagingFull = nix-config.pkgs-stable.wineWowPackages.stagingFull.overrideAttrs (old: {
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
transmission_4-gtk
|
transmission_4-gtk
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
clipse
|
clipse
|
||||||
maim
|
|
||||||
wayland-utils
|
wayland-utils
|
||||||
libheif.out
|
libheif.out
|
||||||
rpi-imager
|
rpi-imager
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
nurl
|
nurl
|
||||||
fastfetch
|
fastfetch
|
||||||
nvd
|
nvd
|
||||||
ripgrep-all
|
# ripgrep-all
|
||||||
silver-searcher
|
silver-searcher
|
||||||
powertop
|
powertop
|
||||||
age
|
age
|
||||||
|
@ -64,6 +64,7 @@
|
||||||
manix
|
manix
|
||||||
|
|
||||||
caligula
|
caligula
|
||||||
|
sqlite
|
||||||
|
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
|
@ -86,6 +87,10 @@
|
||||||
marksman
|
marksman
|
||||||
ruff-lsp
|
ruff-lsp
|
||||||
haskell-language-server
|
haskell-language-server
|
||||||
|
emacs-lsp-booster
|
||||||
|
|
||||||
|
zstd
|
||||||
|
|
||||||
|
|
||||||
black
|
black
|
||||||
jsbeautifier
|
jsbeautifier
|
||||||
|
@ -168,6 +173,7 @@
|
||||||
};
|
};
|
||||||
ripgrep = {
|
ripgrep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = (pkgs.ripgrep.override {withPCRE2 = true;});
|
||||||
};
|
};
|
||||||
thefuck = {
|
thefuck = {
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
{ on = "<Enter>"; run = "plugin smart-enter"; desc = "Enter the child directory, or open the file"; }
|
{ on = "<Enter>"; run = "plugin smart-enter"; desc = "Enter the child directory, or open the file"; }
|
||||||
{ on = "<Right>"; run = "plugin smart-enter"; desc = "Enter the child directory, or open the file"; }
|
{ on = "<Right>"; run = "plugin smart-enter"; desc = "Enter the child directory, or open the file"; }
|
||||||
{ on = "<Backspace>"; run = "remove"; }
|
{ on = "<Backspace>"; run = "remove"; }
|
||||||
|
{ on = ["t" "i"]; run = "inspect"; desc = "inspect"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
{ mime = "application/x-7z-compressed"; run = "ouch"; }
|
{ mime = "application/x-7z-compressed"; run = "ouch"; }
|
||||||
{ mime = "application/x-rar"; run = "ouch"; }
|
{ mime = "application/x-rar"; run = "ouch"; }
|
||||||
{ mime = "application/x-xz"; run = "ouch"; }
|
{ mime = "application/x-xz"; run = "ouch"; }
|
||||||
|
{ mime = "application/octet-stream"; run = "ouch"; }
|
||||||
|
|
||||||
{ name = "*"; run = "file-extra-metadata"; }
|
{ name = "*"; run = "file-extra-metadata"; }
|
||||||
{ name = "*.md"; run = "glow"; }
|
{ name = "*.md"; run = "glow"; }
|
||||||
|
@ -76,6 +78,12 @@
|
||||||
{ name = "*"; run = "file-extra-metadata"; }
|
{ name = "*"; run = "file-extra-metadata"; }
|
||||||
];
|
];
|
||||||
prepend_fetchers = [
|
prepend_fetchers = [
|
||||||
|
{
|
||||||
|
id = "mime";
|
||||||
|
name = "*";
|
||||||
|
run = "mime-ext";
|
||||||
|
prio = "high";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
id = "git";
|
id = "git";
|
||||||
name = "*";
|
name = "*";
|
||||||
|
|
|
@ -11,7 +11,7 @@ self: super: {
|
||||||
owner = "openrazer";
|
owner = "openrazer";
|
||||||
repo = "openrazer";
|
repo = "openrazer";
|
||||||
rev = "master";
|
rev = "master";
|
||||||
hash = "sha256-Qon3wDQLxSRuWRl7WSI6CIg7EfEJ+rYJiRKVGwC5b6A=";
|
hash = "sha256-F7lAWM/14texc1PVhch5R2oztcfkoub/9oGdjEmtTZ8=";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ self: super: {
|
||||||
owner = "openrazer";
|
owner = "openrazer";
|
||||||
repo = "openrazer";
|
repo = "openrazer";
|
||||||
rev = "master";
|
rev = "master";
|
||||||
hash = "sha256-Qon3wDQLxSRuWRl7WSI6CIg7EfEJ+rYJiRKVGwC5b6A=";
|
hash = "sha256-F7lAWM/14texc1PVhch5R2oztcfkoub/9oGdjEmtTZ8=";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue