From: "Vadim (vadcx)" <vad....@vad.cx>

The previous default "cmd" didn't actually fallback to "cmd.exe" or anything,
as that variable was later overwritten to be the shell executable path, if set 
to cmd.
While it works fine as of Windows 10 22H2 with the default conhost, the shell 
executables
in Cygwin do not have an icon embedded and as such the windows are all displayed
with the fallback icon. Only mintty correctly sets (or can accept) a custom icon
for its windows processes.

Finally, mintty is the default terminal for Cygwin, better stick to it then.
---
 src/chere | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/chere b/src/chere
index 9c6b77e..6ba2425 100755
--- a/src/chere
+++ b/src/chere
@@ -938,7 +938,7 @@ USER_MENU_TEXT=
 UINST_ARG=""
 
 # Default terminal and shell if not specified
-this_term=cmd
+this_term=mintty
 #this_shell=passwd
 
 ####################### Parse command line #######################
@@ -1003,22 +1003,26 @@ elif [ $ACTION = i ]; then
 
  set_for_user $ACTION $ALL_USERS
 
+ echo "Selected terminal: '$this_term'"
+
  # If no shell specified at this stage,
  # grab one from /etc/passwd if it is present
- if [ ! $this_shell ]; then
-  this_shell=`get_shell_from_passwd`
+ if [ "$this_shell" ]; then
+  echo "Selected shell: '$this_shell'"
+ else
+  this_shell=$(get_shell_from_passwd)
   if [ -n "$this_shell" ] ; then
-   echo Shell defaulting to $this_shell defined for $ID_USER
+   echo "Shell defaulting to '$this_shell' defined for '$ID_USER'"
   else
-   echo $0 Error: No shell specified, and passwd entry could not be read
+   echo "$0 Error: No shell specified, and passwd entry could not be read"
    echo
-   echo Can\'t guess what shell you want.
-   echo Use -s to specify the shell.
+   echo "Can't guess what shell you want."
+   echo "Use -s to specify the shell."
    exit
   fi
  fi
 
- install $this_term $this_shell
+ install "$this_term" "$this_shell"
 
 elif [ $ACTION = u ]; then
 
-- 
2.50.1

Reply via email to