home/bin/screenlayout.sh
Damien Broqua 0d384b22bf I3 to Sway (#1)
Added some ignored folders and files

Updated waybar clock for Debian 11

Fixed bug on screen definition

Fixed Iiyama North America PL2483H 1173700204528

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Some changes for work environment

Some changes for work environment

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Added .mp3 files

Updated waybar config for laptop

Added vim-jsx

Added Teams to startup section (sad day in life!)

Updated mpd config (local source)

Added script for syncing my music

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Updated ranger config

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Replaced termite with alacritty

Replaced termite by alacritty

Updated rsync.sh results

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Updated github user

Updated irc alias

Minor changes

Added master if fail fait dev*

Added zsh prompt

Updated output definitions

Added KDEConnect at startup

Added second screen

Merge branch 'gentoo-sway' of git.darkou.fr:dbroqua/home into gentoo-sway

Updated README

Added C.A.V.A.

Fixed bug for vte

Added Tofu HHKB keyboard config

Added script to update system

Updated FuzzFm entry

Added menu entry for Carnet

Added qcad's ebuild

Updated waybar for Thinkpad

Updated temperature list for Thinkpad

Fixed bug

Updated input for thinkpad

Added script to order files for Alpine car audio system

Updated Fuzz url

Added Grammalecte plugin

Added displays for ThinkStation and ThinkPad

Merge branch 'gentoo-sway' of framagit.org:dbroqua/home into gentoo-sway

Updated waybar for laptop

Fixed bug on adjust brightness

Moved applications

Co-authored-by: dbroqua <contact@darkou.fr>
Co-authored-by: dbroqua <dbroqua@mousur.org>
Reviewed-on: #1
Co-Authored-By: Damien Broqua <dbroqua@noreply.localhost>
Co-Committed-By: Damien Broqua <dbroqua@noreply.localhost>
2021-10-21 21:40:47 +02:00

72 lines
1.8 KiB
Bash
Executable file

#! /bin/bash
activeconfig='laptop'
if [ -f ~/.screenlayout.info ] ; then
activeconfig=`cat ~/.screenlayout.info`
fi
nextconfig='laptop'
case $activeconfig in
home)
nextconfig='homeoffice'
;;
homeoffice)
nextconfig='laptop'
;;
laptop)
nextconfig='home'
;;
esac
if [ $1 ]; then
if [ "$1" = "menu" ]; then
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)"
exit 0
else
nextconfig=$1
fi
fi
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
;;
homeoffice)
# Home Office
xrandr --output DP-2-1 --primary --mode 2560x1080 --pos 0x0 --rotate normal \
--output DP-2-2 --mode 1920x1080 --pos 2560x0 --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
# Reset wallpaper
~/bin/wallpaper.sh