fix(tmux): load session indicator at render-time
This commit is contained in:
parent
80e190f43a
commit
02f1603e89
2 changed files with 12 additions and 14 deletions
21
scripts/hypr
21
scripts/hypr
|
|
@ -302,16 +302,17 @@ windowrules)
|
||||||
window_id="${data%%,*}"
|
window_id="${data%%,*}"
|
||||||
window_title="${data#*,}"
|
window_title="${data#*,}"
|
||||||
window_title=$(echo "$window_title" | tr '[:upper:]' '[:lower:]')
|
window_title=$(echo "$window_title" | tr '[:upper:]' '[:lower:]')
|
||||||
case "$window_title" in
|
# NOTE: has been buggy recently
|
||||||
*'extension: (bitwarden password manager) - bitwarden'*)
|
# case "$window_title" in
|
||||||
hyprctl --batch "dispatch setfloating address:0x$window_id; dispatch centerwindow address:0x$window_id"
|
# *'extension: (bitwarden password manager) - bitwarden'*)
|
||||||
;;
|
# hyprctl --batch "dispatch setfloating address:0x$window_id; dispatch centerwindow address:0x$window_id"
|
||||||
*'sign in - google accounts '*)
|
# ;;
|
||||||
hyprctl --batch "dispatch setfloating address:0x$window_id; \
|
# *'sign in - google accounts '*)
|
||||||
dispatch resizewindowpixel exact 30% 70%,address:0x$window_id; \
|
# hyprctl --batch "dispatch setfloating address:0x$window_id; \
|
||||||
dispatch centerwindow address:0x$window_id"
|
# dispatch resizewindowpixel exact 30% 70%,address:0x$window_id; \
|
||||||
;;
|
# dispatch centerwindow address:0x$window_id"
|
||||||
esac
|
# ;;
|
||||||
|
# esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,6 @@ confirm() {
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
bar)
|
bar)
|
||||||
session=$(tmux display-message -p '#S')
|
|
||||||
[ "$session" ] || exit
|
|
||||||
if [ "$(tmux show-options -gv mouse)" = "on" ]; then
|
if [ "$(tmux show-options -gv mouse)" = "on" ]; then
|
||||||
indicator='#{?pane_in_mode,[mouse#{@c}copy],[mouse]}'
|
indicator='#{?pane_in_mode,[mouse#{@c}copy],[mouse]}'
|
||||||
else
|
else
|
||||||
|
|
@ -114,8 +112,7 @@ bar)
|
||||||
else
|
else
|
||||||
key='?'
|
key='?'
|
||||||
fi
|
fi
|
||||||
star=""
|
star="#{?#{==:#S,$sname},*,}"
|
||||||
[ "$sname" = "$session" ] && star="*"
|
|
||||||
[ -n "$bar_content" ] && bar_content="$bar_content │ "
|
[ -n "$bar_content" ] && bar_content="$bar_content │ "
|
||||||
bar_content="$bar_content#[range=session|${sid}]$key:$sname$star#[norange]"
|
bar_content="$bar_content#[range=session|${sid}]$key:$sname$star#[norange]"
|
||||||
i=$((i + 1))
|
i=$((i + 1))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue