fix: xdg open

This commit is contained in:
DACHXY 2025-02-27 20:08:05 +08:00
parent 186bd7cf58
commit 1b564712a6
8 changed files with 23 additions and 8 deletions

View file

@ -4,7 +4,7 @@
## ✨ Main Applications ## ✨ Main Applications
- [X] Hyprland (uwsm support) - [X] Hyprland
- [X] Neovim - [X] Neovim
- ✅ [lazyvim](https://github.com/LazyVim/LazyVim) - ✅ [lazyvim](https://github.com/LazyVim/LazyVim)
- ✅ [treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - ✅ [treesitter](https://github.com/nvim-treesitter/nvim-treesitter)

View file

@ -24,3 +24,7 @@ vim.g.lazyvim_python_lsp = "pyright"
vim.g.lazyvim_python_ruff = "ruff" vim.g.lazyvim_python_ruff = "ruff"
vim.g.lazyvim_eslint_auto_format = true vim.g.lazyvim_eslint_auto_format = true
vim.o.background = "dark" vim.o.background = "dark"
-- Markdown preview
vim.g.mkdp_auto_close = 0
vim.g.mkdp_combine_preview = 0

View file

@ -1,6 +1,6 @@
{ {
home.sessionVariables = { home.sessionVariables = {
BROWSER = "firefox"; BROWSER = "firefox-nightly";
EDITOR = "nvim"; EDITOR = "nvim";
TERMINAL = "ghostty"; TERMINAL = "ghostty";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";

View file

@ -11,6 +11,9 @@ let
# freezeShot = "--freeze"; # freezeShot = "--freeze";
freezeShot = ""; freezeShot = "";
# clipboard-only = "${clipboardOnly}";
screenshotFolder = "--output-folder ~/Pictures/Screenshots";
clipboardOnly = "${screenshotFolder}";
in in
[ [
''${mainMod}, F, exec, ${browser}'' ''${mainMod}, F, exec, ${browser}''
@ -27,9 +30,13 @@ in
''${mainMod}, P, pseudo, # dwindle'' ''${mainMod}, P, pseudo, # dwindle''
''${mainMod}, S, togglesplit, # dwindle'' ''${mainMod}, S, togglesplit, # dwindle''
''CTRL ${mainMod} SHIFT, L, exec, hyprlock'' ''CTRL ${mainMod} SHIFT, L, exec, hyprlock''
''${mainMod} SHIFT, s, exec, hyprshot -m region --clipboard-only ${freezeShot}''
''CTRL SHIFT, s, exec, hyprshot -m window --clipboard-only ${freezeShot}'' # Screenshot
''CTRL SHIFT ${mainMod}, s, exec, hyprshot -m output --clipboard-only ${freezeShot}'' ''${mainMod} SHIFT, s, exec, hyprshot -m region ${clipboardOnly} ${freezeShot}''
''CTRL SHIFT, s, exec, hyprshot -m window ${clipboardOnly} ${freezeShot}''
''CTRL SHIFT ${mainMod}, s, exec, hyprshot -m output ${clipboardOnly} ${freezeShot}''
''CTRL ALT, s, exec, hyprshot -m active -m window ${clipboardOnly} ${freezeShot}''
''${mainMod}, PERIOD, exec, rofi -modi emoji -show emoji'' ''${mainMod}, PERIOD, exec, rofi -modi emoji -show emoji''
''CTRL ${mainMod}, c, exec, rofi -show calc -modi calc -no-show-match -no-sort'' ''CTRL ${mainMod}, c, exec, rofi -show calc -modi calc -no-show-match -no-sort''
''${mainMod}, X, exec, sleep 0.1 && swaync-client -t -sw'' ''${mainMod}, X, exec, sleep 0.1 && swaync-client -t -sw''

View file

@ -60,7 +60,8 @@ in
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
systemd.enable = false; systemd.enable = false;
package = inputs.hyprland.packages.${system}.hyprland; package = null;
portalPackage = null;
plugins = plugins =
(with inputs.hyprland-plugins.packages.${system}; [ (with inputs.hyprland-plugins.packages.${system}; [

View file

@ -126,8 +126,9 @@ in
nvim-nio nvim-nio
one-small-step-for-vimkind one-small-step-for-vimkind
none-ls-nvim none-ls-nvim
markdown-preview-nvim
render-markdown-nvim render-markdown-nvim
markdown-preview-nvim
markdown-nvim
image-nvim image-nvim
hover-nvim hover-nvim

View file

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
nvidia-offload-enabled,
... ...
}: }:
let let
@ -11,6 +12,7 @@ let
(lib.head oldAttrs.desktopItems).override { (lib.head oldAttrs.desktopItems).override {
name = "discord"; name = "discord";
desktopName = "Discord"; desktopName = "Discord";
exec = if nvidia-offload-enabled == true then "offload vesktop %U" else "vesktop %U";
} }
); );

View file

@ -8,7 +8,7 @@
enable = true; enable = true;
withUWSM = false; withUWSM = false;
package = inputs.hyprland.packages."${pkgs.system}".hyprland; package = inputs.hyprland.packages."${pkgs.system}".hyprland;
# portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
}; };
xdg.portal = { xdg.portal = {