Skip to content

Commit

Permalink
Tmux & other changes (#116)
Browse files Browse the repository at this point in the history
* More Nix abbrevs.

* Remove -s from curl.

* Add tmux alias.

* Remove newSession from tmux config.
  • Loading branch information
attilaolah authored Oct 1, 2024
1 parent be83684 commit ba0e8e6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions home-manager/programs/fish/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
imports = [
./shell_abbrs.nix
./shell_aliases.nix
./functions.nix
./interactive_shell_init.nix
];
Expand Down
14 changes: 10 additions & 4 deletions home-manager/programs/fish/shell_abbrs.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
programs.fish.shellAbbrs = {
programs.fish.shellAbbrs = let
np = "nix-shell --packages";
nr = "nixpkg-run";
in {
"..." = "cd ../..";
"...." = "cd ../../..";
":q" = "exit";
Expand All @@ -8,14 +11,15 @@
ll = "ls -la";
f = "fd";
t = "tree";
tm = "tmx";

v = "nvim";
vi = "nvim";
vim = "nvim";
nv = "nvim";
nvi = "nvim";

c = "curl -s --dump-header /dev/stderr";
c = "curl --dump-header /dev/stderr";

g = "git status";
ga = "git add -p .";
Expand All @@ -26,7 +30,9 @@
gr = "git remote -v";
gl = "git l";

nt = "nix-shell --packages";
nx = "nixpkg-run";
inherit np nr;
nix-try = np;
nt = np;
nx = np;
};
}
5 changes: 5 additions & 0 deletions home-manager/programs/fish/shell_aliases.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
programs.fish.shellAliases = {
tmx = "tmux new-session -A -s //(whoami)@(hostname -s)/$SHLVL";
};
}
1 change: 0 additions & 1 deletion home-manager/programs/tmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
clock24 = true;
escapeTime = 0;
mouse = true;
newSession = true;
prefix = "M-a";
reverseSplit = true;
sensibleOnTop = true;
Expand Down

0 comments on commit ba0e8e6

Please sign in to comment.