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 - 16 through 30 (of 76 total)
  • Author
    Posts
  • #37007
    Member
    Xecure
      Helpful
      Up
      0
      ::

      WOW! Amazing work, BobC.
      This will solve many problems for people trying to set default window configuration on icewm. When you have time, please share your script so we can all learn from it and enjoy it.

      antiX Live system enthusiast.
      General Live Boot Parameters for antiX.

      #37016
      Moderator
      BobC
        Helpful
        Up
        0
        ::

        LOL, when I get it to work! I knew very little about YAD a day ago. I had never created a screen before.

        How to create, read and process a selection box input list is not well documented that I could find, and it took over 50 tries to get it part way working because I didn’t have anything well documented that I understood that I could copy from, and in addition I only partially know the script language, and needed to do it with localization or it would be a burden on people like anti.

        Hopefully I’ll get it in one more day. It did look pretty at that point, but wasn’t returning any values…

        #37017
        Moderator
        BobC
          Helpful
          Up
          0
          ::

          Hallo Bob,
          looks good, now we have to hope anti will include this tool in full version,

          then we will be asked for a gui to increase the number of desktops :-).

          I think there actually already IS a GUI for that in antiX, but I don’t think it worked when I tried it a few months ago, and to be honest I didn’t take the time to investigate, report or try to fix it.

          I also found a working GUI for creating winoptions entries written years ago in python, but you had to come up with all these position and size numbers and build them into correct strings by hand and then type them in, so I didn’t think it would help people create the entries easily.

          I believe computers and programs should do things *FOR* people, not do things *TO* them, but that’s another story…

          #37018
          Member
          ModdIt
            Helpful
            Up
            0
            ::

            @BobC: I believe computers and programs should do things *FOR* people, not do things *TO* them

            Totally agree with that.
            Not do things *AGAINST* them seems presently more fitting, been getting angry with the deceitful tricks of Mozilla again !.

            on the gui in python I think you probably mean the IcewmCC thingy with scripts in user/bin, we looked at that but gave up, removed it and setup manually. The intention seems good but it was far from what we wanted.

            #37019
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              I will get it working this week. I am thinking that my YAD GUI could/should be a separate front end for the command line script written by the IceWM dev rather than merged with it. I need the initial inputs from it, and then need to use it to add/change/delete values, so either way it has challenges.

              It was a shame to lose so much time on the checklist, but that’s what happens when you don’t know how to do something. If you are lucky, you flail around in the water until you either sink or somehow learn to swim enough to survive. Maybe using a checklist was not the best choice because it means more processing to figure out what to do.

              PS: Yes, I think that was the same GUI program I found. It was not focused towards solving providing features that normal people need.

              • This reply was modified 2 years, 11 months ago by BobC.
              • This reply was modified 2 years, 11 months ago by BobC.
              #37049
              Moderator
              Brian Masinick
                Helpful
                Up
                0
                ::

                Thanks again BobC for sharing your time and efforts.

                Whether the tools become an integral part of the distribution or remain community contributions they are useful.

                Keep up the good work and sharing.
                Who knows, maybe others will come along and help out too. Wouldn’t that be nice? ๐Ÿ˜๐Ÿ‘

                --
                Brian Masinick

                #37088
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  Well, my solution got close, but I couldn’t figure out how to get the variables from the checkboxes. Xecure came up with a yet better solution that did work along the same lines and I think we should try it. Since he got it to work, I’ll let him post it.

                  #37100
                  Member
                  Xecure
                    Helpful
                    Up
                    0
                    ::

                    BobC, you were so close, only missing a small piece of the puzzle. All the heavy lifting was done by you and the icewm team. I really like all the ideas you have shown here on the thread, and when you had most done is when I pitched in.
                    https://pastebin.com/c2fhtG2e

                    My problem is, I donโ€™t know how you were building it so that it can be easily translated later. That standard is lost on this script linked here. All text is hard-coded.
                    I hope you can update it so that it follows those standards.

                    Also, if someone can keep improving on the script, it would be best, as my programming standards are not up to where they should be.

                    I must write here my admiration for all the work BobC has done to improve the icewm experience, and also all contributions from the community here. It amazes me how perseverant you all are, and how little by little you are making this window manager even more user friendly.

                    I applaud you.

                    antiX Live system enthusiast.
                    General Live Boot Parameters for antiX.

                    #37106
                    Moderator
                    BobC
                      Helpful
                      Up
                      0
                      ::

                      I will look at yours and put the translation code in tonight if I have the energy after work.

                      #37119
                      Member
                      PPC
                        Helpful
                        Up
                        0
                        ::

                        @Moddit
                        @BobC

                        Great script!
                        I’m usually the “Yad script guy” but my life is a mess and I haven’t really paid much attention to what’s going over on antiX Land… ๐Ÿ™

                        Just in case you guy’s didn’t notice, this script is the second to last missing GUI way to manage ICEWM’s configurations (the Control Centre lets users edit ICEWM text config files, and “winoptions” and “preferences” are the 2 only configurations that had no GUIs, with “Menu edit”, “add-start”, “add-key” and “Toolbar Icon Manager” ).

                        Thanks to this amazing community, antiX is becoming one of the most user friendly distros, not far behind the more well known distros, running on a small percentage of resources those distros require… I hope anticapitalista is willing to include this in antiX as fast as possible- I can’t really say that it takes care of a very urgent need, but it’s a handy thing, to be able to set “in stone” where a application window opens (I loved Fluxbox because of that)

                        Suggestion: The script, as is is perfect. For it to be even more feature rich (and by that I mean, worthy of jumping directly into Control Centre’s “Desktop” Tab) is if it listed all open windows (allowing the user to save each one’s state- that way the script would not need to be started using a keybinding- which is something many users don’t like using)
                        I took a stab at with, with (I know the forum code is going to mess this up):
                        wmctrl -l|awk '{$3=""; $2=""; $1=""; print $0}'
                        but this lists all the names of the open windows, NOT the apps themselves…

                        About possible translations: the way anticapitalista sets that up (basically copying chunks of text, and then replacing those chunks with the provided translations, on the fly, as the application is running) anything can be correctly translated.
                        The latest case, to my knowledge was “android Device USB Connect”‘s script, you can open it to see that anticapitalista adds the callback to the translation file and nothing else…

                        P.

                        • This reply was modified 2 years, 11 months ago by PPC.
                        #37121
                        Forum Admin
                        anticapitalista
                          Helpful
                          Up
                          0
                          ::

                          I can take care of the translation strings needed in the script.

                          This script is a very useful addition. Like PPC mentioned, it would be nice if it could list all open windows and set them (if user agrees).
                          It might get tedious to open each app individually.

                          About the name. Fluxbox calls it – Remember
                          How about IceWM-remember-settings?

                          A help pop-up would also be useful.

                          Thanks BobC and Xecure!

                          Philosophers have interpreted the world in many ways; the point is to change it.

                          antiX with runit - leaner and meaner.

                          #37123
                          Member
                          PPC
                            Helpful
                            Up
                            0
                            ::

                            Nice! It seems this handy feature will be coming to antiX everywhere very soon!
                            A small example of how the script could work with a window selection dialog, to choose what window to configure, can be found here:

                            https://pastebin.com/13em3H11

                            I only had this “window selection” idea and pasted 3 lines of code to the top of the Bob and Moddit’s script…
                            The script now lists all open windows, so the user can select witch window’s position is to “Remembered”…

                            Suggestion (adding to my own suggestion, following anticapitalista’s reasoning, that I fully agree with):
                            Maybe it would make more sense to always have the “window selection” dialog open, so users can configure all open windows, one after another… For that to be possible the script would have to be more heavily edited (it would have to use functions, I guess, I’m too tired to think straight about that)

                            I like anticapitalista’s proposed name for the script

                            P.

                            #37124
                            Member
                            PPC
                              Helpful
                              Up
                              0
                              ::

                              If I could, I would offer another suggestion:

                              – antiX could include Bob’s original script- so it can run from a hotkey, for “advanced” users
                              – and also include the more advanced version of the script, that can be started from the menu (for example) and be used by any user to configure how a particular application window should always be displayed ( configure the window of the app, launch the script, click “Ok” or “Remember” or whatever the confirmation dialog will end up being).

                              Note: My proposed alteration to the script is only a first draft- I always like, at least to include a couple of lines so even newbies know what the script does and how to use it…

                              EDIT:

                              Fully working (although ugly and without a help file) Version 2 of my proposed addictions to the script (now checks if a window was selected and excludes Conky from the list of windows):

                              https://pastebin.com/23Ptgtgq

                              EDIT 2:
                              https://pastebin.com/LCCRnQ0u

                              Changes: My part of the script (that selects the window to be “remembered”) is now a “function”, as is the “Real Script”. Both run in a loop, so after choosing what window options antiX is to Remember/Forget, the user can select a new window to “remember/forget” – I guess this complies to all anticapitalista’s requests, except the Help file… But the initial window’s text is quite explicit as is…

                              For know I’ll step aside and leave this in the very capable hands it was before I began meddling…

                              P.

                              • This reply was modified 2 years, 11 months ago by PPC.
                              • This reply was modified 2 years, 11 months ago by PPC.
                              • This reply was modified 2 years, 11 months ago by PPC.
                              #37142
                              Member
                              ModdIt
                                Helpful
                                Up
                                0
                                ::

                                Please all, no credit to me Old man Moddit or Moddit kids here, the hard work was done by BobC and
                                an Icewm dev, as well as PPC giving it some more tlc.

                                We have the same result but by editing text files, having a gui way to setup will I think be
                                highly appreciated by new and older users. @ present I have a standard master stick to pass around,
                                with this improvement users can setup the way they wish with ease.

                                Big thanks to all involved in the work.

                                #37148
                                Member
                                PPC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Oops, I just found a small bug on my code:
                                  The part that removes Conky from the window list was a bit to detailed for my own system…
                                  If you want to run the script, please open it in geany and edit Line 9 so it reads:

                                  grep -v "Conky (" /tmp/windowlist.txt > /tmp/windowlist2.txt; mv /tmp/windowlist2.txt /tmp/windowlist.txt

                                  The only change is the initial part, that should be: “Conky (”
                                  ๐Ÿ™

                                  I’ll try to update the pastebin file later…

                                  P.

                                Viewing 15 posts - 16 through 30 (of 76 total)
                                • You must be logged in to reply to this topic.