Hotkey to Remember window size and position for IceWM

Forum Forums General Tips and Tricks Hotkey to Remember window size and position for IceWM

  • This topic has 75 replies, 9 voices, and was last updated Feb 23-6:21 pm by Brian Masinick.
Viewing 15 posts - 61 through 75 (of 76 total)
  • Author
    Posts
  • #100216
    Moderator
    Brian Masinick
      Helpful
      Up
      0
      ::

      Great catch!
      Navigator.Firefox-esrgeometry:
      is a syntax error.
      Navigator.Firefox-esr: geometry 1338×1257+0+-363

      --
      Brian Masinick

      #100217
      Member
      luke22
        Helpful
        Up
        0
        ::

        @Xunzi

        You might in your case be able to use session restore to your advantage, try just
        shutting down without closing the browser. It should open at previous position and size
        as well as opening the book for you.

        Tried and didn’t work. Firefox remembered tabs, but opened in a MaxVert size.

        You were asking iceshell to
        open and position for example Navigator.Firefox-esrgeometry the separator is missing in all
        the commands.

        Good spot. Changing that for each item and restart icewm gave size AND postion for everything but firefox-esr.

        Also thanks for tip regarding session restore. That makes sense.

        More experiments with firefox-esr required.
        Edit:
        Tried firefox window smaller than screen. Set winoptions as BobC suggested and restarted. Firefox opens with remembered size but sits within and adjacent to borders. i.e. ignores prescribed position. If size set larger than screen, then restart reduces size to within borders.

        • This reply was modified 2 months, 1 week ago by luke22.
        #100225
        Member
        luke22
          Helpful
          Up
          0
          ::

          Tried Palemoon. I installed this as i didn’t have it, so it is fresh.
          It defaulted open to a corner (NW) first time and not full screen.
          I moved it centrally, didn’t change size.
          Use script to generate winoptions addenda, and corrected as follows:

          Navigator.Pale.geometry: 1024×551+155+69
          Navigator.Pale.layer: Normal
          Navigator.Pale.workspace: 1

          Closed Palemoon, refreshed icewm and started Palemoon.
          It kept size but positioned in a corner, not centrally, and also on workspace 0 not 1. (i.e 1 not 2 in antix).

          I wonder if my chromebook is too peculiar for all icewm settings to function fully.
          Also are browsers just too complex for this to work for me?

          #100229
          Member
          Xunzi_23
            Helpful
            Up
            0
            ::

            How did you get the strings for Palemoon.
            Using xprop I get WM_CLASS(STRING) = “Navigator”, “Pale moon”

            Open palemoon window enter xprop in terminal, you may have to install it first.
            Press enter, you get an X cursor, click with that in Palemoon window.

            Check your entrys. If you installed palemoon normaly Navigator.Pale is incorrect.

            WM_class and name must be exactly as shown by xprop for ICE shell to do its job.

            No good trusting the script until it is checked against a correctly working setup.

            • This reply was modified 2 months, 1 week ago by Xunzi_23.
            • This reply was modified 2 months, 1 week ago by Xunzi_23.
            • This reply was modified 2 months, 1 week ago by Xunzi_23.
            #100234
            Member
            luke22
              Helpful
              Up
              0
              ::

              I used the script in this thread to generate strings.
              Did what you said and I get same as you for WM_CLASS(STRING) = “Navigator”, “Pale moon”
              Amended winoptions to
              Navigator.Pale moon.geometry: 1024×551+155+69
              Navigator.Pale moon.layer: Normal
              Navigator.Pale moon.workspace: 1

              Restarted and size remembered, position in a corner in first workspace.
              I resized, moved, amended winoptions, refreshed, same result. Position not actioned.

              Thanks for continued interest.

              Edit 17:22 Minor success.
              I changed layer to Desktop from Normal. Restarted icewm and Palemoon opened in 2nd workspace, i.e workspace: 1 above was recognised.

              • This reply was modified 2 months, 1 week ago by luke22.
              #100238
              Moderator
              Brian Masinick
                Helpful
                Up
                1
                ::

                @luke22: regarding post #100207, I had previously either overlooked or didn’t carefully read all of the post.

                In particular, your interest in extensive book reading, and getting the page size and orientation just right in order to be able to read for extended periods of time with minimal or no further adjustment, simply by “turning the page” and continue reading.

                I really appreciate this and I hope that our discussion and your implementation lead to success. Best wishes!

                --
                Brian Masinick

                #100246
                Member
                Robin
                  Helpful
                  Up
                  0
                  ::

                  # WORKSPACES NAMES format as below, you can use name like docs mail etc on bigger screens.
                  WorkspaceNames=” 1 “, ” 2 “, ” 3 “, ” 4 ” , ” 5 ”

                  Good point, @Xunzi_23 , many thanks. Obviously icesh doesn’t set this permanently, what was what I’d have expected. But taking this into account, still its behaviour seems to be completely inconsistent to me:

                  Try yourself:

                  $ icesh workspaces 3

                  Immediately you get a third workspace, labeled as “3” in GUI. Now let’s name some of them:

                  $ icesh setWorkspaceName 0 "Test1"
                  $ icesh setWorkspaceNames 2 "Test3"

                  Nothing happens. Name of Workspaces #0 and #2 (human readable: first and third workspace) in GUI reads still “1” and “3” instead of “Test1” and “Test3”, even when IceWM itself claims it was changed properly:

                  $ icesh listWorkspaces
                  Arbeitsbereich #0: 'Test1'
                  Arbeitsbereich #1: ' 2 '
                  Arbeitsbereich #2: 'Test3'

                  OK, you are told, you need to restart IceWM to make the name change active.
                  $ icesh restart

                  And now you are back on 2 workspaces, of which the first actually displays the new name in GUI.

                  $ cat /home/demo/.icewm/preferences | grep TaskBarWorkspacesLimit=
                  # TaskBarWorkspacesLimit=""
                  
                  $ cat /home/demo/.icewm/preferences | grep WorkspaceNames=
                  WorkspaceNames=" 1 ", " 2 "
                  
                  $ icesh listWorkspaces
                  Arbeitsbereich #0: 'Test1'
                  Arbeitsbereich #1: ' 2 '

                  And now, to actually see your new named third workspace (workspace #2), you need to reopen third workspace manually again:

                  $ icesh workspaces 3

                  And voila, it comes up in GUI immediately with the proper name you have assigned to it before restarting icewm. That’s really funny. It keeps all the names, but not the number of workspaces.

                  $ icesh listWorkspaces
                  Arbeitsbereich #0: 'Test1'
                  Arbeitsbereich #1: ' 2 '
                  Arbeitsbereich #2: 'Test3'

                  And all this while it was still not present in preferences file:

                  $ cat /home/demo/.icewm/preferences | grep WorkspaceNames=
                  WorkspaceNames=" 1 ", " 2 "

                  So please let me know what I’m doing wrong. I can see only what we call “Kraut und Rüben”, an expression for a big muddle. Something survives IceWM restart, something not, and nothing gets stored to the preferences file as far I can see. So probably after next system reboot every setting is lost?

                  Btw, I didn’t see any option in man icesh to make it write the changes to the preferences file. Do I actually have to write it manually to the file using a text editor to make the changes persistent?

                  Windows is like a submarine. Open a window and serious problems will start.

                  #100314
                  Member
                  luke22
                    Helpful
                    Up
                    0
                    ::

                    You’ll be pleased to know I have found a solution, so those helping me can get on with their lives. 😉

                    In the preferences file in ~/.icewm lines 64 to 68. I uncommented 65 and 68 to
                    LimitSize=0 rather than 1
                    LimitPosition=0 rather than 1

                    This worked perfectly for Palemoon.
                    I adjusted firefox line in winoptions to
                    Navigator.Firefox-esr.geometry: 1050×1259+168+-342

                    That worked for firefox-esr.
                    i.e. both browsers can be positioned and sized larger than screen and off screen borders.

                    I can now dedicate Palemoon for Archive . org book reading, and leave firefox-esr as normal.

                    Icewm is incredibly flexible, but the preferences file is so big and the manuals so large, finding exactly what you want doesn’t always come easily.
                    Thanks to all.

                    @BobC , just one question, which version, if any, of the script in this thread will put the correct . and : as spacers in the winoptions file?

                    #100322
                    Member
                    Xunzi_23
                      Helpful
                      Up
                      0
                      ::

                      Hi Luke22,
                      nice, please do not worry about asking questions like you did. In the end we can if wished for all benefit.
                      As you now know understanding ICE is not so easy, I certainly have very limited knowledge of the myriad options.
                      The forum is part of our lives, giving back to the community by trying to assist others, share and gain knowledge 🙂
                      regarding the limit options in config, at least on my system, antiX 23 Test compiled in default is not to limit
                      to screen. Just tested again to be sure.

                      @Robin, I wrote the desktop options to the config manualy so never noticed strange or inconsistant results.
                      Maybe another task for control center GUI and script. Arch/Arch based made me very unafraid of config
                      files. The present live stick is started with 9 workspaces, more than enough.
                      Regarding some weird partial settings surviving a reboot, cache ? although I see no entry for desktop session
                      on my setup.

                      • This reply was modified 2 months, 1 week ago by Xunzi_23.
                      • This reply was modified 2 months, 1 week ago by Xunzi_23.
                      #100328
                      Moderator
                      Brian Masinick
                        Helpful
                        Up
                        0
                        ::

                        I agree about IceWM. It’s been around a long time and the window manager works out of the box (as is) just fine, yet in spite of the relatively modest size, it’s incredibly flexible and as I was reading through the documentation yesterday I was surprised how many choices are available and also the many provisions it has.

                        Not only is IceWM a very good window manager, it’s also a powerful replacement window manager in desktop environments and the reason is that it has all the necessary interfaces and options to interact with other components. For as long as I have used this efficient, capable window manager I’ve been using only a fraction of the features and that’s fine. This shows the flexibility as well as the efficiency.

                        --
                        Brian Masinick

                        #100358
                        Moderator
                        BobC
                          Helpful
                          Up
                          0
                          ::

                          Luke22,

                          I can look into it, but I didn’t write them all. For me to work on it I would need to know:

                          What post did you get the script from?

                          What did you enter (provide screenshot)

                          What was the resulting entry in winoptions file?

                          What would be the correct entry it should have put in winoptions file?

                          #100418
                          Member
                          luke22
                            Helpful
                            Up
                            0
                            ::

                            @BobC
                            I use the script from post 37228.
                            I have downloaded script from post 37246 but have been unable to make it work. I’ve obviously made it executable, and run from terminal, but no gui comes up, as in the former one, and nothing changes in the winoptions file.
                            Reading the post post 37232 I recognise that there is a problem with the dot missing in the winoptions file, and assumed the later post 37246 fixed this, but as I can’t get it to run I used the first one above.
                            i.e the first script gives, for example,
                            roxterm.Roxtermgeometry: 737×531+326+16, which I can then edit to put “.” before geometry. i.e. roxterm.Roxterm.geometry: 737×531+326+16 and then the size and position get remembered correctly.

                            Clearly there are difference in the scripts, but I’m not able to find why I can’t make it work.
                            I have no doubt I’m doing something stupid, not unknown, but I can’t find out what. Please don’t spend much, if any, time on this, as clearly others can get it to work, and I can manage with what I’ve got.

                            • This reply was modified 2 months, 1 week ago by luke22.
                            #100420
                            Member
                            PPC
                              Helpful
                              Up
                              0
                              ::

                              @luke22 – I fixed the version in post37228 for you. Please test, it should not have the missing dots bug now…
                              Just uncompress the script and try it out.

                              P.

                              #100423
                              Member
                              luke22
                                Helpful
                                Up
                                0
                                ::

                                PPC
                                Thank you.
                                Works perfectly.

                                #100424
                                Member
                                Xunzi_23
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Hi PPC,
                                  Nice work, One presently known Limitation, Does not work correctly with Libreoffice which seems
                                  more stubborn and monolithic than ever in latest versions.

                                  Will see if I can find some kind of workaround starting in sofficerc. In time will also compare with the
                                  version from LO Org which may have different compile options set in comparison to the Debian flavour.

                                  Open calc and writer on separate desktops, closing one takes the other down too as soffice gets closed
                                  not the current application window. Pretty sure that is an innovation ….
                                  Means some older tested workarounds for autostart are also now broken.

                                  OT but maybe best place for now.
                                  Strg W or usage of window menu will close an open window without taking entire Libreoffice down,
                                  It can added to the menu above close Libreoffice which applies Strg Q and closes
                                  applications writer draw calc or whatever is open all together.

                                  Will see if LO team is open to the suggestion as setup every update would be a pain as to my present
                                  knowledge it needs adding to each individual module.

                                  • This reply was modified 2 months, 1 week ago by Xunzi_23.
                                  • This reply was modified 2 months, 1 week ago by Xunzi_23.
                                Viewing 15 posts - 61 through 75 (of 76 total)
                                • You must be logged in to reply to this topic.