Skip to content

Commit

Permalink
Use zide-rename instead of zide-rename-tab
Browse files Browse the repository at this point in the history
More accurate since we rename more than just the tab
  • Loading branch information
josephschmitt committed Jan 30, 2025
1 parent f2230d8 commit ec723d1
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ It also has one more very important job, which is changing the `EDITOR` env var

The `zide-edit` command takes the place of your `EDITOR`. Instead of launching your `EDITOR`, it automates switching to your open editor pane, and sends it the correct `zellij` action commands so that it opens those files in the open editor pane.

### `zide-rename-tab`
### `zide-rename`

The `zide-rename-tab` command is a convenience script for renaming zellij tabs. You can provide it a parameter of a tab name, and it'll use that to rename the currently focused tab. However, its main use case is in a layout as an auto-closing pane. Usage in this way will automatically name new tabs after whatever directory they're being opened to.
The `zide-rename` command is a convenience script for renaming zellij tabs. You can provide it a parameter of a tab name, and it'll use that to rename the currently focused tab. However, its main use case is in a layout as an auto-closing pane. Usage in this way will automatically name new tabs after whatever directory they're being opened to.

---

Expand Down
2 changes: 1 addition & 1 deletion bin/zide
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ printenv | grep ZIDE_ | sed 's/^/export /; s/=/="/; s/$/"/' > "${tmpDir}/env"
layout_path="$ZIDE_DIR/layouts/$layout"
if [ -n "$ZELLIJ" ]; then
zellij action new-tab --cwd $cwd --layout "$layout_path"
zide-rename-tab
zide-rename
else
# No way to specify the working dir to the zellij CLI, so we change the working dir before opening
# zellij, and change it back once we exit
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions layouts/compact.kdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
layout {
tab {
floating_panes {
zide_rename_tab
zide_rename
}

pane split_direction="vertical" {
Expand Down Expand Up @@ -52,7 +52,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/compact_lazygit.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ layout {
tab hide_floating_panes=true {
floating_panes {
lazygit
zide_rename_tab
zide_rename
}
pane split_direction="vertical" {
filepicker size=40
Expand Down Expand Up @@ -60,7 +60,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/stacked.kdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
layout {
tab {
floating_panes {
zide_rename_tab
zide_rename
}

pane stacked=true {
Expand All @@ -25,7 +25,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/stacked_lazygit.kdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
layout {
tab {
floating_panes {
zide_rename_tab
zide_rename
}

pane stacked=true {
Expand Down Expand Up @@ -30,7 +30,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/tall.kdl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
layout {
tab {
floating_panes {
zide_rename_tab
zide_rename
}

pane split_direction="horizontal" {
Expand All @@ -25,7 +25,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/tall_lazygit.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ layout {
tab hide_floating_panes=true {
floating_panes {
lazygit
zide_rename_tab
zide_rename
}
pane split_direction="horizontal" {
filepicker size=15
Expand Down Expand Up @@ -32,7 +32,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/wide.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ layout {
tab {
floating_panes {
lazygit
zide_rename_tab
zide_rename
}

pane split_direction="vertical" {
Expand Down Expand Up @@ -41,7 +41,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down
4 changes: 2 additions & 2 deletions layouts/wide_lazygit.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ layout {
tab hide_floating_panes=true {
floating_panes {
lazygit
zide_rename_tab
zide_rename
}

pane split_direction="vertical" {
Expand Down Expand Up @@ -54,7 +54,7 @@ layout {
plugin location="compact-bar"
}

pane_template name="zide_rename_tab" command="zide-rename-tab" close_on_exit=true
pane_template name="zide_rename" command="zide-rename" close_on_exit=true

new_tab_template {
pane
Expand Down

0 comments on commit ec723d1

Please sign in to comment.