mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 18:08:28 +02:00
fix: syntax error, optimise tmux
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
{pkgs, ...}: let
|
|
||||||
buildTmuxPlugin = pkgs.tmuxPlugins.mkTmuxPlugin;
|
|
||||||
in {
|
|
||||||
draculaTheme = buildTmuxPlugin {
|
|
||||||
pluginName = "dracula";
|
|
||||||
version = "v2.2.0";
|
|
||||||
src = builtins.fetchTarball {
|
|
||||||
name = "dracula-tmux-v2.2.0";
|
|
||||||
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
|
||||||
sha256 = "sha256:0v2k994yy4xx2iw8qxg7qphw46gq2qmg496i3a3h9b6jgwxqm7zn";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
|
||||||
in {
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shell = "${pkgs.nushell}/bin/nu";
|
shell = "${pkgs.nushell}/bin/nu";
|
||||||
@@ -18,7 +12,7 @@ in {
|
|||||||
sensibleOnTop = true;
|
sensibleOnTop = true;
|
||||||
|
|
||||||
# https://github.com/sxyazi/yazi/wiki/Image-preview-within-tmux
|
# https://github.com/sxyazi/yazi/wiki/Image-preview-within-tmux
|
||||||
extraConfig = builtins.readFile ''
|
extraConfig = ''
|
||||||
set -g allow-passthrough on
|
set -g allow-passthrough on
|
||||||
|
|
||||||
set -ga update-environment TERM
|
set -ga update-environment TERM
|
||||||
@@ -29,19 +23,21 @@ in {
|
|||||||
baseIndex = 1; # start index from 1
|
baseIndex = 1; # start index from 1
|
||||||
escapeTime = 0; # do not wait for escape key
|
escapeTime = 0; # do not wait for escape key
|
||||||
|
|
||||||
plugins = with plugins; [
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
draculaTheme # theme
|
|
||||||
{
|
{
|
||||||
# https://github.com/tmux-plugins/tmux-continuum
|
# theme
|
||||||
# Continuous saving of tmux environment. Automatic restore when tmux is started.
|
# https://github.com/catppuccin/tmux
|
||||||
plugin = continuum;
|
plugin = catppuccin;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g @continuum-save-interval '15'
|
set -g @catppuccin_flavour 'mocha' # or frappe, macchiato, mocha
|
||||||
|
set -g @catppuccin_window_status_enable "yes"
|
||||||
# Option to display current status of tmux continuum in tmux status line.
|
|
||||||
set -g status-right 'Continuum status: #{continuum_status}'
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# https://github.com/tmux-plugins/tmux-yank
|
||||||
|
# Enables copying to system clipboard.
|
||||||
|
yank
|
||||||
|
|
||||||
{
|
{
|
||||||
# https://github.com/tmux-plugins/tmux-resurrect
|
# https://github.com/tmux-plugins/tmux-resurrect
|
||||||
# Manually persists tmux environment across system restarts.
|
# Manually persists tmux environment across system restarts.
|
||||||
@@ -52,11 +48,7 @@ in {
|
|||||||
# Restore Neovim sessions
|
# Restore Neovim sessions
|
||||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
# https://github.com/tmux-plugins/tmux-yank
|
|
||||||
# Enables copying to system clipboard.
|
|
||||||
plugin = yank;
|
|
||||||
}
|
|
||||||
# set -g @plugin 'tmux-plugins/tmux-cpu'
|
# set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
{
|
{
|
||||||
plugin = cpu;
|
plugin = cpu;
|
||||||
|
|||||||
Reference in New Issue
Block a user