bspwm_dynamic_desktops: Add "send+follow" actions

This commit addresses issue #6
This commit is contained in:
Protesilaos Stavrou 2020-01-29 07:22:41 +02:00
parent dff236fece
commit 0d6f0bf475
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 17 additions and 0 deletions

View file

@ -132,9 +132,15 @@ case "$option" in
--ns|--send-focused-to-desktop)
_desk_or_node node focused -d "${target_desktop}"
;;
--nsf|--send-focused-to-desktop-and-follow)
_desk_or_node node focused -d "${target_desktop}" --follow
;;
--nm|--send-focused-to-next-monitor)
_desk_or_node monitor node focused -d "${target_desktop}"
;;
--nmf|--send-focused-to-next-monitor-and-follow)
_desk_or_node monitor node focused -d "${target_desktop}" --follow
;;
--da|--activate-desktop-and-place-receptacle)
_desk_or_node monitor node @"$target_desktop":/ -i && bspc desktop -a "${target_desktop}"
;;

View file

@ -98,9 +98,20 @@ mod3 + shift + {h,j,k,l}
# section.
#
# NOTE the leading `;` runs this command asynchronously.
#
# NOTE2 the script also offers commands for sending to a desktop on the
# current or the next monitor and following it right away. The
# shorthand for those is `--nsf' and `--nmf' respectively. A
# commented-out version is provided below the enabled key bindings,
# which replaces the "send" commands noted above with their
# "send+follow" equivalents.
mod3 + {_,shift + ,ctrl + shift +,ctrl +}{0-9}
;bspwm_dynamic_desktops {--df,--ns,--nm,--da} {0-9}
## Use this for "send+follow" instead of just "send"
# mod3 + {_,shift + ,ctrl + shift +,ctrl +}{0-9}
# ;bspwm_dynamic_desktops {--df,--nsf,--nmf,--da} {0-9}
# With `alt` focus {next,previous} window in the current desktop. With
# `mod3` focus {next,previous} desktop in the current monitor.
# Cyclical behaviour. Move in the opposite direction while also holding