Skip to content
Snippets Groups Projects
Verified Commit 59025f2e authored by Andreas Gerlach's avatar Andreas Gerlach
Browse files

[sway] make help overlay autostart only once; improve reliability of wofi by...

[sway] make help overlay autostart only once; improve reliability of wofi by adding missing image svg
parent 36e10eb8
No related branches found
No related tags found
No related merge requests found
......@@ -18,4 +18,4 @@ exec --no-startup-id pamac-tray-appindicator
exec --no-startup-id nm-applet --indicator
exec --no-startup-id blueman-applet
exec --no-startup-id mntray
exec --no-startup-id swhelp.sh
exec --no-startup-id swhelp.sh --autostart
......@@ -4,7 +4,10 @@
# Author: Appelgriebsch
# License: MIT
if [ -f $HOME/.swhelp_overlay ]; then exit 1; fi
PIDFILE=$HOME/.swhelp_visible
FIRST_RUN=$HOME/.firstrun
if [ -f $PIDFILE ]; then exit 1; fi
DMENU_OPT="--conf /etc/xdg/wofi/overlay --style /etc/xdg/wofi/style.css --location 7 --xoffset 10 --yoffset -10"
......@@ -22,8 +25,25 @@ cat <<EOF | wofi --show dmenu $DMENU_OPT
Open Help Overlay: <b>\$mod</b> + <b>?</b>
Close Help Overlay: <b>Escape</b>
EOF
if [ -f $HOME/.swhelp_overlay ]; then rm $HOME/.swhelp_overlay; fi
if [ -f $PIDFILE ]; then rm $PIDFILE; fi
if [ -f $FIRST_RUN ]; then rm $FIRST_RUN; fi
}
touch $HOME/.swhelp_overlay
for i in "$@"
do
case $i in
--autostart)
AUTOSTART=YES
;;
*)
# unknown option
;;
esac
done
if [ "$AUTOSTART" == "YES" ]; then
if [ ! -f $FIRST_RUN ]; then exit 1; fi
fi
touch $PIDFILE
spawn_help_overlay &
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<defs>
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; }
</style>
</defs>
<path style="fill:currentColor" class="ColorScheme-Text" d="M 8 1 C 4.137 1 1 4.137 1 8 C 1 11.863 4.137 15 8 15 C 11.863 15 15 11.863 15 8 C 15 4.137 11.863 1 8 1 z M 8 3 C 9.0194 3 9.959 3.28763 10.75 3.8125 L 3.8125 10.75 C 3.28763 9.95898 3 9.0194 3 8 C 3 5.2407 5.2408 3 8 3 z M 12.1875 5.25 C 12.71237 6.04102 13 6.9806 13 8 C 13 10.7592 10.7592 13 8 13 C 6.9806 13 6.041 12.71237 5.25 12.1875 L 12.1875 5.25 z" transform="translate(4 4)"/>
</svg>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment