-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenableInput.sh
More file actions
29 lines (27 loc) · 778 Bytes
/
Copy pathenableInput.sh
File metadata and controls
29 lines (27 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
#
# @AUTHOR: Luca Leon Happel
#
#######################################
# Enable keyboard and touchpad
#######################################
echo "Enabling keyboard and touchpad"
for id in $(xinput --list | sed -n '/.*Touchpad/s/.*=\([0-9]\+\).*/\1/p')
do
xinput --enable $id
done
for id in $(xinput --list | sed -n '/.*Mouse/s/.*=\([0-9]\+\).*/\1/p')
do
xinput --enable $id
done
for id in $(xinput --list | sed -n '/.*Keyboard/s/.*=\([0-9]\+\).*/\1/p')
do
xinput --enable $id
done
#######################################
# Resore last keyboard brightness
#######################################
for bl in $(brightnessctl --list | sed -n "/.*kbd.*/s/Device '//p" | sed -n "s/' of class 'leds'://p")
do
brightnessctl --device "$bl" --restore
done