From 3854b688913845d4fcf3d62df2d149b31918f03d Mon Sep 17 00:00:00 2001 From: js0ny Date: Wed, 19 Nov 2025 23:33:06 +0000 Subject: [PATCH] mpv: init --- .../nvim/lua/plugins/mod/toggleterm.lua | 2 +- .../modules/nixos/hardware/peripherals.nix | 3 ++ nixcfgs/users/js0ny/packages/cli.nix | 1 + nixcfgs/users/js0ny/packages/gui.nix | 3 +- .../desktop/wayland-wm/niri/keymaps.nix | 6 +++- .../programs/desktop/wayland-wm/packages.nix | 1 + nixcfgs/users/js0ny/programs/mpv.nix | 29 +++++++++++++++++++ nixcfgs/users/js0ny/programs/shell/zsh.nix | 1 + nixcfgs/users/js0ny/zephyrus.nix | 1 + 9 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 nixcfgs/modules/nixos/hardware/peripherals.nix create mode 100644 nixcfgs/users/js0ny/programs/mpv.nix diff --git a/home/dot_config/nvim/lua/plugins/mod/toggleterm.lua b/home/dot_config/nvim/lua/plugins/mod/toggleterm.lua index 693f563..d5ec1cf 100644 --- a/home/dot_config/nvim/lua/plugins/mod/toggleterm.lua +++ b/home/dot_config/nvim/lua/plugins/mod/toggleterm.lua @@ -11,7 +11,7 @@ end return { "akinsho/toggleterm.nvim", keys = { - { "!", "ToggleTerm direction=float", desc = "Toggle Terminal" }, + { "!", "ToggleTerm direction=horizontal", desc = "Toggle Terminal" }, { "tf", "ToggleTerm direction=float", desc = "Toggle Terminal" }, { "tt", "ToggleTerm", desc = "Spawn a float terminal" }, }, diff --git a/nixcfgs/modules/nixos/hardware/peripherals.nix b/nixcfgs/modules/nixos/hardware/peripherals.nix new file mode 100644 index 0000000..562adbf --- /dev/null +++ b/nixcfgs/modules/nixos/hardware/peripherals.nix @@ -0,0 +1,3 @@ +{...}: { + hardware.qmk.enable = true; +} diff --git a/nixcfgs/users/js0ny/packages/cli.nix b/nixcfgs/users/js0ny/packages/cli.nix index 9fa68ae..0c88709 100644 --- a/nixcfgs/users/js0ny/packages/cli.nix +++ b/nixcfgs/users/js0ny/packages/cli.nix @@ -58,5 +58,6 @@ ddgr # DuckDuckGo CLI jujutsu github-copilot-cli + yt-dlp ]; } diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index 31b67f6..befb682 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -33,7 +33,6 @@ in { loupe # SUPER FAST 有催人跑的感觉 w/ GPU Accel. kdePackages.elisa - mpv haruna # Email @@ -83,6 +82,8 @@ in { cider-2 kicad blender + qmk + logisim-evolution ] ++ (mkFcitxIM [ pkgs.neovim-qt diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix index 7a57cf8..da2a2e6 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix @@ -26,6 +26,8 @@ in { "Mod+Shift+W".action = spawn "${launcher}" "-show" "window" "-icon-theme" "${iconTheme}" "-show-icons"; + "Mod+V".action = spawn-sh "cliphist list | ${launcher} -dmenu | cliphist decode | wl-copy"; + "Mod+E".hotkey-overlay.title = "Run file explorer"; "Mod+E".action = spawn "${explorer}"; "Mod+Shift+E".hotkey-overlay.title = "Run terminal explorer"; @@ -193,8 +195,10 @@ in { "Mod+Shift+S".action.screenshot = {show-pointer = true;}; "Print".action.screenshot = {show-pointer = true;}; - # "Ctrl+Print".action.screenshot-screen = {true}; + "Ctrl+Print".action.screenshot-screen = {show-pointer = true;}; + "Mod+Alt+S".action.screenshot-screen = {show-pointer = true;}; "Alt+Print".action.screenshot-window = {write-to-disk = true;}; + "Mod+S".action.screenshot-window = {write-to-disk = true;}; "Mod+Escape".allow-inhibiting = false; "Mod+Escape".action = toggle-keyboard-shortcuts-inhibit; diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix index eab3aaf..e9167fe 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix @@ -58,4 +58,5 @@ in { extraPortals = with pkgs; [xdg-desktop-portal-wlr xdg-desktop-portal-gtk]; }; services.blueman-applet.enable = true; + services.cliphist.enable = true; } diff --git a/nixcfgs/users/js0ny/programs/mpv.nix b/nixcfgs/users/js0ny/programs/mpv.nix new file mode 100644 index 0000000..a796ea1 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/mpv.nix @@ -0,0 +1,29 @@ +{pkgs, ...}: { + programs.mpv = { + enable = true; + scripts = with pkgs.mpvScripts; [ + uosc + mpris + thumbfast + sponsorblock + bdanmaku + ]; + config = { + vo = "gpu-next"; + hwdec = "auto-safe"; + }; + bindings = { + "h" = "seek -5"; + "l" = "seek 5"; + "H" = "seek -30"; + "L" = "seek 30"; + "k" = "add volume 5"; + "j" = "add volume -5"; + "K" = "add volume 15"; + "J" = "add volume -15"; + "s" = "screenshot"; + "S" = "screenshot video"; + "f" = "cycle fullscreen"; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/shell/zsh.nix b/nixcfgs/users/js0ny/programs/shell/zsh.nix index e592b61..e81b117 100644 --- a/nixcfgs/users/js0ny/programs/shell/zsh.nix +++ b/nixcfgs/users/js0ny/programs/shell/zsh.nix @@ -52,6 +52,7 @@ in { # ========== # Remove / from word characters, for easier path navigation (using backward-word, forward-word, etc) export WORDCHARS=''${WORDCHARS//\//} + export WORDCHARS=''${WORDCHARS//\#/} # Options # ========== diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 0060be4..0fa6f00 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -45,6 +45,7 @@ ./programs/neovide.nix ./programs/edit-clipboard.nix ./programs/discord.nix + ./programs/mpv.nix # Desktop Linux ./programs/desktop/plasma