mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 12:10:07 +09:00
Merge in changes from Simon
Switch from compton to xcompmgr Tweak get_wifi_country to work with the desktop applet
This commit is contained in:
parent
999037b870
commit
b073ef7b43
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
|||||||
|
raspi-config (20190507) buster; urgency=medium
|
||||||
|
|
||||||
|
[ Simon Long ]
|
||||||
|
* Switch from compton to xcompmgr
|
||||||
|
* Tweak get_wifi_country to work with the desktop applet
|
||||||
|
|
||||||
|
-- Serge Schneider <serge@raspberrypi.org> Tue, 07 May 2019 16:03:15 +0100
|
||||||
|
|
||||||
raspi-config (20190502) buster; urgency=medium
|
raspi-config (20190502) buster; urgency=medium
|
||||||
|
|
||||||
* Use wpa_cli to check WiFi country setting
|
* Use wpa_cli to check WiFi country setting
|
||||||
|
34
raspi-config
Executable file → Normal file
34
raspi-config
Executable file → Normal file
@ -429,6 +429,7 @@ do_change_timezone() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_wifi_country() {
|
get_wifi_country() {
|
||||||
|
CODE=${1:-0}
|
||||||
IFACE="$(list_wlan_interfaces | head -n 1)"
|
IFACE="$(list_wlan_interfaces | head -n 1)"
|
||||||
if [ -z "$IFACE" ]; then
|
if [ -z "$IFACE" ]; then
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
@ -447,7 +448,10 @@ get_wifi_country() {
|
|||||||
if [ "$COUNTRY" = "FAIL" ]; then
|
if [ "$COUNTRY" = "FAIL" ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "$COUNTRY"
|
if [ $CODE = 0 ]; then
|
||||||
|
echo "$COUNTRY"
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
do_wifi_country() {
|
do_wifi_country() {
|
||||||
@ -1335,15 +1339,15 @@ do_gldriver() {
|
|||||||
whiptail --msgbox "$STATUS" 20 60 1
|
whiptail --msgbox "$STATUS" 20 60 1
|
||||||
}
|
}
|
||||||
|
|
||||||
do_compton() {
|
do_xcompmgr() {
|
||||||
DEFAULT=--defaultno
|
DEFAULT=--defaultno
|
||||||
CURRENT=0
|
CURRENT=0
|
||||||
if [ -e /etc/xdg/autostart/compton.desktop ]; then
|
if [ -e /etc/xdg/autostart/xcompmgr.desktop ]; then
|
||||||
DEFAULT=
|
DEFAULT=
|
||||||
CURRENT=1
|
CURRENT=1
|
||||||
fi
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --yesno "Would you like the Compton composition manager to be enabled?" $DEFAULT 20 60 2
|
whiptail --yesno "Would you like the xcompmgr composition manager to be enabled?" $DEFAULT 20 60 2
|
||||||
RET=$?
|
RET=$?
|
||||||
else
|
else
|
||||||
RET=$1
|
RET=$1
|
||||||
@ -1352,28 +1356,28 @@ do_compton() {
|
|||||||
ASK_TO_REBOOT=1
|
ASK_TO_REBOOT=1
|
||||||
fi
|
fi
|
||||||
if [ $RET -eq 0 ]; then
|
if [ $RET -eq 0 ]; then
|
||||||
if [ ! -e /usr/bin/compton ] ; then
|
if [ ! -e /usr/bin/xcompmgr ] ; then
|
||||||
apt-get -y install compton
|
apt-get -y install xcompmgr
|
||||||
fi
|
fi
|
||||||
cat << EOF > /etc/xdg/autostart/compton.desktop
|
cat << EOF > /etc/xdg/autostart/xcompmgr.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=compton
|
Name=xcompmgr
|
||||||
Comment=Start Compton compositor
|
Comment=Start xcompmgr compositor
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
Exec=compton --backend glx --unredir-if-possible --glx-swap-method buffer-age --glx-no-stencil --paint-on-overlay --vsync opengl
|
Exec=xcompmgr -a
|
||||||
EOF
|
EOF
|
||||||
STATUS=enabled
|
STATUS=enabled
|
||||||
elif [ $RET -eq 1 ]; then
|
elif [ $RET -eq 1 ]; then
|
||||||
if [ -e /etc/xdg/autostart/compton.desktop ]; then
|
if [ -e /etc/xdg/autostart/xcompmgr.desktop ]; then
|
||||||
rm /etc/xdg/autostart/compton.desktop
|
rm /etc/xdg/autostart/xcompmgr.desktop
|
||||||
fi
|
fi
|
||||||
STATUS=disabled
|
STATUS=disabled
|
||||||
else
|
else
|
||||||
return $RET
|
return $RET
|
||||||
fi
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --msgbox "The Compton composition manager is $STATUS" 20 60 1
|
whiptail --msgbox "The xcompmgr composition manager is $STATUS" 20 60 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1816,7 +1820,7 @@ do_advanced_menu() {
|
|||||||
"A5 Resolution" "Set a specific screen resolution" \
|
"A5 Resolution" "Set a specific screen resolution" \
|
||||||
"A6 Pixel Doubling" "Enable/Disable 2x2 pixel mapping" \
|
"A6 Pixel Doubling" "Enable/Disable 2x2 pixel mapping" \
|
||||||
"A7 GL Driver" "Enable/Disable experimental desktop GL driver" \
|
"A7 GL Driver" "Enable/Disable experimental desktop GL driver" \
|
||||||
"A8 Compositor" "Enable/Disable Compton composition manager" \
|
"A8 Compositor" "Enable/Disable xcompmgr composition manager" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
@ -1830,7 +1834,7 @@ do_advanced_menu() {
|
|||||||
A5\ *) do_resolution ;;
|
A5\ *) do_resolution ;;
|
||||||
A6\ *) do_pixdub ;;
|
A6\ *) do_pixdub ;;
|
||||||
A7\ *) do_gldriver ;;
|
A7\ *) do_gldriver ;;
|
||||||
A8\ *) do_compton ;;
|
A8\ *) do_xcompmgr ;;
|
||||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||||
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user