Skip to content

Commit

Permalink
Alias for tmux-cc
Browse files Browse the repository at this point in the history
  • Loading branch information
shajra committed Dec 22, 2023
1 parent bc8439b commit 702ebf3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions home/target/bagel/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, build, ... }:
{ lib, build, pkgs, ... }:

let
userConfig = build.config.provision.user;
Expand Down Expand Up @@ -34,7 +34,7 @@ in
home.homeDirectory = userConfig."${hostname}".homeDirectory;
home.username = userConfig."${hostname}".username;
programs.alacritty.settings.font.size = 18.0;
programs.fish = import programs/fish;
programs.fish = import programs/fish pkgs;
programs.git = import programs/git lib;
programs.kitty.extraConfig = "font_size 18";
}
18 changes: 17 additions & 1 deletion home/target/bagel/programs/fish/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
{
pkgs:

let sft-tmux-script = pkgs.writeText "sft-tmux.scpt" ''
set userName to system attribute "USER"
tell application "iTerm"
activate
set newWindow to (create window with default profile)
delay 0.2
tell current session of newWindow
write text "sft ssh " & userName & ¬
" --command \"tmux -CC new -A -s tmssh\""
end tell
end tell
'';

in {
functions = {
sft-tunnel = {
description = "Tunnel using ScaleFT";
Expand All @@ -11,5 +26,6 @@
shellAliases = {
tunnel-grafana = ''sft-tunnel 4000'';
tunnel-nike = ''sft-tunnel 8428'';
tmux-cc = ''osascript ${sft-tmux-script}'';
};
}

0 comments on commit 702ebf3

Please sign in to comment.