From 8e7155d2c7ed5038709c664bf404226c17f61ded Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Mon, 24 Jun 2024 15:25:15 +0200 Subject: [PATCH] Add zellij --- .bin/.e | 1 + .bin/host-mode##hostname.portalo | 10 +++++----- .config/home-manager/common.nix | 1 + .config/starship.toml | 6 +++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.bin/.e b/.bin/.e index 1c8ac17..14410e9 100755 --- a/.bin/.e +++ b/.bin/.e @@ -32,6 +32,7 @@ declare -A mapper=( ["xprofile"]="$HOME/.xprofile" ["yadm"]="$HOME/.local/share/yadm/repo.git/config" ["yadm-encrypt"]="$HOME/.config/yadm/encrypt" + ["zellij"]="$HOME/.config/zellij/" ["zsh"]="$HOME/.config/zsh/.zshrc" ) diff --git a/.bin/host-mode##hostname.portalo b/.bin/host-mode##hostname.portalo index 5a41758..67bfaa9 100755 --- a/.bin/host-mode##hostname.portalo +++ b/.bin/host-mode##hostname.portalo @@ -3,7 +3,7 @@ modes="std single single-sec -layout" +zellij" portalo_mode_std () { echo "Loading portalo standard screen layout" @@ -23,12 +23,12 @@ portalo_mode_single_sec () { yadm config --add local.class monitor-single-sec } -portalo_mode_layout () { - layout_dir="$HOME/.config/hypr/layouts" +portalo_mode_zellij () { + layout_dir="$HOME/.config/zellij/layouts" layouts=$(\ls -1 "$layout_dir") layout=$(echo "$layouts" | $DMENU -p "layout") if [ -n "$layout" ]; then - "$layout_dir/$layout" + $TERMINAL -e zellij --layout="$layout_dir/$layout" fi } @@ -42,6 +42,6 @@ case $mode in "std") portalo_mode_std ;; "single") portalo_mode_single ;; "single-sec") portalo_mode_single_sec ;; - "layout") portalo_mode_layout ;; + "zellij") portalo_mode_zellij ;; *) echo "'$mode' is not a valid mode (single, std)" ;; esac diff --git a/.config/home-manager/common.nix b/.config/home-manager/common.nix index 0c4381b..71242e0 100644 --- a/.config/home-manager/common.nix +++ b/.config/home-manager/common.nix @@ -43,6 +43,7 @@ yadm # dotfile manager yq # tool for YAML yt-dlp # tool to download videos from the internet + zellij # terminal multiplexer zip # zip ]; diff --git a/.config/starship.toml b/.config/starship.toml index c96089c..86b3079 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -15,7 +15,7 @@ $cmd_duration\ [](bg:red fg:yellow)\ $status\ [](bg:white fg:red)\ -${custom.asciinema_log}$shell\ +${custom.asciinema_log}${env_var.ZELLIJ}$shell\ [](bg:cyan fg:white)\ $jobs\ [](cyan) @@ -42,6 +42,10 @@ when = ''' test -n "$ASCIINEMA_LOG" && test -n "$ASCIINEMA_REC" ''' style = "bg:white fg:black" format = '[$output ]($style)' +[env_var.ZELLIJ] +style = "bg:white fg:black" +format = '[ ]($style)' + [directory] read_only = "" truncation_length = 8