update-notifier icon indicating copy to clipboard operation
update-notifier copied to clipboard

Generalize update-cmd script

Open johnvan54 opened this issue 8 years ago • 3 comments

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.

johnvan54 avatar Jun 04 '17 18:06 johnvan54

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....

Chrysostomus avatar Jun 04 '17 18:06 Chrysostomus

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

johnvan54 avatar Jun 04 '17 19:06 johnvan54

sorry my mistake closing this :)

johnvan54 avatar Jun 04 '17 19:06 johnvan54