diff --git a/Bin/screen_layout.sh b/Bin/screen_layout.sh deleted file mode 100755 index 16a4bc8..0000000 --- a/Bin/screen_layout.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -activeconfig='hdmi' - -if [ -f ~/.screenlayout.info ] ; then - activeconfig=`cat ~/.screenlayout.info` -fi - -if [ ${activeconfig} == 'lvds1' ] ; then - ~/.screenlayout/dp.sh - echo dp > ~/.screenlayout.info -else - ~/.screenlayout/lvds1.sh - echo lvds1 > ~/.screenlayout.info -fi - -fbsetbg -a `tail -n 1 .fluxbox/lastwallpaper|cut -d'|' -f 2` diff --git a/Bin/screenlayout.sh b/Bin/screenlayout.sh new file mode 100755 index 0000000..992162c --- /dev/null +++ b/Bin/screenlayout.sh @@ -0,0 +1,59 @@ +#! /bin/bash + +activeconfig='laptop' + +if [ -f ~/.screenlayout.info ] ; then + activeconfig=`cat ~/.screenlayout.info` +fi + +nextconfig='laptop' + +case $activeconfig in + home) + nextconfig='home-office' + ;; + home-office) + nextconfig='laptop' + ;; + laptop) + nextconfig='home' + ;; +esac + +echo ${nextconfig} > ~/.screenlayout.info + +case $nextconfig in + home) + # Home + xrandr --output DP-2-1 --primary --mode 2560x1080 --pos 0x0 --rotate normal \ + --output DP-2-2 --off \ + --output DP-2-3 --off \ + --output eDP-1 --off \ + --output HDMI-2 --off \ + --output HDMI-1 --off \ + --output DP-2 --off \ + --output DP-1 --off + ;; + home-office) + # Home Office + xrandr --output DP-2-1 --primary --mode 2560x1080 --pos 0x520 --rotate normal \ + --output DP-2-2 --mode 1920x1080 --pos 2560x0 --rotate left \ + --output DP-2-3 --off \ + --output eDP-1 --off \ + --output HDMI-2 --off \ + --output HDMI-1 --off \ + --output DP-2 --off \ + --output DP-1 --off + ;; + laptop) + # Laptop mode + xrandr --output DP-2-1 --off \ + --output DP-2-2 --off \ + --output DP-2-3 --off \ + --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \ + --output HDMI-2 --off \ + --output HDMI-1 --off \ + --output DP-2 --off \ + --output DP-1 --off + ;; +esac diff --git a/config/i3/config b/config/i3/config index 0483e4e..bcd23f8 100644 --- a/config/i3/config +++ b/config/i3/config @@ -84,7 +84,7 @@ bindsym $mod+a focus parent # WORKSPACES # -set $wksp1 "1: Primary" +set $wksp1 "1: Main" set $wksp2 "2: Works" set $wksp3 "3: Slack" set $wksp4 "4: Spotify" @@ -236,6 +236,9 @@ bindsym XF86AudioNext exec qdbus org.mpris.MediaPlayer2.spotify /org/mpris/Media bindsym Print exec ~/Bin/screenshooter.sh bindsym $mod+Print exec ~/Bin/slip +# Switch screen layouts +bindsym XF86Display exec ~/Bin/screenlayout.sh + # ------------------------------------------------------------------------------------------------- # COLORS #