Update dot_config/i3/config
Update dot_config/i3/executable_common_var.sh Update dot_config/i3/executable_configure_monitors.sh Add dot_config/i3/executable_on_i3_start.sh Update dot_config/i3/executable_relative_workspace.sh
This commit is contained in:
parent
e0297d280b
commit
87da83122a
5 changed files with 55 additions and 30 deletions
|
@ -6,14 +6,6 @@
|
|||
source ~/.config/i3/common_var.sh
|
||||
source $GENERATED_MONITOR_CONF
|
||||
|
||||
SCREEN_NUMBER=${#SCREENS[@]}
|
||||
|
||||
# Set command from current WM
|
||||
MSG_COMMAND=i3-msg
|
||||
if [[ $DESKTOP_SESSION =~ ^sway$ ]]; then
|
||||
MSG_COMMAND=swaymsg
|
||||
fi
|
||||
|
||||
# Get current workspace output (Screen)
|
||||
CURRENT_WORKSPACE=$($MSG_COMMAND -t get_workspaces \
|
||||
| jq '.[] | select(.visible == true and .focused == true) | .output' \
|
||||
|
@ -33,9 +25,11 @@ done
|
|||
DESIRED_WORKSPACE=$(($SCREEN_INDEX * 10 + $1))
|
||||
|
||||
# To run in DRY RUN uncomment line in below
|
||||
MSG_COMMAND=echo
|
||||
# MSG_COMMAND=echo
|
||||
if [[ "$2" == "move" ]]; then
|
||||
notify-send "move to $DESIRED_WORKSPACE"
|
||||
$MSG_COMMAND move container to workspace number $DESIRED_WORKSPACE
|
||||
else
|
||||
notify-send "switch to $DESIRED_WORKSPACE"
|
||||
$MSG_COMMAND workspace number $DESIRED_WORKSPACE
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue