phosh proximity sensor toggle script
#1
id | grep root || sudo $0
NUMBER=`cat /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale`
if [ $NUMBER = 0.100000 ]
then
  echo turning off
  echo 6.4 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
else
  echo turning on
  echo 0.1 > /sys/module/stk3310/drivers/i2c\:stk3310/2-0048/iio\:device2/in_proximity_scale
fi

works for me under manjaro phosh, YMMV
if it doesnt work see if that "iio\:device2" became device 1 or 0 or ...

is there an easy way to tie this to an icon?
  Reply


Messages In This Thread
phosh proximity sensor toggle script - by D4rkh0rs3 - 05-12-2021, 11:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Mobian with X11 without Wayland and Phosh. Manieck71 0 1,401 09-09-2023, 07:35 AM
Last Post: Manieck71
  Proximity lock on Plasma Mobile alpineduck 0 1,291 08-14-2023, 05:51 PM
Last Post: alpineduck
  How to disable lock screen in Phosh? lat 14 16,623 03-31-2023, 04:17 AM
Last Post: Eugo
  Fedora + Phosh for PinePhone njha 74 151,056 12-12-2022, 10:19 PM
Last Post: wcdeich4@hotmail.com
  Enable 'upcoming-events' on Mobian/Phosh Korac 3 3,010 09-14-2022, 01:19 AM
Last Post: dukla2000
  Advise: ENABLE animations before updating phosh! Otherwise freezes and crashes! dante404 5 4,209 08-18-2022, 02:03 PM
Last Post: dante404
  Phosh message notifications issue itstoughtofocus 2 3,169 08-15-2022, 06:39 AM
Last Post: nemsys
  Building an image with phosh liara 1 2,198 02-01-2022, 08:26 AM
Last Post: kqlnut
  More useful terminal key layout for phosh's squeekboard Boern 21 30,907 01-15-2022, 02:35 PM
Last Post: gilwood
  Flat-file database script for pinephone terminal cabbie001 0 1,463 11-21-2021, 06:17 PM
Last Post: cabbie001

Forum Jump:


Users browsing this thread: 1 Guest(s)