Forum › Forums › New users › New Users and General Questions › one screen two application split equally – IceWM Tiling [SOLVED]
- This topic has 63 replies, 10 voices, and was last updated Dec 23-9:15 am by blur13.
-
AuthorPosts
-
December 15, 2021 at 12:40 am #72958Moderator
BobC
::Moddit, I tried those icesh examples on mine and couldn’t get them to work. I’m not sure why. I also wonder if icesh would work with windows created by Fluxbox or JWM.
The WinGrid scripts do work with Fluxbox and JWM, so that would allow us to provide equivalent functionality for those WM’s as well, with the same code.
December 15, 2021 at 8:49 am #72963Member
blur13
December 15, 2021 at 8:56 am #72964MemberPPC
::@BobC – you nailed it- it’s exactly the concept I was going for (with customized icons to the user, at a glance, knows exactly what each option does, without any need to read- handy for international users that are using a non localized version of this idea).
If you post the code on how you did this menu entries (I’m assuming you used wmctr to get the active window and then use wingrid in that window)[EDIT: I just magnified the image and was able to read the config file], I can try creating a yad window that does the same across all 3 window managers, if I have the time…P.
- This reply was modified 1 year, 4 months ago by PPC.
December 15, 2021 at 9:07 am #72966Member
blur13
::Ah I can now see that the screenshot includes the configuration of .icewm/menu to make that happen. Nontheless, if you could post it so its simply a matter of copy-paste, that would be useful!
December 15, 2021 at 9:16 am #72967MemberModdIt
::BobC wrote: I also wonder if icesh would work with windows created by Fluxbox or JWM.
icesh is very much unexplored, seems we may all be doing something wrong or commands have deprecated.
Only one I use pretty much daily is icewm –restart that leaves applications running as is but, for example updates menu bar. i rarely log out and back in to make bigger changes, or changes in startup script activate.I am trying to figure out what works what does not, the documentation is sparse, not
always up to date and ICE very powerful.
Situation is a bit like experimental paleontology, evidence, intuition, guesses, trial
and error leading to results. In computer tech ICEWM is very old, It is though, more than good.I have some hope that by pooling experience we can improve available knowledge
and build on it where possible.wmctrl does by the way work very reliably, with help from BobC, my applications open with a predetermined size and place on a specified deskop.
i.e. Claws and standard browser open on desktops 1 and 2 respectively, ready after login, claws downloads any new mail automagicaly.
How is in Long threads on autostarting applications here in forum.
I have Libreoffice starting same way on a number of installations, LO should be given the –norestore prefix or it can be bothersome. Kids rarely close applications correctly. Lose power, some experiment crashes the desktop no bother on next start from LO if done that way. I also set LO to autosave frequently.- This reply was modified 1 year, 4 months ago by ModdIt.
December 15, 2021 at 9:26 am #72969Member
blur13
::This is just me thinking out loud, but maybe some of the more common tiling operations could be done in one go?
With master being the active window:
Arrange master/slave half left, half right
Arrange master half left, slave 1 top right quarter, slave 2 bottom right quarter
Arrange master top left quarter, slaves in remaining quarters.The slave windows would be active window -1, active window -2, etc.
But maybe at this point its better to just use a tiling window manager 🙂
December 15, 2021 at 9:32 am #72971MemberPPC
::My original idea should work flawlessly in any window manager. I just adapted a wingrid script to launch from a yad window – it’s just a matter of inserting all wingrid scripts to different functions and start the disered function after clicking the right button…
Create a desktop file for this yad window, and place it’s icon on the toolbar and with just 2 clicks, the user can automatically tile the window anywhere.Example code:
#!/bin/sh ####Example wingrid function to place active window on the bottom half of the screen. active_window=$(xprop -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5) WM_NAME | awk -F '"' '{print $2}') yad --title="antiX Window Tiler" --center --text="This will automaticaly reposition your active window to the selected position" --button="bottom half of the screen" # Guard against missing individual settings WINHEIGHT_LESS=0 WINHEIGHT_MORE=0 GAPTOP=0 GAPLEFT=0 # Capture screen resolution value SCREENRES=$(xdpyinfo | awk '/dimensions:/ { sub("x", " "); print $2" "$3 }') # Extract screen resolution into height and width components SCREENWIDTH=${SCREENRES% *} SCREENHEIGHT=${SCREENRES#* } # Calculate 50% of the screen width and height values SCREENHALFWIDTH=$(($SCREENWIDTH/2)) SCREENHALFHEIGHT=$(($SCREENHEIGHT/2)) # Reference used by window manager when positioning the window (always zero) GRAVITY=0 # Distance from screen top edge to top edge of bottom window OFFSETTOP=$(($SCREENHALFHEIGHT-$WINHEIGHT_MORE)) # Distance from screen left edge to left edge of left window # Note this value is overridden because the window is maximized horizontally when put in the grid pattern OFFSETLEFT=$GAPLEFT # Dimensions of window WINHEIGHT=$(($SCREENHALFHEIGHT-$WINHEIGHT_LESS)) WINWIDTH=$SCREENWIDTH # Ensure the active window is not in maximized mode nor in fullscreen mode wmctrl -r $active_window -b remove,maximized_horz,maximized_vert wmctrl -r $active_window -b remove,fullscreen # Position and resize the active window # Note maximizing horizontally enables the window to scroll to the end of long lines wmctrl -r $active_window -e $GRAVITY,$OFFSETLEFT,$OFFSETTOP,$WINWIDTH,$WINHEIGHT wmctrl -r $active_window -b add,maximized_horzDecember 15, 2021 at 11:43 am #72981ModeratorBobC
::In testing late last night, sometimes, it doesn’t decide the right window to move/resize. I haven’t figured out why or how to fix it, yet.
Hey, What we are REALLY doing is implementing TILING, one window at a time!
Sorry, hit spam block again, not allowed to that section of post menu inline. Will zip and attach…
Attachments:
December 15, 2021 at 12:25 pm #72984MemberPPC
::@BobC – take a look at my example script: it gets the active window and saves it to a variable, then moves that window using a cropped down code from wingrid. I tested it a few times at it always works. I even inserted a sleep 3 seconds before running the wingrid code, and clicked different windows. The window with focus was always the one moved…
Probably a yad script is the way to go- it can be placed on a menu or on a toolbar (making it always available), and also, if anyone can create advanced yad windows (I only do basic stuff), it can use tabs to enable easy selection between halfs or quarters of screens, or just create simple tiny buttons with icons that represent were the window will be placed.EDIT: in fact antiX already comes with “manual tiling” (one window at a time) in all window managers, but, until now, only via keyboard shortcuts 🙂
You already implemented the keyboard shortcuts, and now are hard at work in the “mouse only” way…P.
- This reply was modified 1 year, 4 months ago by PPC.
December 15, 2021 at 1:01 pm #72987MemberModdIt
::Mucking about with ice,
the window titlebars do listen to Mouse clicks. Maybe the functionality shown in the right click titlebar menu could be expanded. doubleclick maximizes, alt modifies, moves a window behind another. Repeat in front window brings the previous window back to front.if rox filer is the foreground window F1 brings up the help manual.
using
icesh sizeto 50% 100% left
icesh sizeto 50% 100% right
gives a changed cursor, click in a window it is moved and resized.All below work
resize WIDTH HEIGHTResize window to WIDTH by HEIGHT window units.
sizeto WIDTH HEIGHTResize window to WIDTH by HEIGHT pixels. If WIDTH or HEIGHT ends with a percent sign %, then they refer to a percentage of the desktop work area. For instance, sizeto 50% 100% resizes to half the desktop width and whatever height is available above or below the taskbar.
sizeby WIDTH HEIGHTResize window by WIDTH by HEIGHT pixels. If WIDTH or HEIGHT ends with a percent sign %, then they refer to a percentage of the current window size. For instance, sizeby 50% 200 increases the width by 50% and increases the height by 200 pixels.
move X Y
Move the selected window or windows to the screen position X Y. To specify X or Y values relative to the right side or bottom side precede the value with an extra minus sign, like in move -+10 –20.
moveby X YDisplace window by X Y pixels.
centerPosition the window in the center of the desktop work area.
leftPosition the window against the left side of the desktop work area.
rightPosition the window against the right side of the desktop work area.
topPosition the window against the top side of the desktop work area.
bottomPosition the window against the bottom side of the desktop work area.
icesh getGeometry gives changed cursor, click in a window to read geometry and position relative to screen size.
$ icesh setGeometry 1741×1146+363+16 gives the changed cursor click in a window it will set to given dimension and position. The dimensions can be used in icewm startup, example below. wmctrl switches workspaces. wmadjust sizes and positions sleep must be set to longer for slower machines or expect the script to malfunction. it allows each application to load before next step starts.
#!/bin/bash
wmctrl -s 3
libreoffice –norestore –writer &
sleep 3; wmadjust writer 3 1350 1155 0 0
wmctrl -s 2
libreoffice –norestore –calc &
sleep 3; wmadjust writer 2 1003 1180 908 0
### wait for writer and calc finish loading:
wmctrl -s 1 #Switches to workspace 1=2nd workspace
palemoon &
sleep 2
wmctrl -s 0 #Switches to workspace 0=1st workspace
claws-mail &I take no credit for script, point to Bobc and PPC, at the time this was setup I was ICEWM and antiX learning absolute noob.
- This reply was modified 1 year, 4 months ago by ModdIt.
- This reply was modified 1 year, 4 months ago by ModdIt.
December 16, 2021 at 12:20 am #73025ModeratorBobC
::The IceWM Dev’s understood what we are asking for, once I used the word “Tile”.
Now they want to know:
1. Do we want the configurable Title bar menu option where we create a script that runs like PPC has created?
2. A hard coded “Tile” option on the Title bar menu with Half Screen and Full Screen options like those I added temporarily to my main menu as proof of concept?I don’t want to answer for the distro myself, but am ok with either, so I’d like to know if anyone here can think of any major pros, cons or preferences not already thought of here, or if the antiX Devs have preferences or objections. I will say from my view, that it should be an efficient solution capable of running on the older hardware we support, without causing those people grief, and without adding packages, but I think either way should be able to meet that requirement.
PS: I also asked the IceWM Devs if they have a preference. It’s their package 🙂
- This reply was modified 1 year, 4 months ago by BobC.
December 16, 2021 at 8:33 am #73029MemberModdIt
::The right click menu already contains quite a few options, left or right to 50% of screen size seems pretty useful with wide monitors.
Personal opinion is prefer hard coded, less confusing for beginners.
For more advanced users all options are open, use icesh from terminal, icesh with bash alias,scripts. Toolbar buttons to set 50% left 50% right.
autostart where wanted at a given size.
Full screen is already in the right click titlebar menu, as maximize. Maybe 4 tile option for larger monitors ?.Maybe you could check against my experience
size and its keys alt F8 is not working for me should give a size option. Maybe off somewhere in options, shortcut seems to do nothing in ice.December 16, 2021 at 9:01 am #73030Member
blur13
::I completely agree with ModdIt. If hardcoded it’s also a feature for those using icewm on its own, without antiX.
December 16, 2021 at 9:36 am #73032MemberPPC
::Since it was my suggestion, I won’t give my opinion again, just state some pros and cons:
Hardcoded:
-Pros- it’s available in any OS that has IceWM running
-Cons- it can only be changed, have features added, etc, by the IceWM dev team…Configurable title bar:
-Pros- it may be easier to use- if a visual representation of where the window will be placed pops up (like I suggested… on the other side, the hardcoded option can show small icons that do exactly this…)
– We can costumize it to our hearts content..
-Cons- We’ll have to implement it ourselves;
– won’t be a generally available IceWM feature, just an antiX one.P.
December 16, 2021 at 1:23 pm #73047ModeratorBobC
::The IceWM Devs are asking what is better for localization?
I made some Icons for it…
Attachments:
-
AuthorPosts
- You must be logged in to reply to this topic.
