mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
Feat: Updates pickers so delimiters are not showing in selections.
This commit is contained in:
2
env/.local/scripts/catppuccin-colors
vendored
2
env/.local/scripts/catppuccin-colors
vendored
@@ -31,4 +31,4 @@ export BASE="#1e1e2e"
|
||||
export MANTLE="#181825"
|
||||
export CRUST="#11111b"
|
||||
|
||||
export FZF_DEFAULT_OPTS="--color=header:$MAROON:bold,footer:$MAROON:bold,pointer:$MAUVE,prompt:$MAUVE,fg+:$MAUVE,border:$LAVENDER,info:$LAVENDER,fg:$TEXT,hl:$TEXT:bold,hl+:$TEXT:bold,bg:$BASE,bg+:$SURFACE0"
|
||||
export FZF_DEFAULT_OPTS="--color=header:$MAROON:bold,footer:$MAROON:bold,pointer:$MAUVE,prompt:$MAUVE,fg+:$MAUVE,border:$LAVENDER,info:$LAVENDER,fg:$TEXT,hl:$TEXT:bold,hl+:$TEXT:bold,bg:$BASE,bg+:$SURFACE0,preview-label:$TEAL:bold"
|
||||
|
||||
11
env/.local/scripts/hypr/window-picker
vendored
11
env/.local/scripts/hypr/window-picker
vendored
@@ -58,7 +58,7 @@ generate_rows() {
|
||||
|
||||
# Zip into rows.
|
||||
for i in "${!addresses[@]}"; do
|
||||
rows+=("${workspaces[i]}=>${titles[i]}=>${classes[i]}=>${addresses[i]}")
|
||||
rows+=("${addresses[i]}|${workspaces[i]}|${classes[i]}|${titles[i]}")
|
||||
done
|
||||
}
|
||||
|
||||
@@ -79,15 +79,12 @@ generate_rows
|
||||
sel=$(
|
||||
printf '%s\n' "${rows[@]}" |
|
||||
fzf --style=full "${fzf_opts[@]}" \
|
||||
--preview-label='[ Window Stats ]' --delimiter='=>' --with-nth=2 \
|
||||
--preview='echo -e "Title: {2}\nClass: {3}\nWorkspace: {1}\nAddress: {4}"'
|
||||
--preview-label='[ Window Stats ]' --delimiter='|' --with-nth=4 \
|
||||
--preview='echo -e "Title: {4}\nClass: {3}\nWorkspace: {2}\nAddress: {1}"'
|
||||
)
|
||||
|
||||
[[ -z $sel ]] && exit 1
|
||||
|
||||
# remove spaces and quotes from result.
|
||||
sel=${sel//\"/}
|
||||
sel=${sel// /}
|
||||
# revove everything but the address portion.
|
||||
sel=${sel##*=>}
|
||||
sel=${sel%%|*}
|
||||
echo "$sel"
|
||||
|
||||
6
env/.local/scripts/hypr/workspace-picker
vendored
6
env/.local/scripts/hypr/workspace-picker
vendored
@@ -93,9 +93,9 @@ fi
|
||||
|
||||
sel=$(
|
||||
printf "%s\n" "${rows[@]}" |
|
||||
fzf --style=full "${fzf_opts[@]}" \
|
||||
--delimiter='|' --with-nth=4 --preview-label='[ Workspace Stats ]' \
|
||||
--preview='printf "Name: {4}\nID: {1}\nWindows: {2}\nMonitor: {3}"'
|
||||
fzf --style=full "${fzf_opts[@]}" --delimiter='|' --with-nth=4 \
|
||||
--preview-label='[ Workspace Stats ]' \
|
||||
--preview='printf "Name: {4}\nID: {1}\nWindows: {3}\nMonitor: {2}"'
|
||||
)
|
||||
|
||||
[[ -z $sel ]] && exit 1
|
||||
|
||||
Reference in New Issue
Block a user