diff --git a/home-manager.nix b/home-manager.nix index 5a10731..b84cbb9 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -15,7 +15,6 @@ ./programs/rofi ./programs/waybar.nix ./programs/wezterm - ./programs/yazi ]; # Home Manager needs a bit of information about you and the paths it should @@ -230,6 +229,9 @@ # My utility scripts ".local/share/scripts".source = ./scripts; + + # Yazi's configuration + ".config/yazi".source = ./programs/yazi; }; @@ -276,9 +278,10 @@ # Configure XDG xdg.mimeApps.defaultApplications = { "text/html" = "firefox"; + "video/x-matroska" = "vlc"; + "x-scheme-handler/about" = "firefox"; "x-scheme-handler/http" = "firefox"; "x-scheme-handler/https" = "firefox"; - "x-scheme-handler/about" = "firefox"; "x-scheme-handler/unknown" = "firefox"; }; } diff --git a/nixos.nix b/nixos.nix index ce9d543..dd24340 100644 --- a/nixos.nix +++ b/nixos.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, custom-neovim, ... }: +{ config, pkgs, custom-neovim, yazi, ... }: { ## @@ -291,9 +291,13 @@ xclip zip zoxide + # Development custom-neovim.packages.${system}.default + # File managing + yazi.packages.${pkgs.system}.default + ## Libraries libsForQt5.qt5.qtgraphicaleffects libsForQt5.qt5.qtquickcontrols2 diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index 07f8fa3..cf6bcdc 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -213,7 +213,7 @@ bind = $mainMod SHIFT, F, fullscreen, 1 bind = $mainMod SHIFT, P, exec, ~/.local/share/scripts/hyprland/screenshot.sh bind = $mainMod, C, killactive - bind = $mainMod, E, exec, dolphin + bind = $mainMod, E, exec, wezterm start fish -c "ya" bind = $mainMod, F, fullscreen bind = $mainMod, M, exit bind = $mainMod, O, togglesplit # dwindle diff --git a/programs/yazi/default.nix b/programs/yazi/default.nix deleted file mode 100644 index 3ea4bb7..0000000 --- a/programs/yazi/default.nix +++ /dev/null @@ -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; - }; - }; -} diff --git a/programs/yazi/yazi.toml b/programs/yazi/yazi.toml new file mode 100644 index 0000000..175a0f6 --- /dev/null +++ b/programs/yazi/yazi.toml @@ -0,0 +1,9 @@ +[opener] +video = [ + { exec = 'vlc "$1"', desc = "Open in VLC", orphan = true } +] + +[open] +rules = [ + { mime = "video/*", use = "video" } +]