From 494877e84fe447c1aee323216f81def86453c08f Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Mon, 23 Dec 2024 14:10:45 +0500 Subject: [PATCH] Add script to populate the first i3/sway workspace with terminal apps --- shell_scripts/home_workspace.fish | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 shell_scripts/home_workspace.fish diff --git a/shell_scripts/home_workspace.fish b/shell_scripts/home_workspace.fish new file mode 100755 index 0000000..3b28e96 --- /dev/null +++ b/shell_scripts/home_workspace.fish @@ -0,0 +1,31 @@ +#!/usr/bin/fish + +set ipc_comm i3-msg +set term_comms \ + "contour class contour" \ + "contour class neomutt execute neomutt" \ + "contour class stmps execute stmps --mpris" + +function spawn_terms + for i in $term_comms + $ipc_comm "exec $i" + sleep 0.2 + end +end + +function set_layout + $ipc_comm "[class=contour] split toggle" + $ipc_comm "[class=neomutt] move up" + $ipc_comm "[class=neomutt] resize set 40 ppt" + $ipc_comm "[class=stmps] resize set height 30 ppt" +end + +function spawn_home + $ipc_comm "workspace 1" + $ipc_comm "layout splitv" + spawn_terms + sleep 0.5 + set_layout +end + +spawn_home