yeets my yotes ya know
This commit is contained in:
26
proj
Executable file
26
proj
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Add or remove projectors
|
||||
c=`printf 'Add\nRemove' | dmenu -i -p 'Add/Remove screens'`
|
||||
|
||||
if [ "$c" = "Add" ]
|
||||
then
|
||||
# Grab the display device
|
||||
out=`xrandr | grep ' connected' | awk '{print $1}' | \
|
||||
dmenu -i -p 'Device to attach'`
|
||||
if [ -z "$out" ]; then exit 0; fi
|
||||
|
||||
# what side should it go on
|
||||
side=`printf 'left-of\nright-of\nabove\nbelow' | \
|
||||
dmenu -i -p 'Pick side'`
|
||||
if [ -z "$side" ]; then exit 0; fi
|
||||
|
||||
echo 'xrandr --output $out --auto $side eDP-1'
|
||||
else
|
||||
#
|
||||
out=`xrandr | grep ' connected' | awk '{print $1}' | \
|
||||
dmenu -i -p 'Device to dettach'`
|
||||
if [ -z "$out" ]; then exit 0; fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user