diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-07-11 20:02:35 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-07-13 15:49:37 -0700 |
commit | b9f5e07597346634cd509411b5ebea5bc5937bb4 (patch) | |
tree | c0bfc1f2c1d352b16741938160dc5953440b1b1b /bin | |
parent | 6530548d9d33d70c653eb996336b88e928672fdd (diff) | |
download | dotfiles-b9f5e07597346634cd509411b5ebea5bc5937bb4.tar.gz |
fix debian-ftp-master multi-monitor mode
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debian-ftp-master | 13 | ||||
-rwxr-xr-x | bin/i3-fresh-workspace | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/bin/debian-ftp-master b/bin/debian-ftp-master index 6694ec24..a64f129e 100755 --- a/bin/debian-ftp-master +++ b/bin/debian-ftp-master @@ -34,7 +34,7 @@ if ! wmctrl -lx | grep -q "emacs.Emacs"; then emacsclient -c -a '' -n -e '(switch-to-buffer "*scratch*")' fi -i3-fresh-workspace +first="$(i3-fresh-workspace)" # first establish a control socket, so that the two interactive ssh # connections don't race to do this and one of them disables multiplexing @@ -87,13 +87,13 @@ wmctrl -R "*NEW notes*" monitors="$(xrandr -q | grep ' connected' | wc -l)" monwidth="$(xdpyinfo | awk '/dimensions/{print $2}' | cut -dx -f1)" if [ $monitors -gt 1 ] ; then - i3-fresh-workspace - i3-msg workspace back_and_forth + second="$(i3-fresh-workspace)" + i3-msg workspace "$first" # ensure mc window is on primary output, since I spend more time # in it (I think this is sensible!) i3-msg move workspace to output primary # move the dak control window - i3-msg focus left, focus left, move to workspace back_and_forth + i3-msg focus left, focus left, move to workspace "$second" # split windows i3-msg move up sleep 0.2 @@ -104,11 +104,12 @@ if [ $monitors -gt 1 ] ; then # this script; workspace 7 will be left displayed on the primary # monitor if [ "$(hostname -f)" = "iris.silentflame.com" ]; then - i3-msg workspace back_and_forth + i3-msg workspace "$second" i3-msg move workspace to output LVDS-1 + i3-msg workspace "$second" else # no machine-specific config # ensure dak control window focused - i3-msg workspace 9 + i3-msg workspace "$first" fi elif [ $monwidth -ge 1920 ]; then # three column split (i.e. two mc columns and dak column) should diff --git a/bin/i3-fresh-workspace b/bin/i3-fresh-workspace index dcbda8f2..89a5de48 100755 --- a/bin/i3-fresh-workspace +++ b/bin/i3-fresh-workspace @@ -25,8 +25,12 @@ if ($next_free_workspace) { # container to workspace back_and_forth' binding to move any # other wanted containers over there, before finally switching # the view with 'workspace back_and_forth' - system "i3-msg move container to workspace $next_free_workspace"; + system + "i3-msg move container to workspace $next_free_workspace >/dev/null"; } else { - system "i3-msg workspace $next_free_workspace"; + system "i3-msg workspace $next_free_workspace >/dev/null"; } } + +# added for the benefit of ~/src/dotfiles/bin/debian-ftp-master +print "$next_free_workspace\n"; |