update-notifier
update-notifier copied to clipboard
Generalize update-cmd script
It would be nice if update-cmd script did not call gnome-terminal and/or pamac-updater.
Script should select from installed terminal emulators instead of requiring gnome terminal. Also if pamac is not installed perhaps check if octopi is. If neither then always use manual.
A fair point. The hard coding is due to the fact that it is specifically made for gnome edition,but expanding its usefulness would not hurt.
Idea: check if the variable $TERMIMAL is set and use that. If not, try for different terminals. I think dmenu-manjaro may have had a snippet for checking installed terminals....
The snippet you are thinking of:
if [ -z "$TERMINAL_CMD" ]; then
if [ "$(which terminal)" ]; then
TERMINAL_CMD="terminal -e"
elif [ "$(which urxvt)" ]; then
TERMINAL_CMD="urxvt -e"
elif [ "$(which termite)" ]; then
TERMINAL_CMD="termite -e"
elif [ "$(which terminator)" ]; then
TERMINAL_CMD="terminator -e"
elif [ "$(which gnome-terminal)" ]; then
TERMINAL_CMD="gnome-terminal -e"
elif [ "$(which lxterminal)" ]; then
TERMINAL_CMD="lxterminal -e"
elif [ "$(which sakura)" ]; then
TERMINAL_CMD="sakura -e"
elif [ "$(which xfce4-terminal)" ]; then
TERMINAL_CMD="xfce4-terminal -e"
elif [ "$(which xterm)" ]; then
TERMINAL_CMD="xterm -e"
fi
fi
sorry my mistake closing this :)