regular update
This commit is contained in:
parent
d33ecc32e7
commit
3347dada32
22 changed files with 322 additions and 70 deletions
|
|
@ -5,10 +5,10 @@ toggle_variable="device[${device}]:enabled"
|
|||
|
||||
hyprctl keyword "${toggle_variable}" true
|
||||
|
||||
status_file="$XDG_RUNTIME_DIR/touchpad.status"
|
||||
status_file="$HOME/.config/hypr/status/touchpad"
|
||||
|
||||
enable_touchpad() {
|
||||
printf "true" > "${status_file}"
|
||||
printf "on" > "${status_file}"
|
||||
|
||||
hyprctl notify 1 2000 0 "Enabled touchpad"
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ enable_touchpad() {
|
|||
}
|
||||
|
||||
disable_touchpad() {
|
||||
printf "false" > "${status_file}"
|
||||
printf "off" > "${status_file}"
|
||||
|
||||
hyprctl notify 0 2000 0 "Disabled Touchpad"
|
||||
|
||||
|
|
@ -24,11 +24,12 @@ disable_touchpad() {
|
|||
}
|
||||
|
||||
if ! [ -f "${status_file}" ]; then
|
||||
hyprctl notify 3 3000 0 "Status file missing"
|
||||
enable_touchpad
|
||||
else
|
||||
if [ $(cat "${status_file}") = "true" ]; then
|
||||
if [ $(cat "${status_file}") = "on" ]; then
|
||||
disable_touchpad
|
||||
elif [ $(cat "${status_file}") = "false" ]; then
|
||||
elif [ $(cat "${status_file}") = "off" ]; then
|
||||
enable_touchpad
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue