diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-03-01 18:32:41 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-03-01 18:35:24 +0530 |
| commit | 76739904202a362ffaa3e9e2ab99a55889419744 (patch) | |
| tree | e70a4889bed8895fa8789dabb1fc5aecf19fcb69 | |
| parent | 241e40ad8023922be73213a518c9624f737de066 (diff) | |
| download | nixos-config-76739904202a362ffaa3e9e2ab99a55889419744.tar.gz nixos-config-76739904202a362ffaa3e9e2ab99a55889419744.zip | |
Tmux + kakoune package update
| -rw-r--r-- | modules/kakoune/default.nix | 8 | ||||
| -rw-r--r-- | modules/kakoune/kak-tree-sitter.nix | 8 | ||||
| -rw-r--r-- | modules/kakoune/kakoune-lsp.nix | 19 | ||||
| -rw-r--r-- | modules/tmux/default.nix | 10 | ||||
| -rw-r--r-- | modules/tmux/tmux.conf | 81 | ||||
| -rw-r--r-- | packages.nix | 30 |
6 files changed, 132 insertions, 24 deletions
diff --git a/modules/kakoune/default.nix b/modules/kakoune/default.nix index f15260c..b9d5287 100644 --- a/modules/kakoune/default.nix +++ b/modules/kakoune/default.nix @@ -8,6 +8,7 @@ let ]; }; kak-tree-sitter-unstable = import ./kak-tree-sitter.nix { inherit pkgs lib; }; + kakoune-lsp-unstable = import ./kakoune-lsp.nix { inherit pkgs lib; }; kak-tmux = pkgs.writeShellScriptBin "kak-tmux" '' if [ -t 0 ] && [ -z "$TMUX" ]; then exec </dev/tty; exec <&1; ${tmux}/bin/tmux new "${my-kakoune}/bin/kak$(printf ' %q' "$@")" @@ -19,15 +20,12 @@ in { environment.systemPackages = [ my-kakoune - kakoune-lsp + # kakoune-lsp + kakoune-lsp-unstable kakoune-cr kak-tree-sitter-unstable kak-tmux editorconfig-core-c - ripgrep - tmux - # gitu - moreutils ]; } diff --git a/modules/kakoune/kak-tree-sitter.nix b/modules/kakoune/kak-tree-sitter.nix index 7df49bd..abd0d79 100644 --- a/modules/kakoune/kak-tree-sitter.nix +++ b/modules/kakoune/kak-tree-sitter.nix @@ -2,16 +2,16 @@ with pkgs; rustPlatform.buildRustPackage rec { pname = "kak-tree-sitter"; - version = "3.0.0-local.1"; + version = "3.0.0-local.2"; src = fetchFromSourcehut { owner = "~hadronized"; repo = "kak-tree-sitter"; - rev = "e183201ebdd247b7bbefb9ce9cab10930788aa05"; # 3 Jan 2026 - hash = "sha256-iDpWzvtM0xQSEqs+TsfW3AGaMYwYkHwWqKrbWPRposc="; + rev = "5fe17202e3b818da0f12790d8186fd5ea5e22f6b"; # 28 Feb 2026 + hash = "sha256-z89g58Dr+c1TW9qQVpry1HRNcbxOCIMcNsc+u3KGtFo="; }; - cargoHash = "sha256-WblDG+8GSsy3s2dDE7fgWY6Jkoe7Qqw0ijPR/YQrX7I="; + cargoHash = "sha256-ink1qZD/ujLi/PlJRej5rByBka5a6pPVMP+Y1YlTE1c="; meta = { mainProgram = "kak-tree-sitter"; diff --git a/modules/kakoune/kakoune-lsp.nix b/modules/kakoune/kakoune-lsp.nix new file mode 100644 index 0000000..92d1998 --- /dev/null +++ b/modules/kakoune/kakoune-lsp.nix @@ -0,0 +1,19 @@ +{ lib, pkgs }: +with pkgs; +rustPlatform.buildRustPackage rec { + pname = "kakoune-lsp"; + version = "19.0.1-local.0"; + + src = fetchFromGitHub { + owner = "kakoune-lsp"; + repo = "kakoune-lsp"; + rev = "5ac69fde4222fa458908ff0c17d3aa429c74e28a"; # 28 Feb 2026 + hash = "sha256-PjYPhzMoT8rE2XGI/O9SAcksv2XGyk682IbHJW5vusc="; + }; + + cargoHash = "sha256-nwxZwyT9sNoZuvvg/YJFlVshe6i+W9avmquq9iXmFVM="; + + meta = { + mainProgram = "kak-lsp"; + }; +} diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix new file mode 100644 index 0000000..67b31cb --- /dev/null +++ b/modules/tmux/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: +{ + programs.tmux = { + enable = true; + terminal = "screen-256color"; # tmux-256color + escapeTime = 25; + shortcut = "q"; + extraConfig = lib.readFile ./tmux.conf; + }; +} diff --git a/modules/tmux/tmux.conf b/modules/tmux/tmux.conf new file mode 100644 index 0000000..0ca4712 --- /dev/null +++ b/modules/tmux/tmux.conf @@ -0,0 +1,81 @@ +set -g display-time 4000 +set -g base-index 1 +setw -g pane-base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on +set -g monitor-bell off +set -g pane-active-border-style "fg=brightcyan bg=default" +set -g pane-border-style "fg=black bg=default" +set -g pane-border-lines simple +set -g pane-border-indicators arrows +set -g status-keys emacs +set -g set-clipboard on +set -g default-terminal "screen-256color" +set -g focus-events on +set -g alternate-screen on +setw -g aggressive-resize on + +bind r source-file ~/.config/tmux/tmux.conf +bind C-q send-prefix +bind q last-pane + +# Selection +setw -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard" +bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard" + +# Statusline +set -g status-left-style "fg=white bg=default" +set -g status-right-style "fg=white bg=default" +set -g status-style "fg=white bg=default" +set -g message-style "fg=white bg=default" +set -g status-justify right +set -g window-status-format "#I:#W" +set -g window-status-current-format "#[bold][#I:#W]" + +# Only show status if there are multiple windows +set -g status off +set -g status-left '' +set -g status-right '' +set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"' +set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"' +set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"' +set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"' + +# Window styles +set -g window-style 'bg=#0f0f0f' +set -g window-active-style 'bg=#000000' + +# Windows/panes management +bind C-v split-window -vc "#{pane_current_path}" +bind v split-window -vc "#{pane_current_path}" +bind C-s split-window -hc "#{pane_current_path}" +bind s split-window -hc "#{pane_current_path}" + +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r H resize-pane -L 5 +bind -r L resize-pane -R 5 + +bind j select-pane -D +bind C-j select-pane -D +bind k select-pane -U +bind C-k select-pane -U +bind h select-pane -L +bind C-h select-pane -L +bind l select-pane -R +bind C-l select-pane -R +bind M-j swap-pane -D +bind M-k swap-pane -U + +bind -n M-1 select-window -t 1 +bind -n M-2 select-window -t 2 +bind -n M-3 select-window -t 3 +bind -n M-4 select-window -t 4 +bind -n M-5 select-window -t 5 +bind -n M-6 select-window -t 6 +bind -n M-7 select-window -t 7 +bind -n M-8 select-window -t 8 +bind -n M-9 select-window -t 9 diff --git a/packages.nix b/packages.nix index 3a13081..fc27278 100644 --- a/packages.nix +++ b/packages.nix @@ -101,7 +101,9 @@ let ffmpeg-full feh zathura + inkscape + kicad # obs-studio # krita # blender @@ -124,18 +126,16 @@ let dua # newsboat - # (builtins.getFlake "github:phenax/daffm/b61d4cdc759e08eb7990aa7f3a67eb737cd7b930").packages.x86_64-linux.default - (pkgs.writeShellScriptBin "daffm" ''exec /home/imsohexy/dev/projects/daffm/result/bin/daffm "$@"'') - # (builtins.getFlake "github:phenax/chelleport/bf57e4968d059b207c036b57818a58ed8c54d141").packages.x86_64-linux.default # (builtins.getFlake "github:phenax/draw-stuff-on-your-screen/6e0e1f6ee603045cac5bb5d9d75d80c9ddef6c6e").packages.x86_64-linux.default - (pkgs.writeShellScriptBin "null-browser" ''exec /home/imsohexy/dev/projects/null-browser/result/bin/null-browser "$@"'') + # (pkgs.writeShellScriptBin "null-browser" ''exec /home/imsohexy/dev/projects/null-browser/result/bin/null-browser "$@"'') ]; utils = with pkgs; [ libnotify xcwd unzip + zip p7zip unrar curl @@ -169,23 +169,23 @@ let # builtins.fetchTarball { # url = "https://github.com/NixOS/nixpkgs/archive/21808d22b1cda1898b71cf1a1beb524a97add2c4.tar.gz"; # } - # ) {}).wineWowPackages.stable - wineWowPackages.stable + # ) {}).wineWow64Packages.stable + wineWow64Packages.stable # X stuff picom brightnessctl - xorg.xinit - xorg.xrandr - xorg.xmodmap - xorg.xkill - xorg.xhost + xinit + xrandr + xmodmap + xkill + xhost xclip xdo xdotool wmctrl arandr - xorg.xgamma + xgamma v4l-utils hsetroot @@ -219,9 +219,9 @@ in # CURL_DIR = lib.makeLibraryPath [pkgs.curl]; # }; - programs.steam.enable = true; - hardware.steam-hardware.enable = true; - programs.gamemode.enable = true; + # programs.steam.enable = true; + # hardware.steam-hardware.enable = true; + # programs.gamemode.enable = true; programs._1password.enable = true; programs._1password-gui.enable = true; |
