aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/picinpic
blob: 42a27ea02163789dac125b7e495cdceabafbe49e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

swaymsg floating toggle
sleep 0.1
isfloat=$(swaymsg -t get_workspaces | jq ".[] | select(.focused == true).floating_nodes[] | select(.focused == true) | any")
if [ "$isfloat" = "true" ]; then
	swaymsg sticky enable
	swaymsg resize set 25ppt 25ppt
fi

if [ "$1" = "left" ]; then
  swaymsg move position -- "0ppt" "75ppt"
  exit
fi
swaymsg move position -- "75ppt" "75ppt"