Removed automatic monitor detection, switched to arandr

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-08-23 19:00:23 +02:00
parent 767910406f
commit 09459e602d
15 changed files with 67 additions and 149 deletions

View File

@@ -0,0 +1,8 @@
Were 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.
Theres 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 — thats 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.

View File

@@ -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