mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 12:12:03 +00:00
39 lines
991 B
Nix
39 lines
991 B
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cfg = config.nmasur.presets.programs.nautilus;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
|
||
|
options.nmasur.presets.programs.nautilus.enable =
|
||
|
lib.mkEnableOption "Nautilus file manager for Linux";
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
|
||
|
# Quick button for launching nautilus
|
||
|
xsession.windowManager.i3.config.keybindings = {
|
||
|
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+n" =
|
||
|
"exec --no-startup-id ${pkgs.nautilus}/bin/nautilus";
|
||
|
};
|
||
|
|
||
|
# Generates a QR code and previews it with sushi
|
||
|
programs.fish.functions = {
|
||
|
qr = {
|
||
|
body = "${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.sushi}/bin/sushi /tmp/qr.png";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# Set Nautilus as default for opening directories
|
||
|
xdg.mimeApps = {
|
||
|
associations.added."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||
|
defaultApplications."inode/directory" = lib.mkBefore [ "org.gnome.Nautilus.desktop" ];
|
||
|
};
|
||
|
};
|
||
|
}
|