Removed automatic monitor detection, switched to arandr
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
8
config/.scripts/quotes/bojack_horseman.md
Normal file
8
config/.scripts/quotes/bojack_horseman.md
Normal file
@@ -0,0 +1,8 @@
|
||||
We’re just two lonely people trying to hate ourselves a little less.
|
||||
Before I leapt, I should have seen the view from halfway down.
|
||||
Every happy ending has the day after the happy ending.
|
||||
There’s no deep down. I believe that all we are is what we do.
|
||||
It gets easier. Every day it gets a little easier. But you gotta do it every day — that’s the hard part. But it does get easier.
|
||||
Sometimes, life's a bitch and then you keep living.
|
||||
I don't understand how people live. It's amazing to me that people wake up every morning and say: "Yeah! Another day, let's do it!" How do people do it? I don't know how.
|
||||
Don't stop dancing.
|
||||
@@ -3,8 +3,6 @@
|
||||
lower_battery_threshold=10
|
||||
KBD="";
|
||||
oldKBD="";
|
||||
intern="eDP";
|
||||
extern="HDMI-A-0";
|
||||
|
||||
function kb_routine {
|
||||
oldKBD="$KBD";
|
||||
@@ -30,29 +28,9 @@ function battery_routine {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function monitor {
|
||||
if xrandr | grep "$extern disconnected"; then
|
||||
monstats="$intern"
|
||||
else
|
||||
monstats="$extern"
|
||||
fi
|
||||
|
||||
if [ "$oldmonstats" != "$monstats" ]; then
|
||||
oldmonstats="$monstats"
|
||||
feh --randomize --bg-fill $HOME/Pictures/Wallpaper/basic/*;
|
||||
dunstify -r 1 "Using $monstats.";
|
||||
if [ "$monstats" == "$intern" ]; then
|
||||
xrandr --output "$extern" --off --output "$intern" --auto;
|
||||
else
|
||||
xrandr --output "$intern" --off --output "$extern" --auto;
|
||||
fi
|
||||
fi
|
||||
}
|
||||
while :
|
||||
do
|
||||
kb_routine;
|
||||
battery_routine;
|
||||
monitor;
|
||||
sleep 1;
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user