added a toggle for tipme command to change between normal and cowsay mode.
This commit is contained in:
@@ -4,7 +4,7 @@ background-opacity = 0.7
|
|||||||
|
|
||||||
command = /bin/zsh
|
command = /bin/zsh
|
||||||
|
|
||||||
initial-command = /bin/zsh -c ~/.config/sdgos/fastfetch/fetch.sh && echo "" && shuf -n 1 ~/.config/sdgos/tips/tips.list && echo "[SDG-OS Tips]: use the 'tipme' command for random tips" && echo "[SDG-OS Tips]: 'alltips' to see all tips in a searchable interface" && echo "[SDG-OS Tips]: or the SUPER+0 keybind to be notified of a random tip" && zsh
|
initial-command = /bin/zsh -c ~/.config/sdgos/fastfetch/fetch.sh && echo "" && ~/.config/sdgos/tips/tips.sh && echo "[SDG-OS Tips]: use the 'tipme' command for random tips" && echo "[SDG-OS Tips]: 'alltips' to see all tips in a searchable interface" && echo "[SDG-OS Tips]: 'tipme toggle' to toggle between normal mode and cowsay mode" && echo "[SDG-OS Tips]: or the SUPER+0 keybind to be notified of a random tip" && zsh
|
||||||
|
|
||||||
scrollback-limit = 999999
|
scrollback-limit = 999999
|
||||||
|
|
||||||
|
|||||||
Executable
+41
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -e ~/.config/tips.state ]; then
|
||||||
|
echo "standard" > ~/.config/tips.state
|
||||||
|
fi
|
||||||
|
|
||||||
|
SETTING=$(cat ~/.config/tips.state)
|
||||||
|
|
||||||
|
INPUT="$1"
|
||||||
|
|
||||||
|
case $INPUT in
|
||||||
|
"")
|
||||||
|
case $SETTING in
|
||||||
|
standard)
|
||||||
|
shuf -n 1 ~/.config/sdgos/tips/tips.list
|
||||||
|
;;
|
||||||
|
cow)
|
||||||
|
cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
toggle)
|
||||||
|
case $SETTING in
|
||||||
|
standard)
|
||||||
|
echo "cow" > ~/.config/tips.state
|
||||||
|
;;
|
||||||
|
cow)
|
||||||
|
echo "standard" > ~/.config/tips.state
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
standard)
|
||||||
|
echo "standard" > ~/.config/tips.state
|
||||||
|
shuf -n 1 ~/.config/sdgos/tips/tips.list
|
||||||
|
;;
|
||||||
|
|
||||||
|
cow)
|
||||||
|
echo "cow" > ~/.config/tips.state
|
||||||
|
cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat
|
||||||
|
;;
|
||||||
|
esac
|
||||||
+1
-1
@@ -23,7 +23,7 @@ alias apt='man pacman'
|
|||||||
alias apt-get='man pacman'
|
alias apt-get='man pacman'
|
||||||
alias jctl="journalctl -p 3 -xb"
|
alias jctl="journalctl -p 3 -xb"
|
||||||
alias cmdhist='CMD=$(history -i | tac | fzf | sed "s/.*:.. //"); sleep 0.1 && wtype $CMD'
|
alias cmdhist='CMD=$(history -i | tac | fzf | sed "s/.*:.. //"); sleep 0.1 && wtype $CMD'
|
||||||
alias tipme='shuf -n 1 ~/.config/sdgos/tips/tips.list'
|
alias tipme='~/.config/sdgos/tips/tips.sh'
|
||||||
alias alltips='cat ~/.config/sdgos/tips/tips.list | fzf'
|
alias alltips='cat ~/.config/sdgos/tips/tips.list | fzf'
|
||||||
alias cowtip='cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat'
|
alias cowtip='cowsay -r $(shuf -n 1 ~/.config/sdgos/tips/tips.list) | lolcat'
|
||||||
alias fetch='~/.config/sdgos/fastfetch/fetch.sh'
|
alias fetch='~/.config/sdgos/fastfetch/fetch.sh'
|
||||||
|
|||||||
Reference in New Issue
Block a user