Resizing windows in linux

How can I make windows easier to resize in Xfce?

I’m using Xfce 4.10 with xfwm4 as my window manager. I’m finding it difficult to resize windows by grabbing the border. The region where the mouse cursor changes to the «resize window» cursor seems to be only 1 or 2 pixels wide, and I keep moving right through it. How can I make that region a bit wider? I don’t want to change the appearance of window borders, just make their hit target a bit wider. (I know about the Resize option in the window menu, but that doesn’t allow you to resize a window in only 1 dimension.) I’ve looked in the window manager settings & tweaks, but I don’t see any setting that appears to apply.

Question remains: How to change the width of the target zone near a window edge where the cursor will grab on to the edge?

7 Answers 7

It’s «very easy», you can use Alt + right-click + drag.

A technically correct answer which does not address the issue of the grab bar width. So we now have a GUI layout problem, because the window designer didn’t make the grab are large enough. Good GUI principals use a change in the cursor/mouse over text when passing over different active areas where mouse actions will over the grab bar to indicate a change, and discourage using modifier keys such as ALT. The preferred solution from the GUI point of view, show a changed cursor in the active area, is sufficient. Novice users need not know of or remember modifiers & alternate clicks.

Took me a while to learn that there are regions around the window to be considered when Alt + right-clicking. Also, you need to press long enough for the directional arrows of the resize to appear. Noob here.

Thank You!! Alt + right-click + drag to resize and Alt + left-click + drag to move the window is a big wow in my honest opinion! I’ve got «Minority Report» (the movie) feelings now!! This is cool!

I am using an XFCE guest in VirtualBox running on an XFCE host. If I use this method, it resizes the desktop (running on the host), not the window (running in the guest). There needs to be an alternative method that does not rely on global hotkeys.

Apparently this problem has been around for years, and one bug report has been closed «won’t fix». The issue has been reopened with Bug 11808 — Xfwm: Increase the resize border of window.

The width of the grab area is controlled by the theme. Another circumvention is to try different themes until you find one you can live with. One developer has commented:

That is coded in the theme itself AFAIK, at least that’s what we found out during MX-15 development. If you are using greybird (or bluebird) and a Debian-based distro, then you can take a look at our mx-greybird-themes package, where we expanded the border to 3 pixels after much tester feedback about how annoying it was to try to grab it. (We are about to update that BTW to include a Stretch version that fixes other appearance problems.)

Another post suggests something to change in the theme definition (and actually this file is not part of a definition, but the window manager), ~/.gtkrc-2.0

style "default-style" < GtkWindow::resize-grip-height = 4 GtkWindow::resize-grip-width = 4 >class "GtkWidget" style "default-style" 

gives me a smaller grip area. Increasing that number should give you a larger grip area. You will need to reload the theme for the setting to take effect.

I personally haven’t tried altering the theme definition, but this looks like a good starting point.

Читайте также:  Показать скрытые файлы linux mint

Edited to add:

Another approach involves installing and configuring Compiz (the base package may already be present in recent distributions). I repeat it as it’s part of a bug report and may get deleted as not «relevant» by the bug manager.

 tm.selsingen 2017-02-11 19:40:45 CET This may be a rough solution not suited for those needing xfwm4 because of limited system resources. But you can change the default window manager to compiz. This solved the issue for me and I can now enjoy the xcfe simplicity combined with generous grabbing areas. https://wiki.ubuntuusers.de/Compiz/ Enter in terminal: "sudo apt-get install compiz compiz-gnome compiz-plugins-extra" "sudo apt-get install compizconfig-settings-manager" "ccsm" _______________________ In CCSM you need to enable OpenGL, Composite, GNOME Compatibility in 'General' Tab. Within the 'General Options' menu, you can set the focus steal prevention to zero, so that new windows are placed always on top, and choose your workplaces In 'Effects', enable Fading Windows, Window decorations, and if you like Animations In 'Other', you can enable Window previews (may need png) In Tools enable Compiz Library Toolbox, D-Bus, Mousepolling (gets activated if you choose Window previews), Session Management and Workarounds Now in 'Window Management', you need to choose Application Switcher, Move Windows, Place Windows, Scale Windows Put and Window Rules. Ring, Static & Shift Switcher are more advanced Application Switchers you can configure as you like. In the CCSM Settings you need to enable Gsettings Configuration Backend. ________________________ Now Compiz is configured, make a Backup of "/home/user/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml" and enter "xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa compiz" in terminal to configure xcfe to use compiz as the default window manager. ________________________ To spare you from needing GNOME Tweak to set your theme now, you can use "gsettings set org.gnome.metacity theme insertyourthemehere" to change the window decoration theme and the default xcfe theme settings to change the rest of the UI. I experienced that my minimize/maximize Buttons were gone after that. you can use "gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close,'" to restore them. And that's it. Comment 15 tm.selsingen 2017-02-12 09:11:22 CET I don't know how to edit posts, but I realized the desktop icon texts get displaced if you follow the steps. This is the fix: xfconf-query -c xfce4-desktop -p /desktop-icons/center-text -n -t bool -s false 

Источник

5 ways to resize windows in Xubuntu or Xfce

Exploring the site of Xubuntu I have met this article where they show us 5 ways to resize windows in Xfce. The issue comes up due to the fact that greybird, it has very thin edges and for some users, it can be cumbersome to try to drag them to enlarge or reduce the windows.

The five methods

Method 1: Use the corner grip

Using the corner grip (a few small triangles usually at the bottom of the window). Before the version 12.04, Ubuntu had patched gtk2 to add these resize controls for all Applications. This would allow people to easily capture all the windows and resize them, even with the theme, with thin borders.

Читайте также:  Линукс путь до флешки

Image taken from Xubuntu.org

Unfortunately this patch has some regressions, for example when using this control in OpenOffice the File menu opens. From 12.04, the applications GTK2 you will have to use one of the resizing methods of other applications that do not have a built-in resize control. All the apps they use gtk3, they will have a size control in greybird (default Xubuntu theme).

Method 2: Alt + right mouse button + drag

This is perhaps the easiest and most useful way to resize windows. I’m tempted to say that once you get used to this, it’s hard to go back. Just hold down the Alt key, click somewhere inside the window, and drag to resize. It works well and funnily enough it’s a very nice addition to the easier way to move windows.

Method 3: Keyboard shortcut

xfwm4, the window manager of Xfce, has support for a number of keyboard shortcuts (which can be edited by going to Configuration Manager »Window Manager» Keyboard). One of them is to resize windows with the keyboard. Currently there is no keyboard shortcut configured by default, but a dialog can be set in the window manager.

Image taken from Xubuntu.org

You can resize the window either by moving the mouse (no need to click or drag), or use the arrow keys on the keyboard.

Method 4: Using the top corners of a window

While grip size control has been removed from gtk2 en Ubuntu, and it is not present in all applications, you can always resize windows by using the two upper corners with the mouse. In most xfwm4 themes the area of ​​the top corners is large enough to easily grab and drag with the mouse.

Image taken from Xubuntu.org

Method 5: Using the menu window

You can also initiate the same action as proposed in method 3 through the menu window. Access to the menu window works by clicking the button menu in the window, title bar (if your Xfwm4 theme has), or just click on the title bar. There is also a keyboard shortcut for accessing the menu window, but if you just want to resize the window, it’s easier to use the shortcut for that (again, see the Method 3).

Image taken from Xubuntu.org

The content of the article adheres to our principles of editorial ethics. To report an error click here.

Full path to article: From Linux » GNU / Linux » 5 ways to resize windows in Xubuntu or Xfce

Источник

Resizing a window to a set size in Linux

Anyone knows a good way to resize any window to for example 640×480? Reason is, of course, screencasting. Under windows I’ve used ZoneSize from donationcoder. (Btw: For Firefox it’s easy, just use the web developer toolbar.)

4 Answers 4

$ wmctrl -l 0x00c00003 -1 rgamble-desktop Bottom Expanded Edge Panel 0x00c00031 -1 rgamble-desktop Top Expanded Edge Panel 0x00e00022 -1 rgamble-desktop Desktop 0x0260007c 0 rgamble-desktop Google - Mozilla Firefox 

To resize a window based on its title:

wmctrl -r Firefox -e 0,0,0,640,480 

The arguments to the resize option are gravity,X,Y,width,height so this will place the window at the top-left corner of the screen and resize it to 640X480.

you can also specify the window with -r ‘:SELECT:’ . That way, you can point and click the window that you want to resize.

Using wmctrl, there is also some pre defined states:

Читайте также:  Linux разархивировать zip команда

If a window is currently in the state maximized , it won’t respond to a resizing in pixels using the -e parameter^. This is where the -b param is useful.

The -b option expects a list of comma separated parameters: «(remove|add|toggle),PROP1,PROP2]»

wmctrl -r Firefox -b toggle,maximized_horz 
wmctrl -r Firefox -b toggle,maximized_vert ----- --------------- remove modal add sticky toggle maximized_vert maximized_horz shaded skip_taskbar skip_pager hidden fullscreen above below 

About the precise question, the -e param allow resizing by values as follow:

Gravity, position X, position Y, window width, window height

// gravity,x,y,w,h wmctrl -r "Resizing" -e 0,0,0,640,480 

Источник

Resizing windows in i3 (without resize mode)

I am trying to set up my computer (running Crunchbang Linux Waldorf and i3) so that it is always, by default, configured so that pressing Ctrl + Shift and arrow keys resizes the window according to the direction of the arrows. The i3 user guide provides this example which I think is very close to what I want:

mode "resize" < # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym j resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt bindsym l resize shrink height 10 px or 10 ppt bindsym semicolon resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" ># Enter resize mode bindsym $mod+r mode "resize" 

But I want to build it in natively, without having to enter and exit resize modes. I just want to use arrow keys, not J , K , L and ; keys. Any thoughts on how I would do that?

2 Answers 2

Best solution that I have figured out myself:

Go to ~/.i3/config and open the file.

Paste following code at the end:

bindsym $mod+Ctrl+Right resize shrink width 1 px or 1 ppt bindsym $mod+Ctrl+Up resize grow height 1 px or 1 ppt bindsym $mod+Ctrl+Down resize shrink height 1 px or 1 ppt bindsym $mod+Ctrl+Left resize grow width 1 px or 1 ppt 

Save it and run i3-msg reload .

Base on the @Oposum’s solution, I added a «fast resize» :

# Resizing windows by 10 in i3 using keyboard only bindsym $mod+Ctrl+Shift+Right resize shrink width 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Up resize grow height 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Down resize shrink height 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Left resize grow width 10 px or 10 ppt 
# Resizing windows in i3 using keyboard only # https://unix.stackexchange.com/q/255344/150597 # Resizing by 1 bindsym $mod+Ctrl+Right resize shrink width 1 px or 1 ppt bindsym $mod+Ctrl+Up resize grow height 1 px or 1 ppt bindsym $mod+Ctrl+Down resize shrink height 1 px or 1 ppt bindsym $mod+Ctrl+Left resize grow width 1 px or 1 ppt # Resizing by 10 bindsym $mod+Ctrl+Shift+Right resize shrink width 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Up resize grow height 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Down resize shrink height 10 px or 10 ppt bindsym $mod+Ctrl+Shift+Left resize grow width 10 px or 10 ppt 

As @Oposum said : Save it and restart i3 ($mod+Shift+R).

Источник

Оцените статью
Adblock
detector