From 8b646cdc586244f741bfe71be9c58997bb088009 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 8 Oct 2021 17:05:41 +0200 Subject: [PATCH] home: fish: add docking / undocking scripts --- home/fish/functions/dock.fish | 19 +++++++++++++++++++ home/fish/functions/undock.fish | 11 +++++++++++ 2 files changed, 30 insertions(+) create mode 100644 home/fish/functions/dock.fish create mode 100644 home/fish/functions/undock.fish diff --git a/home/fish/functions/dock.fish b/home/fish/functions/dock.fish new file mode 100644 index 0000000..5780954 --- /dev/null +++ b/home/fish/functions/dock.fish @@ -0,0 +1,19 @@ +function dock + xrandr \ + --output eDP-1 --mode 1920x1080 --pos 1920x0 --rotate normal \ + --output DP-1-1 --primary --mode 1920x1200 --pos 0x0 --rotate normal \ + --output DP-1-2 --off \ + --output DP-1-3 --off \ + --output DP-1 --off \ + --output HDMI-1 --off \ + --output DP-2 --off \ + --output HDMI-2 --off + + i3-msg '[workspace="1"]' move workspace to output DP-1-1 + i3-msg '[workspace="2"]' move workspace to output DP-1-1 + i3-msg '[workspace="3"]' move workspace to output DP-1-1 + i3-msg '[workspace="4"]' move workspace to output DP-1-1 + i3-msg '[workspace="9"]' move workspace to output DP-1-1 + + i3-msg '[workspace="10"]' move workspace to output eDP-1 +end diff --git a/home/fish/functions/undock.fish b/home/fish/functions/undock.fish new file mode 100644 index 0000000..89cafe6 --- /dev/null +++ b/home/fish/functions/undock.fish @@ -0,0 +1,11 @@ +function undock + xrandr \ + --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \ + --output DP-1-1 --off \ + --output DP-1-2 --off \ + --output DP-1-3 --off \ + --output DP-1 --off \ + --output HDMI-1 --off \ + --output DP-2 --off \ + --output HDMI-2 --off +end