ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

Question: change the size of windows when moving them to the corners or the side of the screen #26

Closed arcolinuxz closed 2 years ago

arcolinuxz commented 4 years ago

Is it possible in icewm to move the window of thunar for example to the top left of the screen and then thunar will have 1/4 size of your screen.

Or to the middle left of the screen and then have the size of 1/2 of your screen.

Is this already built in? If not could you put it on the wishlist.

gijsbers commented 4 years ago

Yes this is certainly possible. One way is to man icewm and search for KeyWinArrange. KeyWinArrangeNW="Ctrl+Alt+KP_7" Moves the active window to the top left corner of the screen.

Or you can define your own window management keys with icesh. icesh -f move 0 0 sizeto 50% 50% will move the focused window to the top left corner and resize it to 50% by 50% of the available desktop area. This command you can bind in your ~/.icewm/keys file like:

key "Alt+Ctrl+l"        icesh -f move 0 0 sizeto 50% 50%

You can learn more about these commands under https://ice-wm.org/man/

arcolinuxz commented 4 years ago

I would like to use this option.

One way is to man icewm and search for KeyWinArrange. KeyWinArrangeNW="Ctrl+Alt+KP_7" Moves the active window to the top left corner of the screen

It does seem to work. I delete the '#' and restarted icewm. Tried it on laptop with seperate keyboard pad and on desktop. Keys are not responding.

Can you assist please?

gijsbers commented 4 years ago

Maybe you have some international keyboard? Can you start the xev program? If you type the key in its window it will show what it is. This may look like keysym 0xff95, KP_Home or like state 0x10, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,. Maybe you need to turn on or off the NumLock key?

arcolinuxz commented 4 years ago

I just installed xorg-xev on the system (laptop). Now I can move my windows to all positions. We were missing this package to send them to their positions.

I noticed the windows are not changed in size a corner is 1/4 a side is 1/2 center is full

Can we combine your keyboard shortcuts to also resize the windows?

arcolinuxz commented 4 years ago

Xorg-xev was installed on the desktop but the keys will not work there... Puzzled

gijsbers commented 4 years ago

@arcolinux Why don't you answer my questions? They are meant to help you.

gijsbers commented 4 years ago

Can you try this and attach the keyboard.pdf. You need to have xkbprint and ps2pdf.

xkbprint -color "${DISPLAY}" - |  ps2pdf - > keyboard.pdf
arcolinuxz commented 4 years ago

keyboard.pdf Thanks for getting back. This is my keyboard on my laptop. It was working at some point in time.

cheapy commented 3 years ago

Hi Eric, Look in antiX 19 full or base for wingrid. It comes in the wingrid-antix package and divides the screen into quadrants, and moves/resizes the active window to one or two quadrants based on the numeric keypad rose or other keys. I added Center, Grow and Shrink functions for antiX 19 but didn't write the original functions. Please also look at my ~/.icewm/keys file (comes with antiX 19) to see how it's controlled. This works in addition to WinArrange which is built into IceWM. Please also note that my laptop had troubles with WinArrange and I needed to reassign the default keys for them to work on my Dell laptops. This also worked under your ArcoLinux 19 when I cloned one of your other desktops into an IceWM desktop, and I do have the scripts and dotfiles for that if you would like help.

Here are the WinArrange override settings for my laptops from ~/.icewm/preferences If I recall correctly they are included in the defaults for antiX 19.

KeyWinArrangeN="Alt+Ctrl+KP_Up" # Up-Move window Top KeyWinArrangeNE="Alt+Ctrl+KP_Prior" # PgUp-Move window Top Right KeyWinArrangeE="Alt+Ctrl+KP_Right" # Right-Move window to Right KeyWinArrangeSE="Alt+Ctrl+KP_Next" # PgDn-Move window to Bottom Right KeyWinArrangeS="Alt+Ctrl+KP_Down" # Down-Move window to Bottom KeyWinArrangeSW="Alt+Ctrl+KP_End" # End-Move window to Bottom Left KeyWinArrangeW="Alt+Ctrl+KP_Left" # Left-Move window to Left KeyWinArrangeNW="Alt+Ctrl+KP_Home" # Home-Move window to Top Left KeyWinArrangeC="Alt+Ctrl+KP_Begin" # 5-Center window