move scripts from xinit to cli
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user