aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/hjem/programs/tmux.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-11-30 16:35:17 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-11-30 16:35:17 -0600
commitcdad26dfda64e94d19db576e93793ded9434bd09 (patch)
tree82bac4d4a68750b570ebbbb78c4d0749be96c6e1 /modules/terminal/hjem/programs/tmux.nix
parent9882f579108d7c39589c7e96b428dced121bd31a (diff)
changes from a long time ago.
Diffstat (limited to 'modules/terminal/hjem/programs/tmux.nix')
-rw-r--r--modules/terminal/hjem/programs/tmux.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/terminal/hjem/programs/tmux.nix b/modules/terminal/hjem/programs/tmux.nix
index fd2737e..d6c7cf8 100644
--- a/modules/terminal/hjem/programs/tmux.nix
+++ b/modules/terminal/hjem/programs/tmux.nix
@@ -14,12 +14,57 @@ in {
config = lib.mkIf cfg.enable {
tsunami = {
enable = true;
+
+ theme =
+ if (cfg.theme == "catppuccin")
+ then {
+ bg = "#1e1e2e";
+ bg_dark = "#181825";
+ }
+ else if (cfg.theme == "adwaita")
+ then {
+ bg = "#1d1d1d";
+ bg_dark = "#171717";
+ }
+ else {};
+
+ scripts.switch_to_utility =
+ # bash
+ ''
+ # if utility session doesn't exist, create it
+ if ! tmux has-session -t "utility"; then
+ tmux new-session -ds "utility" -c "$HOME"
+ fi
+
+ if [ -z "$TMUX" ]; then
+ # we're not in tmux
+ tmux attach-session -t "utility"
+ else
+ tmux switch -t "utility"
+ fi
+
+ # if cmus window doesn't exist, create it
+ if ! tmux list-windows -t "utility" -F "#{window_name}" | grep -qx "utility_cmus"; then
+ tmux new-window -t "utility" -n "utility_cmus" "cmus"
+ fi
+
+ # if bluetuith window doesn't exist, create it
+ if ! tmux list-windows -t "utility" -F "#{window_name}" | grep -qx "utility_bluetuith"; then
+ tmux new-window -t "utility" -n "utility_bluetuith" "bluetuith"
+ fi
+ '';
+
keys.leader = [
{
name = "Lazygit";
key = "C-g";
exec = "display-popup -E -w 80% -h 80% -x C -y C -d '#{?@default-path,#{@default-path},#{pane_current_path}}' ${lib.getExe pkgs.lazygit}";
}
+ {
+ name = "Utility";
+ key = "C-u";
+ exec = "display-popup -w 80% -h 80% -x C -y C 'TMUX= ~/.config/tmux/scripts/switch_to_utility.sh'";
+ }
];
confs."main" = ''
set -g mouse on