From 7abc0840ab65273850d339dd15010f955e254a16 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sun, 1 Nov 2020 15:53:41 +0100 Subject: [PATCH] Replace screen layout scripts with menu --- .bin/dmenu-screen-layout | 12 ++++++++++++ .bin/external-only | 6 ------ .bin/laptop-only | 2 -- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100755 .bin/dmenu-screen-layout delete mode 100755 .bin/external-only delete mode 100755 .bin/laptop-only diff --git a/.bin/dmenu-screen-layout b/.bin/dmenu-screen-layout new file mode 100755 index 0000000..ab8db6e --- /dev/null +++ b/.bin/dmenu-screen-layout @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +options="Laptop monitor\nDual monitor\nExternal monitor\nOther" + +selected=$(echo -e "$options" | dmenu -i) + +case "$selected" in + "Laptop monitor") xrandr --output eDP --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off;; + "Dual monitor") xrandr --output eDP --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --primary --mode 3840x2160 --pos 0x0 --rotate normal;; + "External monitor") xrandr --output eDP --off --output HDMI-A-0 --primary --mode 3840x2160;; + "Other") arandr;; +esac diff --git a/.bin/external-only b/.bin/external-only deleted file mode 100755 index 09480d3..0000000 --- a/.bin/external-only +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# Toggle monitor settings - -# only show on external display -xrandr --output eDP1 --off -xrandr --output HDMI1 --mode 3840x2160 --primary diff --git a/.bin/laptop-only b/.bin/laptop-only deleted file mode 100755 index 160e004..0000000 --- a/.bin/laptop-only +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xrandr --output eDP --dpi 180 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off