fix: firefox desktop entry offload patch
This commit is contained in:
parent
5a0f9f2992
commit
6f4a849ddb
8 changed files with 66 additions and 2 deletions
|
|
@ -36,6 +36,8 @@ require("lazy").setup({
|
||||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.nushell" },
|
{ import = "lazyvim.plugins.extras.lang.nushell" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.vue" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
-- { import = "lazyvim.plugins.extras.lang.python" },
|
-- { import = "lazyvim.plugins.extras.lang.python" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,14 @@ return {
|
||||||
cmd = { "vscode-json-languageserver", "--stdio" },
|
cmd = { "vscode-json-languageserver", "--stdio" },
|
||||||
filetypes = { "json" },
|
filetypes = { "json" },
|
||||||
},
|
},
|
||||||
|
vuels = {
|
||||||
|
cmd = { "vue-language-server", "--stdio" },
|
||||||
|
filetypes = { "vue" },
|
||||||
|
},
|
||||||
|
ts_ls = {
|
||||||
|
cmd = { "typescript-language-server", "--stdio" },
|
||||||
|
filetypes = { "vue", "ts", "tsx" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup = {},
|
setup = {},
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
|
./desktop.nix
|
||||||
inputs.hyprland.homeManagerModules.default
|
inputs.hyprland.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
50
home/user/desktop.nix
Normal file
50
home/user/desktop.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
nvidia-offload-enabled,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
offloadScript = import ../../system/modules/offload.nix { inherit pkgs; };
|
||||||
|
launcher = "${offloadScript}/bin/offload firefox";
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
xdg.desktopEntries = lib.mkIf nvidia-offload-enabled {
|
||||||
|
firefox = {
|
||||||
|
actions = {
|
||||||
|
"new-private-window" = {
|
||||||
|
exec = "${launcher} --private-window %U";
|
||||||
|
name = "New Private Window";
|
||||||
|
};
|
||||||
|
"new-window" = {
|
||||||
|
exec = "${launcher} --new-window %U";
|
||||||
|
name = "New Window";
|
||||||
|
};
|
||||||
|
"profile-manager-window" = {
|
||||||
|
exec = "${launcher} --ProfileManager";
|
||||||
|
name = "Profile Manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
exec = "${launcher} --name firefox %U";
|
||||||
|
categories = [
|
||||||
|
"Network"
|
||||||
|
"WebBrowser"
|
||||||
|
];
|
||||||
|
genericName = "Web Browser";
|
||||||
|
name = "Firefox";
|
||||||
|
startupNotify = true;
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
icon = "firefox";
|
||||||
|
mimeType = [
|
||||||
|
"text/html"
|
||||||
|
"text/xml"
|
||||||
|
"application/xhtml+xml"
|
||||||
|
"application/vnd.mozilla.xul+xml"
|
||||||
|
"x-scheme-handler/http"
|
||||||
|
"x-scheme-handler/https"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -53,6 +53,7 @@ in
|
||||||
pyright
|
pyright
|
||||||
hadolint
|
hadolint
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
|
nodePackages_latest.typescript
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
|
|
|
||||||
|
|
@ -55,5 +55,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
marksman
|
marksman
|
||||||
nginx-language-server
|
nginx-language-server
|
||||||
nodePackages_latest.vscode-json-languageserver
|
nodePackages_latest.vscode-json-languageserver
|
||||||
|
bash-language-server
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
}:
|
||||||
pkgs.writeShellScriptBin "offload" ''
|
pkgs.writeShellScriptBin "offload" ''
|
||||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue