diff --git a/common/tmux.nix b/common/tmux.nix index 5c6bfb63..d41e61d3 100644 --- a/common/tmux.nix +++ b/common/tmux.nix @@ -5,7 +5,7 @@ if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then tmux detach-client else - tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux new -A -s scratch" + tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux new -A -s scratch -d -c ''$(pwd)" fi ''; in { @@ -77,7 +77,7 @@ in { bind k select-pane -U bind l select-pane -R - bind-key -n C-\\ run-shell ${scratchpad} + bind-key -n C-\\ run-shell "${pkgs.tmux-float}/bin/tmux-float toggle" bind o set status bind C-n next-window diff --git a/darwin/skhd.nix b/darwin/skhd.nix index c28cc1d3..248c655d 100644 --- a/darwin/skhd.nix +++ b/darwin/skhd.nix @@ -3,13 +3,9 @@ skhd = { enable = true; skhdConfig = '' - alt - return : ${pkgs.lib.getExe pkgs.kitty} --single-instance --directory ~ - # alt - return : $\{pkgs.wezterm}/bin/wezterm-gui + alt - return : ${pkgs.lib.getExe pkgs.kitty} --single-instance --directory ~ shift + alt - return: pkill afplay - # open mpv - alt - m : open -na /Applications/mpv.app $(pbpaste) - # close focused window # alt - w : yabai -m window --close diff --git a/flake.lock b/flake.lock index fa4b9a57..466ea4a5 100644 --- a/flake.lock +++ b/flake.lock @@ -32,6 +32,22 @@ "type": "github" } }, + "advisory-db_3": { + "flake": false, + "locked": { + "lastModified": 1734961910, + "narHash": "sha256-F4iNNs84rdqN2ZDCKtZrE/PUIfUe6YSZM/O2sckeQr4=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "b02b7ca7c98eee7fe26ac18277040c3fc814b52d", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "anyrun": { "inputs": { "flake-parts": "flake-parts", @@ -229,6 +245,21 @@ } }, "crane_5": { + "locked": { + "lastModified": 1734808813, + "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=", + "owner": "ipetkov", + "repo": "crane", + "rev": "72e2d02dbac80c8c86bf6bf3e785536acf8ee926", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_6": { "locked": { "lastModified": 1732906089, "narHash": "sha256-NvYSSiKsC0rqn9yY0a9zglLXrFp92EwKhTFZC38voCQ=", @@ -608,6 +639,24 @@ "type": "github" } }, + "flake-utils_12": { + "inputs": { + "systems": "systems_14" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flake-utils_2": { "inputs": { "systems": "systems_3" @@ -1492,6 +1541,27 @@ "type": "github" } }, + "nix-github-actions_2": { + "inputs": { + "nixpkgs": [ + "tmux-float", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1731952509, + "narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "7b5f051df789b6b20d259924d349a9ba3319b226", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -1976,6 +2046,7 @@ "rest-nvim": "rest-nvim", "rust-overlay": "rust-overlay_6", "sops-nix": "sops-nix", + "tmux-float": "tmux-float", "tree-sitter-d2": "tree-sitter-d2", "tree-sitter-just": "tree-sitter-just", "tree-sitter-nu": "tree-sitter-nu", @@ -2113,6 +2184,27 @@ } }, "rust-overlay_7": { + "inputs": { + "nixpkgs": [ + "tmux-float", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735007320, + "narHash": "sha256-NdhUgB9BkLGW9I+Q1GyUUCc3CbDgsg7HLWjG7WZBR5Q=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "fb5fdba697ee9a2391ca9ceea3b853b4e3ce37a5", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_8": { "inputs": { "nixpkgs": [ "zjstatus", @@ -2228,6 +2320,21 @@ "type": "github" } }, + "systems_14": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -2348,6 +2455,31 @@ "type": "github" } }, + "tmux-float": { + "inputs": { + "advisory-db": "advisory-db_3", + "crane": "crane_5", + "flake-utils": "flake-utils_11", + "nix-github-actions": "nix-github-actions_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_7" + }, + "locked": { + "lastModified": 1735044950, + "narHash": "sha256-8Au07voKXOa70Cq874FIPLi4Cj+4GdLMketKFwwuaas=", + "owner": "uttarayan21", + "repo": "tmux-float", + "rev": "11b2cf83ebe8478135483d9a165e828e33fee038", + "type": "github" + }, + "original": { + "owner": "uttarayan21", + "repo": "tmux-float", + "type": "github" + } + }, "tree-sitter-d2": { "flake": false, "locked": { @@ -2515,12 +2647,12 @@ }, "zjstatus": { "inputs": { - "crane": "crane_5", - "flake-utils": "flake-utils_11", + "crane": "crane_6", + "flake-utils": "flake-utils_12", "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_7" + "rust-overlay": "rust-overlay_8" }, "locked": { "lastModified": 1733851126, diff --git a/flake.nix b/flake.nix index e7f3b457..dbba988c 100644 --- a/flake.nix +++ b/flake.nix @@ -130,6 +130,10 @@ url = "github:ray-x/guihua.lua"; flake = false; }; + tmux-float = { + url = "github:uttarayan21/tmux-float"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { diff --git a/overlays.nix b/overlays.nix index 447ccbf2..2508752e 100644 --- a/overlays.nix +++ b/overlays.nix @@ -143,6 +143,7 @@ }; }; }; + tmux-float = inputs.tmux-float.packages.${prev.system}.default; }; catppuccinThemes = final: prev: { catppuccinThemes = import ./themes/catppuccin.nix {pkgs = final.pkgs;};