move scripts from xinit to cli

This commit is contained in:
Anish Lakhwara
2023-01-02 19:58:34 +10:00
parent 2236734ded
commit 90db0af0ec
2 changed files with 43 additions and 38 deletions
-29
View File
@@ -166,35 +166,6 @@ in
*.color240: #6272a4
*.color241: #b6b6b2
EOF
# hotplug
connect() {
xrandr --output HDMI-2 --same-as eDP-1
}
disconnect() {
xrandr --output HDMI-2 --off
}
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
# keyboard on curve is busted
get_keyboard_id() {
xinput list | grep 'AT Translated Set' | cut -f2 | cut -d'=' -f2 | xinput float
}
disconnect_keyboard() {
id=$(get_keyboard_id)
xinput float $id
unset id
}
attach_keyboard() {
id=$(get_keyboard_id)
xinput reattach $id 3
}
disconnect_keyboard
'';
lightdm = {
enable = true;