diff options
Diffstat (limited to 'modules/terminal/hjem')
| -rw-r--r-- | modules/terminal/hjem/programs/broot.nix | 29 | ||||
| -rw-r--r-- | modules/terminal/hjem/programs/tmux.nix | 31 |
2 files changed, 15 insertions, 45 deletions
diff --git a/modules/terminal/hjem/programs/broot.nix b/modules/terminal/hjem/programs/broot.nix index 72098f8..2907a85 100644 --- a/modules/terminal/hjem/programs/broot.nix +++ b/modules/terminal/hjem/programs/broot.nix @@ -4,21 +4,22 @@ lib, ... }: let - cfg = config.collinux.terminal.shells.fish; + cfg = config.collinux.terminal.programs.broot; - conf = { - skin = catppuccin_skin; - verbs = [ - { - name = "open-code"; - key = "enter"; - execution = "$EDITOR +{line} {file}"; - working_dir = "{root}"; - apply_to = "file"; - leave_broot = true; - } - ]; - }; + conf = + { + verbs = [ + { + name = "open-code"; + key = "enter"; + execution = "$EDITOR +{line} {file}"; + working_dir = "{root}"; + apply_to = "file"; + leave_broot = true; + } + ]; + } + // (lib.optionalAttrs (cfg.theme == "catppuccin") {skin = catppuccin_skin;}); catppuccin_skin = { input = "rgb(205, 214, 244) none"; diff --git a/modules/terminal/hjem/programs/tmux.nix b/modules/terminal/hjem/programs/tmux.nix index d6c7cf8..152c443 100644 --- a/modules/terminal/hjem/programs/tmux.nix +++ b/modules/terminal/hjem/programs/tmux.nix @@ -28,43 +28,12 @@ in { } 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 |
