Author Topic: Aero style Window Snapping in Peppermint Three LXDE  (Read 3211 times)

0 Members and 1 Guest are viewing this topic.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Aero style Window Snapping in Peppermint Three LXDE
« on: September 27, 2012, 01:01:37 pm »
Should also work (with a little adjustment) in Lubuntu 11.10 and 12.04 .. or any distro based on Ubuntu 11.10 and 12.04 that uses the LXDE desktop environment.

I was asked on the Peppermint forum if it was possible to get the "Aero" style window snapping function in the LXDE desktop environment .. well it turns out you can ..
(without the weight of Compiz)

You'll have to switch to the xfwm4 (Xfce) window manager, get a patched version from a PPA, and install stiler (from the same PPA)

[EDIT]

I've ONLY tested this in Peppermint Three 32bit .. so there are no guarantees with Peppermint Three 64bit until someone confirms it .. that said, it shouldn't (if done correctly) break 64bit but snapping *may* not work, I'll change this edit if/when someone confirms it works in 64bit .. DO NOT attempt to do this in Peppermint One/Ice/Two, it won't work .. the PPA that you will be adding ONLY contains patched versions of xfwm4 for 11.10 and 12.04, so it will ONLY work in Peppermint THREE

[END EDIT]

OK, first a video show the snapping in action, and to check this is what you want:-


If that IS what you want .. follow these instructions:

First, add the PPA:
Code: [Select]
sudo add-apt-repository ppa:fossfreedom/xfwm4

Now update your package cache:
Code: [Select]
sudo apt-get update

Now install xfwm4, xfwm4-themes, and stiler:
Code: [Select]
sudo apt-get install xfwm4 xfwm4-themes stiler

Now we need to edit a couple of files so they show in the menus .. so run:
Code: [Select]
sudo gedit /usr/share/applications/xfce-wm-settings.desktop

When a file opens with a ton of stuff in it, make it read:-

Code: [Select]
[Desktop Entry]
Version=1.0
Type=Application
Name=xfwm4 Window Manager
Comment=Configure window behavior and shortcuts
Icon=xfwm4
Exec=xfwm4-settings %f
Categories=Settings;DesktopSettings;GTK;
StartupNotify=true
Terminal=false

SAVE the file, and exit gedit.

Now back in the terminal run:
Code: [Select]
sudo gedit /usr/share/applications/xfce-wmtweaks-settings.desktop

When a file opens with a ton of stuff in it, make it read:-

Code: [Select]
[Desktop Entry]
Version=1.0
Type=Application
Name=xfwm4 Window Manager Tweaks
Comment=Fine-tune window behaviour and effects
Icon=wmtweaks
Exec=xfwm4-tweaks-settings %f
Categories=Settings;DesktopSettings;GTK;
StartupNotify=true
Terminal=false

SAVE the file, and exit gedit.

OK, now go to:-
menu > Preferences > Desktop Session Settings
click the "Advanced Settings" tab
and change:-

Window Manager: openbox-peppermint
to
Window Manager: xfwm4

Click the "OK" button.

Log off, and on again (or reboot), to pick up the change.

You should now be using the xfwm4 window manager.

Go to:
menu > Preferences > xfwm4 Window Manager
then click the "Advanced" tab.

Tick both boxes under "Windows Snapping"

You're done :)



xfwm4 Windows Manager Tweaks also contains a "Compositor" tab .. compositing is disabled by default, but you can enable it if you wish .. then you get to plaay with things like drop shadows, and opacity :)
« Last Edit: March 14, 2013, 01:51:01 am by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline cpo

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Aero style Window Snapping in Peppermint Three LXDE
« Reply #1 on: November 22, 2012, 03:22:08 pm »
Hi, I followed your instructions on Peppermint 3 and I have successful results in regards to windows snapping, great, Thanks!

However, I've lost system keyboard shortcuts for terminal, file explorer, run dialog, and others.  Do you know how I can get them back, or configure them now?

Thanks in advance.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13816
  • Karma: 343
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Aero style Window Snapping in Peppermint Three LXDE
« Reply #2 on: November 22, 2012, 04:03:19 pm »
I noticed that too, and have been meaning to work out a fix .. the reason is the xfwm4 window manager uses a different config file for the keyboard shortcuts to openbox (as used in Peppermint).

openbox (in Peppermint) use - ~/.config/openbox/peppermint-rc.xml

xfwm4 appears to use - ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

Which appears to be kinda empty(ish) .. I'm not used to the xfce config syntax, so I need to bung something like Xubuntu in a VM and check the contents of its xfce4-keyboard-shortcuts.xml file for comparison.

Gimme a day or two and I'll see if I can come up with a fix.

[EDIT]

Install xbindkeys-config:
Code: [Select]
sudo apt-get install xbindkeys-config

then start it from the terminal:
Code: [Select]
xbindkeys-config

You can then configure your keyboard shortcuts in there.

Now open /etc/xdg/lxsession/Peppermint/autostart for editing:
Code: [Select]
sudo gedit /etc/xdg/lxsession/Peppermint/autostart

and add a single NEW line at the bottom that reads:-

@xbindkeys

SAVE the file, and exit gedit .. that will ensure the keybaord shortcuts work at bootup :)

--
« Last Edit: March 07, 2013, 08:34:07 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal