fix xschemrc
diff --git a/cells/xschem/xschemrc b/cells/xschem/xschemrc
index 05d2db9..eaa174a 100644
--- a/cells/xschem/xschemrc
+++ b/cells/xschem/xschemrc
@@ -15,22 +15,22 @@
 #### XSCHEM SYSTEM-WIDE DESIGN LIBRARY PATHS: XSCHEM_LIBRARY_PATH
 ###########################################################################
 #### If unset xschem starts with XSCHEM_LIBRARY_PATH set to the default, typically:
-# /home/schippes/.xschem/xschem_library
-# /home/schippes/share/xschem/xschem_library/devices
-# /home/schippes/share/doc/xschem/examples
-# /home/schippes/share/doc/xschem/ngspice
-# /home/schippes/share/doc/xschem/logic
-# /home/schippes/share/doc/xschem/xschem_simulator
-# /home/schippes/share/doc/xschem/binto7seg
-# /home/schippes/share/doc/xschem/pcb
-# /home/schippes/share/doc/xschem/rom8k
+# ${HOME}/.xschem/xschem_library
+# <install_root>/share/xschem/xschem_library/devices
+# <install_root>/share/doc/xschem/examples
+# <install_root>/share/doc/xschem/ngspice
+# <install_root>/share/doc/xschem/logic
+# <install_root>/share/doc/xschem/xschem_simulator
+# <install_root>/share/doc/xschem/binto7seg
+# <install_root>/share/doc/xschem/pcb
+# <install_root>/share/doc/xschem/rom8k
 
 #### Flush any previous definition
 set XSCHEM_LIBRARY_PATH {}
 #### include devices/*.sym
 append XSCHEM_LIBRARY_PATH ${XSCHEM_SHAREDIR}/xschem_library
 #### include skywater libraries. Here i use [pwd]. This works if i start xschem from here.
-append XSCHEM_LIBRARY_PATH :$env(PWD)
+append XSCHEM_LIBRARY_PATH :[file dirname [info script]]
 # append XSCHEM_LIBRARY_PATH :/mnt/sda7/home/schippes/pdks/sky130A/libs.tech/xschem
 #### add ~/.xschem/xschem_library (USER_CONF_DIR is normally ~/.xschem)
 append XSCHEM_LIBRARY_PATH :$USER_CONF_DIR/xschem_library 
@@ -53,7 +53,7 @@
 #### Start without a design if no filename given on command line:
 #### To avoid absolute paths, use a path that is relative to one of the
 #### XSCHEM_LIBRARY_PATH directories. Default: empty
-set XSCHEM_START_WINDOW {gf180mcu_tests/0_top.sch}
+set XSCHEM_START_WINDOW {tests/0_top.sch}
 
 ###########################################################################
 #### DIRECTORY WHERE SIMULATIONS, NETLIST AND SIMULATOR OUTPUTS ARE PLACED
@@ -76,6 +76,10 @@
 #### variable controls hierarchical print
 #### default value: empty
 # set noprint_libs {}
+#### nolist_libs is a list with same rules as for xschem_libs. This
+#### variable controls cell listing in procedure list_hierarchy.
+#### default value: empty
+# set nolist_libs {}
 
 ###########################################################################
 #### CHANGE DEFAULT [] WITH SOME OTHER CHARACTERS FOR BUSSED SIGNALS 
@@ -297,6 +301,13 @@
 # set toolbar_horiz   1
 
 ###########################################################################
+#### WEB URL DOWNLOAD HELPER APPLICATION
+###########################################################################
+#### used to download files from web: default: {curl -f -s -O}
+# set download_url_helper {curl -f -s -O}
+# set download_url_helper {wget -N --quiet}
+
+###########################################################################
 #### TABBED WINDOWS
 ###########################################################################
 # default: not enabled. Interface can be changed runtime if only one window 
@@ -304,7 +315,41 @@
 set tabbed_interface 1
 
 ###########################################################################
-#### SKYWATER PDK SPECIFIC VARIABLES
+#### CASE INSENSITIVE SYMBOL LOOKUP
+###########################################################################
+## this option might be useful on filesystems that are case insensitive and
+## on designs ported from windows where case of file names does not matter.
+## if this option is set symbol lookup will be case insensitive,
+## so a symbol reference 'AMPLI.SYM' will match with 'ampli.sym' or
+## Amply.sym on disk. File system must be case insensitive for this to work,
+## like FAT32 or NTFS.
+## Do not set this option if you don't know what you are doing.
+## Default: not enabled (0)
+# set case_insensitive 1
+
+###########################################################################
+#### HIDE GRAPHS IF NO SPICE DATA LOADED
+###########################################################################
+## if enabled graphs will be hidden if no data is loaded.
+## default: not enabled (0)
+# set hide_empty_graphs 0
+
+###########################################################################
+#### SHOW HIDDEN TEXTS
+###########################################################################
+## This option shows text objects even if they have attribute 'hide=true' set
+## default: 0 (not set) 
+# set show_hidden_texts 1
+
+###########################################################################
+#### LIVE BACKANNOTATION OF DATA AT CURSOR 2 (B) POSITION
+###########################################################################
+## if enabled will backannotate values in schematic at cursor 'b' position
+## in graph. Default: not enabled (0)
+# set live_cursor2_backannotate 1
+
+###########################################################################
+#### PDK SPECIFIC VARIABLES
 ###########################################################################
 
 ## check if env var PDK_ROOT exists, and use it for building open_pdks paths
@@ -316,16 +361,25 @@
   set PDK_ROOT $env(PDK_ROOT)
 } else {
   ## not existing or empty. 
-  puts stderr "Warning: PDK_ROOT env. var. not found or empty, trying to find a pdk install"
-  if {[file isdir [pwd]/..]} {
-    set PDK_ROOT [file normalize [pwd]/..]
-  } else {
-    puts stderr {No pdk installation found, set PDK_ROOT env. var. and restart xschem}
+  puts stderr "Warning: PDK_ROOT env. var. not found or empty, trying to find an open_pdks install"
+  if {[file isdir /usr/share/pdk]} {set PDK_ROOT /usr/share/pdk
+  } elseif {[file isdir /usr/local/share/pdk]} {set PDK_ROOT /usr/local/share/pdk
+  } elseif {[file isdir $env(HOME)/share/pdk]} {set PDK_ROOT $env(HOME)/share/pdk
+  } else {XSCHEM_LIBRARY_PATH
+    puts stderr {No open_pdks installation found, set PDK_ROOT env. var. and restart xschem}
   }
 }
 
 if {[info exists PDK_ROOT]} {
-  set 180MCU_MODELS ${PDK_ROOT}/ngspice/models
-  puts stderr "pdk installation: using $PDK_ROOT"
+  ## get process variant
+  if {[info exists env(PDK)]} {
+    set PDK $env(PDK)
+  } else {
+    set PDK gf180mcuC
+  }
+  set 180MCU_MODELS ${PDK_ROOT}/${PDK}/libs.tech/ngspice
+  puts stderr "pdk installation: using ${PDK_ROOT}/${PDK}"
   puts stderr "180MCU_MODELS: $180MCU_MODELS"
+  append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/${PDK}/libs.tech/xschem
+  puts stderr "XSCHEM_LIBRARY_PATH: \n  $XSCHEM_LIBRARY_PATH"
 }