replace ghostty with wezterm
This commit is contained in:
@@ -9,7 +9,7 @@ else
|
||||
desktop="$1"
|
||||
fi
|
||||
|
||||
for item in "kitty" "ghostty" "wlogout"; do
|
||||
for item in "kitty" "wlogout"; do
|
||||
if [ ! -L "$HOME/.config/$item" ] && [ -e "$HOME/.config/$item" ]; then
|
||||
echo "Error: $HOME/.config/$item exists and is not a symlink." >&2
|
||||
exit 1
|
||||
@@ -29,4 +29,4 @@ for item in "kitty" "ghostty" "wlogout"; do
|
||||
else
|
||||
[ -e "$HOME/.config/.alt/${item}-default" ] && ln -svf ".alt/${item}-default" "$HOME/.config/$item"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SHELL=$(command -v bash)
|
||||
export SHELL
|
||||
|
||||
_cleanup() {
|
||||
if [ -n "${CACHE_DIR:-}" ] && [ -d "$CACHE_DIR" ]; then
|
||||
rm -rf "$CACHE_DIR"
|
||||
@@ -407,6 +410,8 @@ copy_selection() {
|
||||
else
|
||||
echo -n "$input" | cliphist decode | wl-copy
|
||||
fi
|
||||
|
||||
echo -n "$input" | cliphist delete || true
|
||||
}
|
||||
export -f copy_selection
|
||||
|
||||
@@ -444,4 +449,4 @@ $RELOAD_CMD | fzf \
|
||||
--preview-window=down:60%,wrap \
|
||||
--preview "preview {}" \
|
||||
--bind "enter:execute-silent(bash -c 'copy_selection \"\$1\"' -- {})+accept" \
|
||||
|| [ $? -eq 141 ]
|
||||
>/dev/null || [ $? -eq 141 ]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Description:
|
||||
# Wrapper for fzfclip to ensure only one instance is
|
||||
# running and to launch it in ghostty.
|
||||
# running and to launch it in terminal.
|
||||
|
||||
exec {LOCK_FD}>/tmp/"$(basename "$0")".lock
|
||||
|
||||
@@ -11,4 +11,4 @@ flock -n "$LOCK_FD" || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
ghostty -e fzfclip "$@" {LOCK_FD}>&-
|
||||
wezterm start -- fzfclip "$@" {LOCK_FD}>&-
|
||||
|
||||
@@ -34,9 +34,9 @@ done
|
||||
|
||||
if [[ "$response" =~ $'\x1b'\[\?([0-9;]*)c ]]; then
|
||||
params="${BASH_REMATCH[1]}"
|
||||
|
||||
|
||||
IFS=';' read -ra codes <<< "$params"
|
||||
|
||||
|
||||
for code in "${codes[@]}"; do
|
||||
if [[ "$code" == "4" ]]; then
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user