Created
January 20, 2018 11:31
-
-
Save benjamin-thomas/dda584158f002091cf884a435379ca22 to your computer and use it in GitHub Desktop.
WIP : bypass XFCE clipboard manager when using pass/passwordstore.org
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
#!/bin/bash | |
# Load the bash completion first | |
# my_pass.sh needs to be on the load path | |
# complete -F _pass mypass.sh | |
pgrep clipman | |
if [[ $? -ne 0 ]];then | |
# clipman not running... | |
echo "XFCE clipboard manager is not running, don't use this wrapper script" | |
exit 1 | |
fi | |
xfconf-query --channel xfce4-panel --property=/plugins/clipman/tweaks/inhibit | |
if [[ $? -ne 0 ]];then | |
echo "[CREATE] inhibiting..." | |
xfconf-query --channel xfce4-panel --property=/plugins/clipman/tweaks/inhibit --create --type=bool --set=true | |
else | |
echo "[START] inhibiting..." | |
xfconf-query --channel xfce4-panel --property=/plugins/clipman/tweaks/inhibit --set=true | |
fi | |
if [[ $(xfconf-query --channel xfce4-panel --property=/plugins/clipman/tweaks/inhibit) != "true" ]];then | |
echo "FAILED to set inhibit" | |
exit 2 | |
fi | |
pass "$@" | |
echo "[STOP] inhibiting..." | |
xfconf-query --channel xfce4-panel --property=/plugins/clipman/tweaks/inhibit --set=false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment