Compare commits
4 Commits
341b8ee43c
...
21d6a76871
| Author | SHA1 | Date | |
|---|---|---|---|
|
21d6a76871
|
|||
|
e2a2c192f8
|
|||
|
4c73f3dbcf
|
|||
|
878b72e74e
|
@ -246,12 +246,8 @@ rec {
|
||||
defaultApplications = nixosConfig.xdg.mime.defaultApplications;
|
||||
};
|
||||
|
||||
# TODO: What about desktop portals? They're configured in system config, do I need to do sth here?
|
||||
portal = {
|
||||
enable = nixosConfig.xdg.portal.enable;
|
||||
xdgOpenUsePortal = nixosConfig.xdg.portal.xdgOpenUsePortal;
|
||||
config.common.default = nixosConfig.xdg.portal.config.common.default;
|
||||
extraPortals = nixosConfig.xdg.portal.extraPortals;
|
||||
inherit (nixosConfig.xdg.portal) enable xdgOpenUsePortal config extraPortals;
|
||||
};
|
||||
};
|
||||
|
||||
@ -300,6 +296,15 @@ rec {
|
||||
|
||||
".ssh/id_ed25519.pub".text = "${sshPublicKey}";
|
||||
".ssh/allowed_signers".text = "* ${sshPublicKey}";
|
||||
|
||||
".config/xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
[filechooser]
|
||||
cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
||||
default_dir=$HOME
|
||||
env=TERMCMD=kitty --class=file_chooser
|
||||
open_mode = suggested
|
||||
save_mode = last
|
||||
'';
|
||||
};
|
||||
|
||||
# Here, custom scripts can be run when activating a HM generation.
|
||||
|
||||
@ -300,6 +300,12 @@ in {
|
||||
"toolkit.telemetry.coverage.opt-out" = true;
|
||||
|
||||
"widget.use-xdg-desktop-portal" = true;
|
||||
"widget.use-xdg-desktop-portal.file-picker" = 1; # 1: always, 2: auto
|
||||
"widget.use-xdg-desktop-portal.location" = 2;
|
||||
"widget.use-xdg-desktop-portal.mime-handler" = 2;
|
||||
"widget.use-xdg-desktop-portal.native-messaging" = 0;
|
||||
"widget.use-xdg-desktop-portal.open-uri" = 2;
|
||||
"widget.use-xdg-desktop-portal.settings" = 2;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
@ -1477,7 +1477,7 @@ in {
|
||||
|
||||
explorer = {
|
||||
enabled = true;
|
||||
replace_netrw = true;
|
||||
replace_netrw = false; # Use yazi for that
|
||||
};
|
||||
|
||||
notifier = {
|
||||
@ -1919,6 +1919,28 @@ in {
|
||||
];
|
||||
config = mkDefaultConfig name;
|
||||
};
|
||||
|
||||
yazi = rec {
|
||||
name = "yazi";
|
||||
pkg = pkgs.vimPlugins.yazi-nvim;
|
||||
lazy = true;
|
||||
event = ["VeryLazy"];
|
||||
dependencies = [_plenary];
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
open_for_directories = true;
|
||||
highlight_hovered_buffers_in_same_directory = false;
|
||||
|
||||
integrations = {
|
||||
grep_in_directory.__raw = ''
|
||||
function(directory)
|
||||
Snacks.picker.grep({dirs={directory}})
|
||||
end
|
||||
'';
|
||||
picker_add_copy_relative_path_action = "snacks.picker";
|
||||
};
|
||||
};
|
||||
};
|
||||
in [
|
||||
autopairs # Automatic closing brackets/parens # NOTE: For now replaced by blink
|
||||
|
||||
@ -1991,6 +2013,7 @@ in {
|
||||
window-picker # Jump to window without multiple <leader-hjkl>
|
||||
winshift # Move windows around
|
||||
yanky # Clipboard history
|
||||
yazi
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -388,6 +388,12 @@ _: let
|
||||
action = "<cmd>:set wrap!<cr>";
|
||||
options.desc = "Toggle Word Wrap";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>y";
|
||||
action = "<cmd>Yazi<cr>";
|
||||
options.desc = "Toggle Yazi";
|
||||
}
|
||||
];
|
||||
|
||||
leader-file = [
|
||||
|
||||
@ -307,14 +307,22 @@ with mylib.networking; {
|
||||
portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = false;
|
||||
config.common.default = ["*"]; # https://discourse.nixos.org/t/clicked-links-in-desktop-apps-not-opening-browers/29114/26
|
||||
wlr.enable = false; # Hyprland has its own portal automatically enabled...
|
||||
|
||||
config = {
|
||||
common.default = ["*"]; # https://discourse.nixos.org/t/clicked-links-in-desktop-apps-not-opening-browers/29114/26
|
||||
common."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
||||
|
||||
hyprland.default = ["hyprland"];
|
||||
hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
||||
};
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-termfilechooser # Filepicker using yazi
|
||||
|
||||
# xdg-desktop-portal-kde
|
||||
# xdg-desktop-portal-hyprland # Already enabled by hyprland system module
|
||||
# xdg-desktop-portal-termfilechooser # Filepicker using nnn
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user