fix: properly configure yazi

Now super+e opens yazi instead of trying to open dolphin
This commit is contained in:
Alexandre Cavalheiro 2024-02-07 19:12:51 -03:00
parent 0a369a745b
commit 392a94a4ec
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
5 changed files with 20 additions and 23 deletions

View file

@ -15,7 +15,6 @@
./programs/rofi ./programs/rofi
./programs/waybar.nix ./programs/waybar.nix
./programs/wezterm ./programs/wezterm
./programs/yazi
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
@ -230,6 +229,9 @@
# My utility scripts # My utility scripts
".local/share/scripts".source = ./scripts; ".local/share/scripts".source = ./scripts;
# Yazi's configuration
".config/yazi".source = ./programs/yazi;
}; };
@ -276,9 +278,10 @@
# Configure XDG # Configure XDG
xdg.mimeApps.defaultApplications = { xdg.mimeApps.defaultApplications = {
"text/html" = "firefox"; "text/html" = "firefox";
"video/x-matroska" = "vlc";
"x-scheme-handler/about" = "firefox";
"x-scheme-handler/http" = "firefox"; "x-scheme-handler/http" = "firefox";
"x-scheme-handler/https" = "firefox"; "x-scheme-handler/https" = "firefox";
"x-scheme-handler/about" = "firefox";
"x-scheme-handler/unknown" = "firefox"; "x-scheme-handler/unknown" = "firefox";
}; };
} }

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, custom-neovim, ... }: { config, pkgs, custom-neovim, yazi, ... }:
{ {
## ##
@ -291,9 +291,13 @@
xclip xclip
zip zip
zoxide zoxide
# Development # Development
custom-neovim.packages.${system}.default custom-neovim.packages.${system}.default
# File managing
yazi.packages.${pkgs.system}.default
## Libraries ## Libraries
libsForQt5.qt5.qtgraphicaleffects libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2 libsForQt5.qt5.qtquickcontrols2

View file

@ -213,7 +213,7 @@
bind = $mainMod SHIFT, F, fullscreen, 1 bind = $mainMod SHIFT, F, fullscreen, 1
bind = $mainMod SHIFT, P, exec, ~/.local/share/scripts/hyprland/screenshot.sh bind = $mainMod SHIFT, P, exec, ~/.local/share/scripts/hyprland/screenshot.sh
bind = $mainMod, C, killactive bind = $mainMod, C, killactive
bind = $mainMod, E, exec, dolphin bind = $mainMod, E, exec, wezterm start fish -c "ya"
bind = $mainMod, F, fullscreen bind = $mainMod, F, fullscreen
bind = $mainMod, M, exit bind = $mainMod, M, exit
bind = $mainMod, O, togglesplit # dwindle bind = $mainMod, O, togglesplit # dwindle

View file

@ -1,19 +0,0 @@
{ pkgs, yazi, ... }:
{
programs.yazi = {
enable = true;
package = yazi.packages.${pkgs.system}.default;
settings = {
opener = {
text = [{
block = true;
exec = "nvim \"$@\"";
}];
};
theme = builtins.readFile ./theme.toml;
};
};
}

9
programs/yazi/yazi.toml Normal file
View file

@ -0,0 +1,9 @@
[opener]
video = [
{ exec = 'vlc "$1"', desc = "Open in VLC", orphan = true }
]
[open]
rules = [
{ mime = "video/*", use = "video" }
]