voidrice/.local/bin/i3cmds/toggle-welcome
Hekuran 632d35ebae
update for welcome toggle (#614)
changed `~/.xprofile` to `$XDG_CONFIG_HOME/xprofile`
2020-05-02 09:46:57 -04:00

10 lines
557 B
Bash
Executable file

#!/bin/sh
# Toggles the LARBS welcome message.
PIC="${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png"
grep LARBSWELCOME "$XDG_CONFIG_HOME/xprofile" &&
( sed -i "/LARBSWELCOME/d" "$XDG_CONFIG_HOME/xprofile" && notify-send -i "$PIC" "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) ||
( echo "notify-send -i \"$PIC\" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> "$XDG_CONFIG_HOME/xprofile" &&
notify-send -i "$PIC" "LARBS welcome message" "Welcome message re-enabled." )