curve: update monitor script

This commit is contained in:
Anish Lakhwara 2025-05-24 12:44:02 -07:00
parent 237aeff312
commit 64f39e2fdc
2 changed files with 9 additions and 0 deletions

3
.gitignore vendored
View file

@ -1 +1,4 @@
.direnv/
.direnv/*
.direnv/**
.envrc

View file

@ -62,6 +62,7 @@
pandoc
taskwarrior-tui
vimwiki-cli
zk
(pkgs.writeScriptBin "jq-repl" ''
#!/usr/bin/env bash
@ -95,10 +96,15 @@
# Turn it on if it was off
xrandr --output HDMI-2 --auto
xrandr --output HDMI-2 --same-as eDP-1
xrandr --output eDP-1 --off
pkill -9 polybar
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
polybar mybar > $XDG_DATA_HOME/polybar.log 2>&1 &
}
disconnect() {
xrandr --output HDMI-2 --off
xrandr --output eDP-1 --auto
}
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect