mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Skip check if hx is running in with helide
This commit is contained in:
parent
c478e6bd0e
commit
5e62cf1093
1 changed files with 11 additions and 10 deletions
|
|
@ -20,23 +20,24 @@
|
||||||
|
|
||||||
# Get the running command in the current pane
|
# Get the running command in the current pane
|
||||||
RUNNING_COMMAND=$(zellij action list-clients | awk 'NR==2 {print $3}')
|
RUNNING_COMMAND=$(zellij action list-clients | awk 'NR==2 {print $3}')
|
||||||
|
echo $RUNNING_COMMAND > out.txt
|
||||||
|
|
||||||
# Check if the command running in the current pane is helix (hx)
|
# Check if the command running in the current pane is helix (hx)
|
||||||
if echo "$RUNNING_COMMAND" | grep -q "hx$"; then
|
# if echo "$RUNNING_COMMAND" | grep -q "hx$"; then
|
||||||
# The current pane is running helix, use zellij actions to open the file
|
# The current pane is running helix, use zellij actions to open the file
|
||||||
zellij action write 27
|
zellij action write 27
|
||||||
zellij action write-chars ":open $1"
|
zellij action write-chars ":open $1"
|
||||||
zellij action write 13
|
zellij action write 13
|
||||||
else
|
# else
|
||||||
# The current pane is not running helix, so open helix in a new pane
|
# # The current pane is not running helix, so open helix in a new pane
|
||||||
zellij action new-pane
|
# zellij action new-pane
|
||||||
sleep 0.3
|
# sleep 0.3
|
||||||
zellij action write-chars "hx $1"
|
# zellij action write-chars "hx $1"
|
||||||
zellij action write 13
|
# zellij action write 13
|
||||||
|
|
||||||
# warning from before I got it working
|
# # warning from before I got it working
|
||||||
# zellij action new-pane --name "WARNING" -- "echo" "please open helix in a pane right next to the sidebar (to the right of it) using 'hx path_to_file'"
|
# # zellij action new-pane --name "WARNING" -- "echo" "please open helix in a pane right next to the sidebar (to the right of it) using 'hx path_to_file'"
|
||||||
fi
|
# fi
|
||||||
'';
|
'';
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue