Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- icewm-3.4.3.orig/contrib/icewm-menu-xrandr
+++ icewm-3.4.3/contrib/icewm-menu-xrandr
@@ -76,11 +76,11 @@ $xrandr.=" --verbose";
 sub strip_tfield
 {
     my $name = substr($_[0], $_[1], 13);
-    print "heh: $name\n" if $debug > 4;
+    print "# Raw name: $name\n" if $debug > 4;
     $name=~s/^\W.*//;
     $name=~s/(\r|\n|\0).*//;
     $name=~s/\W$//;
-    print "Decoded: $name\n" if $debug > 2;
+    print "# Decoded: $name\n" if $debug > 2;
     return $name;
 }
 
@@ -94,13 +94,14 @@ sub load_ini
         next if ! -r $_;
         my $fd;
         my %cfg;
-        if (open($fd, "<$_"))
+
         {
-            {
-                my %cfg=( "sectype" => "main");
-                push(@cfiledata, \%cfg);
-            }
+            my %cfg=( "sectype" => "main");
+            push(@cfiledata, \%cfg);
+        }
 
+        if (open($fd, "<$_"))
+        {
             for (<$fd>)
             {
                 s/^\s+//;
@@ -174,9 +175,19 @@ sub match_output
 {
     my $output = shift;
     my @ret = ();
+    #print Dumper("# cfiledata:", @cfiledata) if $debug > 4;
+
+    if (! scalar @cfiledata)
+    {
+        return @ret;
+    }
+
     for my $xr (@cfiledata)
     {
-        next unless ($$xr{"sectype"} eq "main" || $$xr{"sectype"} eq "output");
+        #print "# What is this?".Dumper("# $xr -> ", $xr) if $debug > 5;
+        my $st = $$xr{"sectype"};
+        next if !defined($st);
+        next unless ($st eq "main" || $st eq "output");
 
         my $fil = $$xr{"match-name"};
         if (defined($fil))
@@ -232,7 +243,9 @@ sub pick_for_combo
     my $val;
     for my $xr (@cfiledata)
     {
-        next unless ($$xr{"sectype"} eq "main" || $$xr{"sectype"} eq "combo");
+        my $st = $$xr{"sectype"};
+        next if ! defined($st);
+        next unless ($st eq "main" || $st eq "combo");
         my $fil = ($$xr{"match-name"} or $$xr{"match-label"});
         if (defined($fil))
         {
@@ -271,20 +284,23 @@ sub read_xrandr
     {
         print "# DBG: $_" if $debug > 4;
         my $resFound =/(\d+x\d+\++\d)/;
+        # compressed, non-verbose output
         if(/^(\w\S*)\s+(connected|disconnected)\s+(primary)?/)
         {
 # parse state helper var
             $curmon = $1;
             $prim = $curmon if $3;
-# print "# heh? $1 - $2 - $3 - $4\n";
+            print "# curmon hit? $1 - $2 - ".(defined($3) ? $3 : "")."\n" if $debug > 4;
 # disconnected and also no active resolution set!
             $disabled = ($2 eq "disconnected") && !$resFound;
             if($disabled)
             {
+                print "# marked as disabled: $curmon\n" if $debug > 4;
 #$turnRestOff.=" --display $curmon --off";
             }
             else
             {
+                print "# add as connected: $curmon" if $debug > 4;
                 push(@connected, $curmon);
             }
         }
@@ -292,18 +308,22 @@ sub read_xrandr
         # consider active only when there is a flag in the resolution list...
         $active{$curmon} = (/^\s.*\*current/ && !$disabled) if $curmon;
 
-        if (defined($currentEdid)) {
+        # print "# consider: $curmon" if $debug > 4;
+        if (defined($currentEdid))
+        {
             if (/:/) # now analyze and stop merging
             {
                 parse_edid($currentEdid, $curmon);
                 undef $currentEdid;
             }
-            else {
+            else
+            {
                 /(\w+)/;
                 $currentEdid .= $1;
             }
         }
-        elsif (/EDID:/) {
+        elsif (/EDID:/)
+        {
             $currentEdid = "";
         }
     }
@@ -392,6 +412,9 @@ sub add_conf
     my $newPrim = $cmdHints[0];
     my %dedup;
     my @xcmds;
+
+    print "add_conf: $showname, $icon, $cmd, $postCmdHint" if $debug > 4;
+
     for my $involved (@cmdHints)
     {
         print "# affected: $involved\n" if $debug;
@@ -450,7 +473,7 @@ sub run
             [$prim, $sec]
         );
         add_conf(nameOf($sec)." + ".nameOf($prim, 1), "setscreen21",
-            ajoin(fmtOutputMode($sec), loc($sec), fmtOutputMode($prim), $priFlag, loc($prim, $lof, $sec), $killRest),
+            ajoin(fmtOutputMode($sec), loc($sec), fmtOutputMode($prim), $priFlag, loc($prim, $rof, $sec), $killRest),
             [$prim, $sec]);
         add_conf(nameOf($prim)." + ".nameOf($sec, 1), "setscreen12x",
             ajoin(fmtOutputMode($prim), loc($prim), fmtOutputMode($sec), $priFlag, loc($sec, $rof, $prim), $killRest),
--- icewm-3.4.3.orig/lib/keys.in
+++ icewm-3.4.3/lib/keys.in
@@ -26,8 +26,8 @@ key "Super+KP_Add"          amixer sset
 key "XF86AudioLowerVolume"  amixer sset Master 5%-
 key "XF86AudioRaiseVolume"  amixer sset Master 5%+
 key "XF86AudioMute"         amixer sset Master toggle
-key "XF86HomePage"          xdg-open about:blank
-key "XF86Search"            xdg-open https://www.google.com
+key "XF86HomePage"         sensible-browser about:blank
+key "XF86Search"            sensible-browser https://www.duckduckgo.com
 key "XF86Eject"             eject
 key "XF86Calculator"        /bin/sh -c "gnome-calculator || xcalc || ( type bc >/dev/null 2>&1 && @XTERMCMD@ -e bc -l)"
 
--- icewm-3.4.3.orig/lib/winoptions.in
+++ icewm-3.4.3/lib/winoptions.in
@@ -5,6 +5,8 @@
 
 xterm.XTerm.icon: xterm
 rxvt.icon: xterm
+urxvtc.icon: urxvt
+urxvt.icon: urxvt
 nxterm.icon: xterm
 fte.icon: fte
 emacs.Emacs.icon: emacs
--- icewm-3.4.3.orig/src/default.h
+++ icewm-3.4.3/src/default.h
@@ -127,7 +127,7 @@ XIV(bool, win95keys,
 XIV(bool, autoReloadMenus,                      true)
 XIV(bool, arrangeWindowsOnScreenSizeChange,     true)
 XIV(bool, clientMouseActions,                   true)
-XIV(bool, showPrograms,                         false)
+XIV(bool, showPrograms,                         true)
 XIV(bool, showSettingsMenu,                     true)
 XIV(bool, showFocusModeMenu,                    true)
 XIV(bool, showThemesMenu,                       true)
@@ -180,7 +180,7 @@ XSV(const char *, mailBoxPath,
 XSV(const char *, mailCommand,                  TERM " -name mutt -e mutt")
 XSV(const char *, mailClassHint,                "mutt.XTerm")
 XSV(const char *, newMailCommand,               0)
-XSV(const char *, lockCommand,                  0)
+XSV(const char *, lockCommand,                  "xscreensaver-command -lock")
 XSV(const char *, clockCommand,                 "xclock -name icewm -title Clock")
 XSV(const char *, clockClassHint,               "icewm.XClock")
 XSV(const char *, runDlgCommand,                0)
@@ -189,10 +189,10 @@ XSV(const char *, terminalCommand,
 XSV(const char *, logoutCommand,                0)
 XSV(const char *, logoutCancelCommand,          0)
 #if __linux__
-XSV(const char *, shutdownCommand,              "test -e /run/systemd/system && systemctl poweroff || loginctl poweroff")
-XSV(const char *, rebootCommand,                "test -e /run/systemd/system && systemctl reboot || loginctl reboot")
-XSV(const char *, suspendCommand,               "test -e /run/systemd/system && systemctl suspend || loginctl suspend")
-XSV(const char *, hibernateCommand,             "test -e /run/systemd/system && systemctl hibernate || loginctl suspend")
+XSV(const char *, shutdownCommand,              "test -e /run/systemd/system && systemctl poweroff || sudo -n /sbin/poweroff")
+XSV(const char *, rebootCommand,                "test -e /run/systemd/system && systemctl reboot || sudo -n /sbin/reboot")
+XSV(const char *, suspendCommand,               "test -e /run/systemd/system && systemctl suspend || sudo -n /usr/sbin/pm-suspend")
+XSV(const char *, hibernateCommand,             "test -e /run/systemd/system && systemctl hibernate || sudo -n /usr/sbin/pm-hibernate")
 #else
 XSV(const char *, shutdownCommand,              0)
 XSV(const char *, rebootCommand,                0)
@@ -203,18 +203,11 @@ XIV(int, taskBarCPUDelay,
 XIV(int, taskBarMEMDelay,                       500)
 XIV(int, taskBarNetSamples,                     20)
 XIV(int, taskBarNetDelay,                       500)
-XSV(const char *, cpuCommand,                   TERM " -name top -title Process\\ Status -e top")
+XSV(const char *, cpuCommand,                   TERM " -T 'Process Status' -e top")
 XSV(const char *, cpuClassHint,                 "top.XTerm")
 XIV(bool, cpuCombine,                           true)
-
-#if __linux__
-XSV(const char *, netCommand,                   TERM " -name 'ss' -title 'Socket Statistics' -hold -e sh -c 'which ss > /dev/null && watch -t ss -putswl || netstat -c'")
+XSV(const char *, netCommand,                   TERM " -T 'Network Status' -e /bin/sh /usr/share/icewm/netstat.sh")
 XSV(const char *, netClassHint,                 "ss.XTerm")
-#else
-XSV(const char *, netCommand,                   TERM " -name netstat -title 'Network Status' -hold -e netstat -c")
-XSV(const char *, netClassHint,                 "netstat.XTerm")
-#endif
-
 #if __OpenBSD__
 #define NET_DEVICES                             "[ew]* vio*"
 #else
--- icewm-3.4.3.orig/src/wmapp.cc
+++ icewm-3.4.3/src/wmapp.cc
@@ -43,6 +43,7 @@
 char const *ApplicationName("IceWM");
 RebootShutdown rebootOrShutdown = Logout;
 static bool initializing(true);
+void SetLiteDefaults();
 
 YWMApp *wmapp;
 YWindowManager *manager;
@@ -1284,6 +1285,9 @@ YWMApp::YWMApp(int *argc, char ***argv,
     focusMode(loadFocusMode()),
     managerWindow(None)
 {
+    if(argc && *argc>0 && argv && *argv && **argv && mstring(**argv).endsWith("-lite"))
+            SetLiteDefaults();
+
     wmapp = this;
     YIcon::iconResourceLocator = this;
 
@@ -2066,6 +2070,14 @@ public:
     }
 };
 
+void SetLiteDefaults()
+{
+    showTaskBar = false;
+    fontPreferFreetype = false;
+    showWindowList = false;
+    quickSwitchAllIcons = false;
+    //addWorkspace(0, "1", false);
+}
 YWindow* YWMApp::splash(const char* splashFile) {
     YWindow* window(nullptr);
     if (splashFile && 4 < strlen(splashFile) && !post_preferences) {
