mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
16 lines
528 B
Bash
Executable file
16 lines
528 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
desired_width=25
|
|
|
|
# Open window on the left
|
|
YAZI_CONFIG_HOME=~/.config/yazi/filetree_config yazi
|
|
|
|
# Use jq to filter the JSON output based on the specific window ID
|
|
current_width=$(kitty @ ls | jq --arg window_id "$KITTY_WINDOW_ID" '.[].tabs[].windows[] | select(.id == ($window_id | tonumber)) | .columns')
|
|
|
|
# Calculate the increment value
|
|
increment=$((desired_width - current_width))
|
|
|
|
# Resize the window with the calculated increment value
|
|
kitten @ resize-window --increment $increment --axis horizontal
|