From 51a2408e84b6f88f37808e4d23284882a3958b4b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 22 Mar 2020 09:58:59 -0400 Subject: [PATCH] toggle-welcome separate script --- .config/i3/config | 2 +- .local/bin/i3cmds/toggle-welcome | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 .local/bin/i3cmds/toggle-welcome diff --git a/.config/i3/config b/.config/i3/config index 6545d08..45f0750 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -230,7 +230,7 @@ bindsym $mod+F9 exec --no-startup-id dmenumount bindsym $mod+F10 exec --no-startup-id dmenuumount bindsym $mod+F11 exec --no-startup-id ducksearch bindsym $mod+F12 exec $term -e nmtui -bindsym $mod+Shift+F1 exec --no-startup-id grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i \"$HOME/.local/share/larbs/larbs.png\" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." ) +bindsym $mod+Shift+F1 exec --no-startup-id toggle-welcome # #---Arrow Keys---# # bindsym $mod+Left focus left diff --git a/.local/bin/i3cmds/toggle-welcome b/.local/bin/i3cmds/toggle-welcome new file mode 100755 index 0000000..715db09 --- /dev/null +++ b/.local/bin/i3cmds/toggle-welcome @@ -0,0 +1,10 @@ +#!/bin/sh + +# Toggles the LARBS welcome message. + +PIC="$HOME/.local/share/larbs/larbs.png" + +grep LARBSWELCOME "$HOME/.xprofile" && + ( sed -i "/LARBSWELCOME/d" ~/.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" >> ~/.xprofile && + notify-send -i "$PIC" "LARBS welcome message" "Welcome message re-enabled." )