From 54ace06947a4067653264680606fb997d89a3e6a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 7 Aug 2022 16:35:49 +0530 Subject: sync --- scripts/monitor.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/monitor.sh') diff --git a/scripts/monitor.sh b/scripts/monitor.sh index 93a0282..bc719b9 100755 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source "$HOME/scripts/modules/rofi-menu.sh"; @@ -6,10 +6,10 @@ PRIMARY="eDP1"; list-monitors() { xrandr --listmonitors | grep -v 'Monitors:' | awk '{print $4 " (" $3 ")"}'; } -monitor-off() { xrandr --output ${1:-"HDMI-1"} --off; }; +monitor-off() { xrandr --output ${1:-"HDMI1"} --off; }; monitor-on() { - xrandr --output ${2:-"HDMI-1"} --auto --${1:-"right-of"} $PRIMARY; + xrandr --output ${2:-"HDMI1"} --auto --${1:-"right-of"} $PRIMARY; } show-menu() { @@ -19,6 +19,9 @@ show-menu() { case $1 in ls) list-monitors ;; on) monitor-on "$2" "$3" ;; + sidekick) + xrandr --output ${3:-"HDMI1"} --auto --${2:-"left-of"} $PRIMARY --rotate right --brightness 1.5 + ;; off) monitor-off "$2" ;; menu) show-menu ;; *) echo "Fuck off" ;; -- cgit v1.3.1