From 9504037034bd19f4d8350be574a86a562ec2ea90 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 31 May 2021 13:23:35 +0200 Subject: [PATCH] Add videocall workspace screen switch script --- scripts/.local/share/scripts/videocall | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/.local/share/scripts/videocall diff --git a/scripts/.local/share/scripts/videocall b/scripts/.local/share/scripts/videocall new file mode 100755 index 0000000..4fa9f01 --- /dev/null +++ b/scripts/.local/share/scripts/videocall @@ -0,0 +1,26 @@ +#!/bin/sh + +usage() { + echo "Usage: videocall " + exit 1 +} + +move_workspaces() { + if [ "$1" = "start" ]; then + swaymsg workspace "3: ", move workspace to HDMI-A-2 + swaymsg workspace "2: ", move workspace to eDP-1 + elif [ "$1" = "stop" ]; then + swaymsg workspace "3: ", move workspace to eDP-1 + swaymsg workspace "2: ", move workspace to HDMI-A-2 + else + usage + fi +} + +if [ $# -lt 1 ]; then + usage +fi + +action=$1 + +move_workspaces "$action"