Created
August 26, 2019 04:43
-
-
Save debxp/8530d52e841927665b3c11f614d43d86 to your computer and use it in GitHub Desktop.
Script to toggle xfce composite and launcher icon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=Compositor... | |
Comment= | |
Exec=/home/gda/.local/bin/xfce4-composite-toggle | |
Icon=/home/gda/docs/pics/icons/composite-true.svg | |
Path= | |
Terminal=false | |
StartupNotify=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
launcher="/home/gda/.config/xfce4/panel/launcher-11/composite-toggle.desktop" | |
status="$(xfconf-query -c xfwm4 -p /general/use_compositing)" | |
[[ $status = "true" ]] && valor="false" || valor="true" | |
icon_path="Icon=/home/gda/docs/pics/icons" | |
icon="composite-$valor.svg" | |
sed -i "s|^Icon.*$|$icon_path/$icon|g" $launcher | |
eval "xfconf-query -c xfwm4 -p /general/use_compositing -s $valor" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment