moving forward

This commit is contained in:
vibikim 2020-08-01 22:13:25 +03:00
parent b79982368a
commit 0a5a7a95a8
3 changed files with 53 additions and 0 deletions

12
bspwm/display.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/dash
choices="arandr\nLVDS_off\ndual\nLVDS_on"
chosen=$(echo "$choices" | dmenu -i)
case "$chosen" in
arandr) arandr ;;
LVDS_off) xrandr --output LVDS-1-1 --off & ;;
dual) xrandr --output DP-4 --auto --output LVDS-1-1 --right-of DP-4 ;;
LVDS_on) xrandr --output LVDS-1-1 --auto ;;
esac

29
bspwm/power.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/sh
sure() {
options="Yes
No"
chosen=`echo "$options" | dmenu -i -p "Are you sure?" -sb red -sf black`
case "$chosen" in
Yes) exec $1 ;;
No) exit ;;
esac
}
options="shutdown
reboot
hibernate
sleep"
chosen=`echo "$options" | dmenu -i`
case "$chosen" in
shutdown)
sure "systemctl poweroff" ;;
reboot)
sure "systemctl reboot" ;;
hibernate)
sure "systemctl hibernate" ;;
sleep)
systemctl suspend ;;
esac

12
bspwm/wacom.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
#TODO option to get existing area and shrink it
choices="4:3\nMain screen\nSecond screen"
chosen=$(echo -e "$choices" | dmenu -i)
case "$chosen" in
4:3) xsetwacom set "Wacom Intuos S 2 Pen stylus" Area 0 0 11400 8550 ;;
Main screen) xsetwacom set "Wacom Intuos S 2 Pen stylus" MapToOutput HEAD-0 ;;
second screen) xsetwacom set "Wacom Intuos S 2 Pen stylus" MapToOutput HEAD-1 ;;
esac