From 58906ccfdbae6def3384b4035faa64304a225d0d Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Mon, 12 Jul 2021 09:41:48 +0200 Subject: [PATCH] Added setup-screens script --- i3/.config/i3/config | 6 +++++- i3/.config/i3/scripts/setup-screens | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 i3/.config/i3/scripts/setup-screens diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 5dde698..6d143e2 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -10,6 +10,7 @@ # Please see https://i3wm.org/docs/userguide.html for a complete reference! set $mod Mod4 +set $scripts ~/.config/i3/scripts # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. @@ -260,12 +261,15 @@ bindsym $mod+c exec xfce4-terminal --role floating --hide-scrollbar --title Calc bindsym $mod+p exec xwacomcalibrate bindsym $mod+t exec thunar bindsym $mod+m exec xfce4-terminal -x mc -bindsym $mod+Shift+c exec jupyter-calculator +bindsym $mod+Shift+c exec $scripts/jupyter-calculator bindsym $mod+b exec firefox bindsym $mod+s exec pavucontrol workspace_auto_back_and_forth yes +########## Window settings ########## +exec_always $scripts/setup-screens + ########## Window settings ########## default_border normal default_floating_border normal diff --git a/i3/.config/i3/scripts/setup-screens b/i3/.config/i3/scripts/setup-screens new file mode 100755 index 0000000..6041941 --- /dev/null +++ b/i3/.config/i3/scripts/setup-screens @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Julian Mutter +# Date: 12.07.2021 + +if [[ $(xrandr | grep "HDMI1 connected") ]]; then + ~/.screenlayout/layout2screen.sh +else + ~/.screenlayout/layout1screen.sh +fi