From 5d9e4717c52c67aeeb7c3c9f7222f1b8223b8fa7 Mon Sep 17 00:00:00 2001 From: FredzyW Date: Thu, 30 May 2024 22:24:49 +0200 Subject: [PATCH] La till eget tmux plugin --- flake.lock | 22 +++++++++++----------- flake.nix | 2 +- moduler/common/tmux.nix | 38 ++++++++++++++++++++++---------------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index 0a39436..d95ab2e 100644 --- a/flake.lock +++ b/flake.lock @@ -2,17 +2,17 @@ "nodes": { "fw-pkgs": { "locked": { - "lastModified": 1716560453, - "narHash": "sha256-3GWrmnLQ8r5dV6fr5mMDk8p/X9drKFJzl0REkvDbCMc=", - "owner": "FredzyW", - "repo": "fw-pkgs", - "rev": "721ffab7059556c7e8832d47f2d1a09433ddd9d8", + "lastModified": 1717099852, + "narHash": "sha256-hhjMoK2MlwSX3avfP0NuaneqynY8BrQMiiQlQm/wdvM=", + "owner": "fwastring", + "repo": "fwpkgs", + "rev": "36c899da0873334f093e94a8bc1f57c7fa9943e9", "type": "github" }, "original": { - "owner": "FredzyW", - "ref": "master", - "repo": "fw-pkgs", + "owner": "fwastring", + "ref": "main", + "repo": "fwpkgs", "type": "github" } }, @@ -71,11 +71,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716509168, - "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfb7a882678e518398ce9a31a881538679f6f092", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0c26648..479ab1d 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ # Nixpkgs nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - fw-pkgs.url = "github:FredzyW/fw-pkgs/master"; + fw-pkgs.url = "github:fwastring/fwpkgs/main"; # Home manager home-manager.url = "github:nix-community/home-manager/release-23.11"; diff --git a/moduler/common/tmux.nix b/moduler/common/tmux.nix index 6f50a5e..15a3d91 100644 --- a/moduler/common/tmux.nix +++ b/moduler/common/tmux.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, fetchFromGitHub, ... }: +{ pkgs, ... }: { programs.tmux = { enable = true; @@ -7,25 +7,31 @@ tmuxPlugins.sensible tmuxPlugins.pain-control tmuxPlugins.sessionist + tmuxPlugins.logging { - plugin = fw-pkgs.tmuxPlugins.dracula; + plugin = tmuxPlugins.resurrect; extraConfig = '' - set -g @dracula-show-powerline true - # available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes - set -g @dracula-plugins 'spotify-tui battery time' - # set -g @dracula-plugins 'battery time' - set -g @dracula-refresh-rate 10 - set -g @dracula-show-timezone false - set -g @dracula-military-time true - set -g @dracula-day-month true - set -g @dracula-show-left-icon session - set -g @dracula-battery-label "" - set -g @dracula-battery-colors "cyan dark_gray" - set -g @dracula-spotify-tui-colors "pink dark_gray" - set -g @dracula-ssh-session-colors "orange dark_gray" - set -g @dracula-show-empty-plugins false + resurrect_dir=“$HOME/.tmux/resurrect” + set -g @resurrect-dir $resurrect_dir + set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed “s| --cmd .*-vim-pack-dir||g; s|/etc/profiles/per-user/$USER/bin/||g” $target | sponge $target' + set -g @resurrect-strategy-nvim 'session' ''; } + { + plugin = tmuxPlugins.continuum; + extraConfig = '' + set -g @continuum-boot 'on' + set -g @continuum-restore 'on' + ''; + } + fw-pkgs.tmuxPlugins.spotify + { + plugin = fw-pkgs.tmuxPlugins.minimal; + extraConfig = '' + bind-key b set-option status + ''; + } + ]; prefix = "C-a"; terminal = "xterm-256color";