dim focused window while selecting
This commit is contained in:
parent
6be364d614
commit
75fcf2dd18
|
@ -10,6 +10,11 @@
|
||||||
. "$HOME/.config/dmenu/dmenurc"
|
. "$HOME/.config/dmenu/dmenurc"
|
||||||
|
|
||||||
if command -v bspc ; then
|
if command -v bspc ; then
|
||||||
|
if command -v transset-df ; then
|
||||||
|
_focused="$(bspc query -N -n focused)"
|
||||||
|
transset-df --id "$_focused" 0.7
|
||||||
|
fi
|
||||||
|
|
||||||
# adapted from: https://www.reddit.com/r/bspwm/comments/er2olp/dmenu_window_picker/ff16ff0/
|
# adapted from: https://www.reddit.com/r/bspwm/comments/er2olp/dmenu_window_picker/ff16ff0/
|
||||||
# NOTE: query can be '.window', '.local.window', '.local.tiled' (to only have tiled windows
|
# NOTE: query can be '.window', '.local.window', '.local.tiled' (to only have tiled windows
|
||||||
# as options) or '.local.window.!fullscreen.!floating' (to only have tiled and pseudo_tiled windows as options).
|
# as options) or '.local.window.!fullscreen.!floating' (to only have tiled and pseudo_tiled windows as options).
|
||||||
|
@ -23,10 +28,20 @@ if command -v bspc ; then
|
||||||
fi
|
fi
|
||||||
options="$(xtitle "${ids[@]}" | awk '{ print ++i": "$0 }')"
|
options="$(xtitle "${ids[@]}" | awk '{ print ++i": "$0 }')"
|
||||||
|
|
||||||
[[ -n "$options" ]] || exit
|
if [[ -z "$options" ]] ; then
|
||||||
|
if command -v transset-df ; then
|
||||||
|
transset-df --id "$_focused" 1
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
id_index="$(<<< "$options" dmenu $DMENU_OPTIONS -l 20 | cut -d: -f1)"
|
id_index="$(<<< "$options" dmenu $DMENU_OPTIONS -l 20 | cut -d: -f1)"
|
||||||
[[ -n "$id_index" ]] || exit
|
if command -v transset-df ; then
|
||||||
|
transset-df --id "$_focused" 1
|
||||||
|
fi
|
||||||
|
if [[ -z "$id_index" ]] ; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
bspc node "${ids[$((id_index - 1))]}" -f
|
bspc node "${ids[$((id_index - 1))]}" -f
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue