mirror of
https://github.com/callumio/nixfiles.git
synced 2025-12-17 11:39:19 +00:00
This commit is contained in:
parent
cd0e067dad
commit
1d10befe61
10 changed files with 99 additions and 367 deletions
|
|
@ -1,8 +1,13 @@
|
|||
{pkgs, ...}: let
|
||||
{
|
||||
pkgs,
|
||||
cLib,
|
||||
...
|
||||
}: let
|
||||
mkFishPlug = pkg: {
|
||||
name = pkg.pname;
|
||||
inherit (pkg) src;
|
||||
};
|
||||
tmux = cLib.getProgFor pkgs "tmux";
|
||||
in {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
|
@ -12,14 +17,15 @@ in {
|
|||
trap __trap_exit_tmux EXIT
|
||||
'';
|
||||
|
||||
# TODO: dont use this directly
|
||||
shellAliases = {v = "nvim";};
|
||||
|
||||
functions = {
|
||||
__trap_exit_tmux = {
|
||||
body = ''
|
||||
test (tmux list-windows | wc -l) = 1 || exit
|
||||
test (tmux list-panes | wc -l) = 1 || exit
|
||||
tmux switch-client -t main
|
||||
test (${tmux} list-windows | wc -l) = 1 || exit
|
||||
test (${tmux} list-panes | wc -l) = 1 || exit
|
||||
${tmux} switch-client -t main
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue