curve: update monitor script

This commit is contained in:
Anish Lakhwara committed 2025-05-24 12:44:02 -07:00
1 parent 237aeff312
commit 64f39e2fdc
2 files changed
+9

No files matched your search

+3
View File
@@ -1 +1,4 @@
.direnv/
.direnv/*
.direnv/**
.envrc
+6
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