mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 22:22:40 +00:00
feat: Moves preview-stats script into hypr/utils/fzf
This commit is contained in:
2
env/.local/scripts/hypr/utils-launcher
vendored
2
env/.local/scripts/hypr/utils-launcher
vendored
@@ -118,7 +118,7 @@ sel=$(
|
|||||||
printf "%s\n" "${rows[@]}" |
|
printf "%s\n" "${rows[@]}" |
|
||||||
fzf --style=full --footer="$(footer)" --with-nth=2 --delimiter='|' \
|
fzf --style=full --footer="$(footer)" --with-nth=2 --delimiter='|' \
|
||||||
--preview-label='[ Command ]' \
|
--preview-label='[ Command ]' \
|
||||||
--preview="$SCRIPTS/hypr/preview-stats utils {2} $config_file"
|
--preview="$SCRIPTS/hypr/utils/fzf/preview-stats utils {2} $config_file"
|
||||||
)
|
)
|
||||||
|
|
||||||
log "Selection: $sel"
|
log "Selection: $sel"
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ sel=""
|
|||||||
|
|
||||||
# For some reason can't get the preview to work when setting in the fzf_opts array.
|
# For some reason can't get the preview to work when setting in the fzf_opts array.
|
||||||
if [[ $no_preview_flag == "0" ]]; then
|
if [[ $no_preview_flag == "0" ]]; then
|
||||||
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}" --preview="$SCRIPTS/hypr/preview-stats monitor {1}")
|
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}" --preview="$SCRIPTS/hypr/utils/fzf/preview-stats monitor {1}")
|
||||||
else
|
else
|
||||||
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}")
|
sel=$(printf '%s\n' "${rows[@]}" | fzf "${fzf_opts[@]}")
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ make_selection() {
|
|||||||
--delimiter=':' --with-nth=3 \
|
--delimiter=':' --with-nth=3 \
|
||||||
--header="What should we do with the selected window?" \
|
--header="What should we do with the selected window?" \
|
||||||
--preview-label="[ Description ]" \
|
--preview-label="[ Description ]" \
|
||||||
--preview='echo -e {2} | fmt -w ${FZF_PREVIEW_COLUMNS:-40}; echo -e "\n\n\e[35mSelected Window:\e[0m"; "$SCRIPTS/hypr/preview-stats" window {1} "{title, workspace, address, floating}";'
|
--preview='echo -e {2} | fmt -w ${FZF_PREVIEW_COLUMNS:-40}; echo -e "\n\n\e[35mSelected Window:\e[0m"; "$SCRIPTS/hypr/utils/fzf/preview-stats" window {1} "{title, workspace, address, floating}";'
|
||||||
)
|
)
|
||||||
# Exit if non-zero code returned from making selection.
|
# Exit if non-zero code returned from making selection.
|
||||||
[[ $? -gt 0 ]] && log --error "Unexpected fzf status: $?" && exit $?
|
[[ $? -gt 0 ]] && log --error "Unexpected fzf status: $?" && exit $?
|
||||||
|
|||||||
2
env/.local/scripts/hypr/windowctl
vendored
2
env/.local/scripts/hypr/windowctl
vendored
@@ -83,7 +83,7 @@ show_picker() {
|
|||||||
|
|
||||||
# Setup logging file and label.
|
# Setup logging file and label.
|
||||||
source "$SCRIPTS/hypr/logging"
|
source "$SCRIPTS/hypr/logging"
|
||||||
setup-logging "$LOG_LABEL"
|
setup-logging "$LOG_FILE" "$LOG_LABEL"
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
if [[ $1 == "action" ]]; then
|
if [[ $1 == "action" ]]; then
|
||||||
|
|||||||
2
env/.local/scripts/hypr/workspace-picker
vendored
2
env/.local/scripts/hypr/workspace-picker
vendored
@@ -93,7 +93,7 @@ sel=$(
|
|||||||
printf "%s\n" "${rows[@]}" |
|
printf "%s\n" "${rows[@]}" |
|
||||||
fzf --style=full "${fzf_opts[@]}" --delimiter='|' --with-nth=2 \
|
fzf --style=full "${fzf_opts[@]}" --delimiter='|' --with-nth=2 \
|
||||||
--preview-label='[ Workspace Stats ]' \
|
--preview-label='[ Workspace Stats ]' \
|
||||||
--preview="$SCRIPTS/hypr/preview-stats workspace {1}"
|
--preview="$SCRIPTS/hypr/utils/fzf/preview-stats workspace {1}"
|
||||||
)
|
)
|
||||||
|
|
||||||
[[ -z $sel ]] && exit 1
|
[[ -z $sel ]] && exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user