From 0d846193ae8b2e22b4c993caa67646387408030f Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 31 Oct 2020 00:41:56 +0100 Subject: [PATCH] Add automatic launch at startup --- bin/launch_mail_worksplace.sh | 14 ++++++++++++++ config/sway/conf.d/rick.config | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 bin/launch_mail_worksplace.sh diff --git a/bin/launch_mail_worksplace.sh b/bin/launch_mail_worksplace.sh new file mode 100755 index 0000000..121eba9 --- /dev/null +++ b/bin/launch_mail_worksplace.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# script for launching my mail workspace + +swaymsg 'workspace $ws2; layout splitv' +swaymsg 'exec $term --class=mail neomutt' +swaymsg 'exec $term --class=cal ikhal' + +while :; do + sleep .2 + swaymsg '[app_id="cal"] focus' 2>/dev/null && break +done +swaymsg 'splith; exec $term' + +exit 0 diff --git a/config/sway/conf.d/rick.config b/config/sway/conf.d/rick.config index 561a9c5..4df52e8 100644 --- a/config/sway/conf.d/rick.config +++ b/config/sway/conf.d/rick.config @@ -18,3 +18,15 @@ exec swayidle \ timeout 600 'swaymsg "output * dpms off"' \ resume 'swaymsg "output * dpms on"' \ before-sleep 'swaylock -i $lock_bg' + +# Autolaunch +for_window [app_id="mail"] resize set height 600 px + +# $ws3 firefox +exec swaymsg 'workspace $ws3; layout tabbed; exec firefox' + +# $ws5 : tabbed layout (Remmina) +exec swaymsg 'workspace $ws5l layout tabbed' + +# launch mail workspace +exec ~/local/bin/launch_mail_workspace.sh