From 5a58034071911286816bbf2418a349f7657494ab Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sun, 10 Jan 2021 15:36:07 +0530 Subject: added shortcut for hdmi --- bin/.bin/disp | 7 +++++++ bin/.bin/lay | 2 -- bin/.bin/lay_edp | 2 -- bin/.bin/temp | 2 -- bin/.bin/unblock | 8 -------- 5 files changed, 7 insertions(+), 14 deletions(-) create mode 100755 bin/.bin/disp delete mode 100755 bin/.bin/lay delete mode 100755 bin/.bin/lay_edp delete mode 100755 bin/.bin/temp delete mode 100755 bin/.bin/unblock (limited to 'bin') diff --git a/bin/.bin/disp b/bin/.bin/disp new file mode 100755 index 0000000..e6de4a8 --- /dev/null +++ b/bin/.bin/disp @@ -0,0 +1,7 @@ +#!/bin/sh +status=$(cat /sys/class/drm/card0/*HDMI*/status) +if [ $status == "connected" ]; then + xrandr --output eDP --primary --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI-A-0 --mode 1366x768 --pos 0x0 --scale 1.4x1.4 --rotate normal --output DisplayPort-0 --off +else + xrandr --output eDP --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off +fi diff --git a/bin/.bin/lay b/bin/.bin/lay deleted file mode 100755 index f9ea307..0000000 --- a/bin/.bin/lay +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xrandr --output eDP --primary --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI-A-0 --mode 1366x768 --pos 0x0 --rotate normal --output DisplayPort-0 --off diff --git a/bin/.bin/lay_edp b/bin/.bin/lay_edp deleted file mode 100755 index fcac2f6..0000000 --- a/bin/.bin/lay_edp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xrandr --output eDP --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off diff --git a/bin/.bin/temp b/bin/.bin/temp deleted file mode 100755 index fec8439..0000000 --- a/bin/.bin/temp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1°C/' diff --git a/bin/.bin/unblock b/bin/.bin/unblock deleted file mode 100755 index 257c4fb..0000000 --- a/bin/.bin/unblock +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -#whitelist escape -set -e -printf "\033[0;35mSetting wlo1 down....\033[0m\n" -sudo ip link set wlo1 down -printf "\033[0;36mChanging MAC address....\033[0m\n" -sudo macchanger --mac=FC:77:74:C7:71:71 wlo1 -printf "\033[0;32mEnjoy....\033[0m\n" -- cgit v1.2.3