From bfd72420f17eeb4895acaa21d296d5e190dcf811 Mon Sep 17 00:00:00 2001 From: Satria Date: Thu, 12 Mar 2026 17:05:03 +0700 Subject: [PATCH] add modrinth handler and some other tweaks --- modules/home/core/xdg.nix | 1 - modules/home/core/zed.nix | 8 +++++++- modules/home/desktop.nix | 1 + modules/home/misc/scheme-handlers.nix | 18 ++++++++++++++++++ modules/home/rice/keybinds.nix | 4 +--- 5 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 modules/home/misc/scheme-handlers.nix diff --git a/modules/home/core/xdg.nix b/modules/home/core/xdg.nix index 141e9c0..ffc2a13 100644 --- a/modules/home/core/xdg.nix +++ b/modules/home/core/xdg.nix @@ -9,7 +9,6 @@ "application/pdf" = "brave-browser.desktop"; "x-scheme-handler/http" = "brave-browser.desktop"; "x-scheme-handler/https" = "brave-browser.desktop"; - "x-scheme-handler/terminal" = "kitty.desktop"; "x-terminal-emulator" = "kitty.desktop"; "inode/directory" = "pcmanfm-qt.desktop"; "audio/mpeg" = "vlc.desktop"; diff --git a/modules/home/core/zed.nix b/modules/home/core/zed.nix index 8c6ff8e..99bb706 100644 --- a/modules/home/core/zed.nix +++ b/modules/home/core/zed.nix @@ -5,7 +5,6 @@ extensions = [ "nix" ]; userSettings = { format_on_save = "off"; - features.edit_prediction_provider = "copilot"; vim_mode = true; git.inline_blame.enabled = true; gutter.line_numbers = true; @@ -19,6 +18,13 @@ file_types.tailwindcss = [ "*.css" ]; auto_install_extensions.catppuccin-icons = true; icon_theme = "Catppuccin Mocha"; + agent = { + tool_permissions.default = "allow"; + default_model = { + provider = "copilot_chat"; + model = "claude-opus-4.6"; + }; + }; theme = { mode = "dark"; light = "Catppuccin Mocha (sapphire)"; diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 3c71de0..a7a0bc1 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -10,6 +10,7 @@ ./rice/cursor.nix ./rice/theme.nix ./rice/keybinds.nix + ./misc/scheme-handlers.nix ./misc/kde-connect.nix ./core/apps.nix ./core/zed.nix diff --git a/modules/home/misc/scheme-handlers.nix b/modules/home/misc/scheme-handlers.nix new file mode 100644 index 0000000..dc7c0e8 --- /dev/null +++ b/modules/home/misc/scheme-handlers.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +let + ferium-installer-script = pkgs.writeShellScript "ferium-installer" '' + mod=$(echo "$1" | awk -F'/' '{print $NF}') + ${pkgs.kitty}/bin/kitty sh -c "ferium add $mod; read" + ''; +in +{ + xdg.desktopEntries."ferium-installer" = { + name = "Intercept Modrinth Links to Ferium"; + exec = "${ferium-installer-script} %u"; + mimeType = [ "x-scheme-handler/modrinth" ]; + }; + + xdg.mimeApps.defaultApplications = { + "x-scheme-handler/modrinth" = "ferium-installer.desktop"; + }; +} \ No newline at end of file diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index d84ed78..d0c4d97 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -106,9 +106,7 @@ ", PRINT, exec, hyprshot -zm region -o ~/Pictures/Screenshots; killall -9 hyprpicker hyprshot" "SUPER, R, exec, rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\"" - "SUPER, RETURN, exec, rofi -show window -show-icons -drun-display '' -window-format '{c} {t}'" - "SUPER CTRL, RETURN, exec, rofi rofi -dmenu -p 'run nixpkgs' -lines 0 < /dev/null | xargs -r -I {} kitty -- nix run 'nixpkgs#{}'" - "SUPER ALT, RETURN, exec, rofi rofi -dmenu -p 'shell nixpkgs' -lines 0 < /dev/null | xargs -r -I {} kitty -- nde`ix shell 'nixpkgs#{}'" + "SUPER, RETURN, exec, ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'" "SUPER, V, exec, rofi -modi clipboard:cliphist-rofi-img -show clipboard -show-icons" # "SUPER, B, exec, rofi -show calc -modi calc -no-show-match -no-sort"