mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-19 07:43:44 +01: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 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.nushell}/bin/nu";
|
||||
@@ -18,7 +12,7 @@ in {
|
||||
sensibleOnTop = true;
|
||||
|
||||
# https://github.com/sxyazi/yazi/wiki/Image-preview-within-tmux
|
||||
extraConfig = builtins.readFile ''
|
||||
extraConfig = ''
|
||||
set -g allow-passthrough on
|
||||
|
||||
set -ga update-environment TERM
|
||||
@@ -29,19 +23,21 @@ in {
|
||||
baseIndex = 1; # start index from 1
|
||||
escapeTime = 0; # do not wait for escape key
|
||||
|
||||
plugins = with plugins; [
|
||||
draculaTheme # theme
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
{
|
||||
# https://github.com/tmux-plugins/tmux-continuum
|
||||
# Continuous saving of tmux environment. Automatic restore when tmux is started.
|
||||
plugin = continuum;
|
||||
# theme
|
||||
# https://github.com/catppuccin/tmux
|
||||
plugin = catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @continuum-save-interval '15'
|
||||
|
||||
# Option to display current status of tmux continuum in tmux status line.
|
||||
set -g status-right 'Continuum status: #{continuum_status}'
|
||||
set -g @catppuccin_flavour 'mocha' # or frappe, macchiato, mocha
|
||||
set -g @catppuccin_window_status_enable "yes"
|
||||
'';
|
||||
}
|
||||
|
||||
# https://github.com/tmux-plugins/tmux-yank
|
||||
# Enables copying to system clipboard.
|
||||
yank
|
||||
|
||||
{
|
||||
# https://github.com/tmux-plugins/tmux-resurrect
|
||||
# Manually persists tmux environment across system restarts.
|
||||
@@ -52,11 +48,7 @@ in {
|
||||
# Restore Neovim sessions
|
||||
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'
|
||||
{
|
||||
plugin = cpu;
|
||||
|
||||
Reference in New Issue
Block a user