File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ elif [ $(getprop droid.sultan_optimizations) == 0 ]; then
8282 echo " N" > $LYB_TASK /parameters/lyb_sultan_pid_shrink
8383fi
8484
85- [ $( getprop droid.floating_bar ) ] && if [ $( getprop droid.floating_bar) == 1 ]; then
85+ if [ $( getprop droid.floating_bar) -eq 1 ]; then
8686 su -c ' device_config put launcher ENABLE_FLOATING_SEARCH_BAR true'
8787 su -c ' am force-stop com.google.android.apps.nexuslauncher'
88- elif [ $( getprop droid.floating_bar) == 0 ];
88+ elif [ $( getprop droid.floating_bar) -eq 0 ]; then
8989 su -c ' device_config put launcher ENABLE_FLOATING_SEARCH_BAR false'
9090 su -c ' am force-stop com.google.android.apps.nexuslauncher'
9191fi
Original file line number Diff line number Diff line change @@ -474,6 +474,75 @@ xiaomi_joyose() {
474474 esac
475475}
476476
477+ floating_bar () {
478+ current_tweak=$( grep ' droid.floating_bar=' $DPROP | cut -d' =' -f2)
479+ clear
480+ blue
481+ animation_title
482+ echo " -------------------------------"
483+ animation_title
484+ echo " × Floating Search Bar × "
485+ animation_title
486+ echo " -------------------------------"
487+ animation
488+ space
489+ echo " This will only work on Pixel launcher (Tested on A14 only)"
490+ green
491+ space
492+ animation
493+ echo " ----------------------------------------"
494+ if [ " $current_tweak " = " 1" ]; then
495+ echo -n " 1 - Enable Google Floating Search Bar "
496+ current
497+ else
498+ echo " 1 - Enable Google Floating Search Bar"
499+ fi
500+ animation
501+ if [ " $current_tweak " = " 0" ]; then
502+ echo -n " 2 - Disable Google Floating Search Bar "
503+ current
504+ else
505+ echo " 2 - Disable Google Floating Search Bar"
506+ fi
507+ animation
508+ echo " 3 - Go back"
509+ animation
510+ echo " 4 - Main"
511+ animation
512+ echo " 5 - Exit"
513+ echo " ----------------------------------------"
514+ reset
515+ space
516+ echo " Your input: "
517+ read input
518+ case $input in
519+ 1)
520+ resetprop -n droid.floating_bar 1 && sed -i ' /droid.floating_bar=/s/.*/droid.floating_bar=1/' $DPROP
521+ finish
522+ misc
523+ ;;
524+ 2)
525+ resetprop -n droid.floating_bar 0 && sed -i ' /droid.floating_bar=/s/.*/droid.floating_bar=0/' $DPROP
526+ finish
527+ misc
528+ ;;
529+ 3)
530+ misc
531+ ;;
532+ 4)
533+ main
534+ ;;
535+ 5)
536+ leave
537+ ;;
538+ * )
539+ red
540+ echo " Invalid input!"
541+ reset
542+ ;;
543+ esac
544+ }
545+
477546misc () {
478547 clear
479548 blue
@@ -501,9 +570,11 @@ misc() {
501570 animation
502571 echo " 7 - Xiaomi Joyose"
503572 animation
504- echo " 8 - Main"
573+ echo " 8 - Google Floating Search Bar"
574+ animation
575+ echo " 9 - Main"
505576 animation
506- echo " 9 - Exit"
577+ echo " 10 - Exit"
507578 echo " ------------------------------------------"
508579 reset
509580 space
@@ -532,9 +603,12 @@ misc() {
532603 xiaomi_joyose
533604 ;;
534605 8)
535- main
606+ floating_bar
536607 ;;
537608 9)
609+ main
610+ ;;
611+ 10)
538612 leave
539613 ;;
540614 * )
You can’t perform that action at this time.
0 commit comments