PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: _libinput Size: 8.18 KB
/usr/share/zsh/site-functions/_libinput

#compdef libinput

(( $+functions[_libinput_commands] )) || _libinput_commands()
{
	local -a commands
	commands=(
		"list-devices:List all devices recognized by libinput"
		"debug-events:Print all events as seen by libinput"
		"debug-gui:Show a GUI to visualize libinput's events"
		"debug-tablet:Show tablet axis and button values"
		"measure:Measure various properties of devices"
		"analyze:Analyze device data"
		"record:Record the events from a device"
		"replay:Replay the events from a device"
	)

	_describe -t commands 'command' commands
}

__all_seats()
{
	# Obviously only works with logind
	local -a seats
	seats=${(f)"$(loginctl --no-legend --no-pager list-seats 2>/dev/null)"}
	if [[ -z $seats ]]; then
		# Can always offer seat0, even if we can't enumerate the seats
		compadd "$@" - seat0
	else
		compadd "$@" - $seats
	fi
}

(( $+functions[_libinput_list-devices] )) || _libinput_list-devices()
{
	_arguments \
		'--help[Show help and exit]' \
		'--version[show version information and exit]'
}

(( $+functions[_libinput_debug-events] )) || _libinput_debug-events()
{
	_arguments \
		'--help[Show debug-events help and exit]' \
		'--quiet[Only print libinput messages and nothing from this tool]' \
		'--verbose[Use verbose output]' \
		'--show-keycodes[Make all keycodes visible]' \
		'--grab[Exclusively grab all opened devices]' \
		'--device=[Use the given device with the path backend]:device:_files -W /dev/input/ -P /dev/input/' \
		'--udev=[Listen for notifications on the given seat]:seat:__all_seats' \
		'--apply-to=[Apply configuration options where the device name matches the pattern]:pattern' \
		'--disable-sendevents=[Disable send-events option for the devices matching the pattern]:pattern' \
		'--set-click-method=[Set the desired click method]:click-method:(none clickfinger buttonareas)' \
		'--set-scroll-method=[Set the desired scroll method]:scroll-method:(none twofinger edge button)' \
		'--set-scroll-button=[Set the button to the given button code]' \
		'--set-profile=[Set pointer acceleration profile]:accel-profile:(adaptive flat)' \
		'--set-speed=[Set pointer acceleration speed (within range \[-1, 1\])]' \
		'--set-tap-map=[Set button mapping for tapping]:tap-map:((  \
			lrm\:2-fingers\ right-click\ /\ 3-fingers\ middle-click \
			lmr\:2-fingers\ middle-click\ /\ 3-fingers\ right-click \
		))' \
		+ '(tap-to-click)' \
		'--enable-tap[Enable tap-to-click]' \
		'--disable-tap[Disable tap-to-click]' \
		+ '(drag)' \
		'--enable-drag[Enable tap-and-drag]' \
		'--disable-drag[Disable tap-and-drag]' \
		+ '(drag-lock)' \
		'--enable-drag-lock[Enable drag-lock]' \
		'--disable-drag-lock[Disable drag-lock]' \
		+ '(natural-scrolling)' \
		'--enable-natural-scrolling[Enable natural scrolling]' \
		'--disable-natural-scrolling[Disable natural scrolling]' \
		+ '(left-handed)' \
		'--enable-left-handed[Enable left handed button configuration]' \
		'--disable-left-handed[Disable left handed button configuration]' \
		+ '(middlebutton)' \
		'--enable-middlebutton[Enable middle button emulation]' \
		'--disable-middlebutton[Disable middle button emulation]' \
		+ '(dwt)' \
		'--enable-dwt[Enable disable-while-typing]' \
		'--disable-dwt[Disable disable-while-typing]'
}

(( $+functions[_libinput_debug-gui] )) || _libinput_debug-gui()
{
	_arguments \
		'--help[Show debug-gui help and exit]' \
		'--verbose[Use verbose output]' \
		'--grab[Exclusively grab all opened devices]' \
		'--device=[Use the given device with the path backend]:device:_files -W /dev/input/ -P /dev/input/' \
		'--udev=[Listen for notifications on the given seat]:seat:_libinput_all_seats'
}

(( $+functions[_libinput_debug-tablet] )) || _libinput_debug-tablet()
{
	_arguments \
		'--help[Show debug-tablet help and exit]' \
		'--device=[Use the given device with the path backend]:device:_files -W /dev/input/ -P /dev/input/' \
		'--udev=[Use the first tablet device on the given seat]:seat:_libinput_all_seats'
}


(( $+functions[_libinput_measure] )) || _libinput_measure()
{
	local curcontext=$curcontext state line ret=1
	local features
	features=(
		"fuzz:Measure touch fuzz to avoid pointer jitter"
		"touch-size:Measure touch size and orientation"
		"touchpad-tap:Measure tap-to-click time"
		"touchpad-pressure:Measure touch pressure"
	)

	_arguments -C \
		'--help[Print help and exit]' \
		':feature:->feature' \
		'*:: :->option-or-argument'

	case $state in
		(feature)
			_describe -t features 'feature' features
			;;
		(option-or-argument)
			curcontext=${curcontext%:*:*}:libinput-measure-$words[1]:
			if ! _call_function ret _libinput_measure_$words[1]; then
				_message "unknown feature: $words[1]"
			fi
			;;
	esac
	return ret
}

(( $+functions[_libinput_measure_fuzz] )) || _libinput_measure_fuzz()
{
	_arguments \
		'--help[Show help message and exit]' \
		':device:_files -W /dev/input/ -P /dev/input/'
}

(( $+functions[_libinput_measure_touch-size] )) || _libinput_measure_touch-size()
{
	_arguments \
		'--help[Show help message and exit]' \
		'--touch-threshold=[Assume a touch pressure threshold of "down:up"]' \
		'--palm-threshold=[Assume a palm threshold of N]' \
		':device:_files -W /dev/input/ -P /dev/input/'
}

(( $+functions[_libinput_measure_touchpad-pressure] )) || _libinput_measure_touchpad-pressure()
{
	_arguments \
		'--help[Show help message and exit]' \
		'--touch-threshold=[Assume a touch pressure threshold of "down:up"]' \
		'--palm-threshold=[Assume a palm threshold of N]' \
		':device:_files -W /dev/input/ -P /dev/input/'
}

(( $+functions[_libinput_measure_touchpad-tap] )) || _libinput_measure_touchpad-tap()
{
	_arguments \
		'--help[Show help message and exit]' \
		'--format=dat[Specify the data format to be printed. The default is "summary"]'
		':device:_files -W /dev/input/ -P /dev/input/'
}

(( $+functions[_libinput_analyze_per-slot-delta] )) || _libinput_analyze_per-slot-delta()
{
	_arguments \
		'--help[Show help message and exit]' \
		':recording:_files'
}

(( $+functions[_libinput_analyze_touch-down-state] )) || _libinput_analyze_touch-down-state()
{
	_arguments \
		'--help[Show help message and exit]' \
		':recording:_files'
}

(( $+functions[_libinput_analyze_recording] )) || _libinput_analyze_recording()
{
	_arguments \
		'--help[Show help message and exit]' \
		':recording:_files'
}

(( $+functions[_libinput_analyze] )) || _libinput_analyze()
{
	local curcontext=$curcontext state line ret=1
	local features
	features=(
		"per-slot-delta:analyze relative movement per touch per slot"
		"recording:analyze a recording by printing a pretty table"
		"touch-down-state:analyze a recording for logical touch down states"
	)

	_arguments -C \
		'--help[Print help and exit]' \
		':feature:->feature' \
		'*:: :->option-or-argument'

	case $state in
		(feature)
			_describe -t features 'feature' features
			;;
		(option-or-argument)
			curcontext=${curcontext%:*:*}:libinput-analyze-$words[1]:
			if ! _call_function ret _libinput_analyze_$words[1]; then
				_message "unknown feature: $words[1]"
			fi
			;;
	esac
	return ret
}

(( $+functions[_libinput_record] )) || _libinput_record()
{
	_arguments \
		'--help[Show help message and exit]' \
		'--all[Record all /dev/input/event* devices available on the system]' \
		'--autorestart=[Terminate the current recording after s seconds of device inactivity]' \
		{-o+,--output=}'[Specify the output file to use]:file:_files -g "*.yml"' \
		'--multiple[Record multiple devices at once]' \
		'--show-keycodes[Show keycodes as-is in the recording]' \
		'--with-libinput[Record libinput events alongside device events]' \
		'--with-hidraw[Record hidraw events alongside device events]' \
		'*::device:_files -W /dev/input/ -P /dev/input/'
}

(( $+functions[_libinput_replay] )) || _libinput_replay()
{
	_arguments \
		'--help[Show help message and exit]' \
		':recording:_files'
}

_libinput()
{
	local curcontext=$curcontext state line ret=1

	_arguments -C \
		{-h,--help}'[Show help message and exit]' \
		'--version[Show version information and exit]' \
		':command:->command' \
		'*:: :->option-or-argument' && return

	case $state in
		(command)
			_libinput_commands && ret=0
			;;
		(option-or-argument)
			curcontext=${curcontext%:*:*}:libinput-$words[1]:
			if ! _call_function ret _libinput_$words[1]; then
				_message "unknown libinput command: $words[1]"
			fi
			;;
	esac
	return ret
}

_libinput

Directory Contents

Dirs: 0 × Files: 28

Name Size Perms Modified Actions
2.84 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
9.36 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
6.18 KB lrw-r--r-- 2024-08-12 18:00:48
Edit Download
1.89 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
14.58 KB lrw-r--r-- 2026-01-28 08:27:23
Edit Download
20.25 KB lrw-r--r-- 2026-03-10 23:36:54
Edit Download
643 B lrw-r--r-- 2024-04-17 17:19:24
Edit Download
2.73 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
7.03 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
779 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
8.18 KB lrw-r--r-- 2021-12-13 03:43:13
Edit Download
3.68 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
6.25 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
120 B lrw-r--r-- 2026-05-05 09:12:24
Edit Download
128 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
505 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
318 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
263 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
19.50 KB lrw-r--r-- 2026-05-05 15:47:58
Edit Download
3.76 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
5.50 KB lrw-r--r-- 2026-05-05 15:44:27
Edit Download
633 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
1.15 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
330 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
4.25 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
744 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
2.00 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
8.06 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
 !"#$%&'(()*+,-./00123456789 t\ wIDATx ]ys  47Y ƒ -  "  Rv  < f{Ɛ $k l L > L  ~h^ 1  [  r G t& h  l F z3O Y ! p A(_g̷ E8 )S 8 c  Kb"z ~ 5 J xAL WU <  *  5 m;W a pB h ~P J 2 3 6 ҙ .Ƹ P i  4g F R L P ΪK/D  M v (a3 k J Œ4N5* SH ` SdJ z  O J Xՠ V>u ߱ BE&L b2 ?2` tX+  c CB A$ i b C ĀMB E : /  # Dx &l =q Ty  0 \p I ( L Ǎ { e 4k ;`u^ヲ eP!( d {  )T A 8 O;Ě n >;s6 !  :Nx `[S D HU ~ q›J F} a g*D 49 / pn k h (t 8NxƐF _!r չ7 ZR R׷ q/5") Ӎ NY 0 x sZ!   o  fu  ,  K"$ ? pg  㕣=  1» {h " fh7    y  } € +7  $ y " X —ą - G P u 4 m >J 5 L =V ' ^@I p ?MS xЌ XV P ! h "C NS9B8̢ ]!K  e   zA , ӏkbY  !< XQ ٿyS| *" f { w  4@[S <  # 0 ! js [m  =,~ o "ݎ DHf Wo $ g ! Vԅ t mB /y Wf V4񺍸 c+@x?  B ~u " xUN e 0 BĂ) ~J pz! 7y6]l Ԥ@ P a< O /DHC `≻  N m"$  0ObB }{ x AO FCG D R ^ "B  { WDH  UR l@ T #  +"d T ; 0 i  D}. 7 ` ' ] w rE &S i ƕiTD EL P _ u h $ Ա FG wVD G L R Zf ' .!] J /ZR oGЍs Mr Ĥ ʬ 3 Q [3 cL ` ^ p + ( F;# B 5 '  2Y f [  ϶R0e }  E 7 6M aۮ H <& n % L] E}Up x紉, Uw' Q  Ǯշo k ވۙ 0N94 VX5 xEDE l D #֤ } C o )W :  ^ s 9  bRf iX5u ཱི 4 :[  T 1. | [E 2ؽ Iy\ : o x K G 5 ylP ' uK E ftb/i[3 .g _  [3M n G, #NwQ5~  ؚ) | n =Ц"x qg gB ` 듘 ~ x w ? ? R~  _ u. &VQ K˻   H C ( TN˄+ `C dA nB׭ D 3"Z G ê ^k H_ /- ~ " R_  .8 Z_ 6@ o  xg  uP ? 3լ @7AM!  E7^ - =V L  x  g-D0  CtmW 7  O  G _ WD0 g C  w1 r d w : a | \  *" f nֳ ^ H# f L ` Z ۽hV  }S F r0Ù Bć5r] @! NL iQ]{s^=4 d  WD  "  "   M; t" 8 5 e dL| "-*st" ) SWD ?R[S e ooF  20.D ? bo =) A i o d ģ ZҰaO @E =) i D a &ܟa CϞ y6 ,<%{^x%{f8? `iw^ ?/ M * IEND B`