Author Topic: Fluxbox Aero Window Snapping [SOLVED]  (Read 876 times)

0 Members and 1 Guest are viewing this topic.

Offline hammy_283

  • Jr. Mitglied
  • **
  • Posts: 76
  • Branch: Stable
  • Desktop: Openbox
  • GPU Card: Integrated Intel® HD Graphics
  • GPU driver: Non-free
  • Kernel: 4.3.3-2-MANJARO x86_64
  • Skill: Intermediate
Fluxbox Aero Window Snapping [SOLVED]
« on: 20. December 2015, 22:59:33 »
So, I found this page which allows you to snap your windows in fluxbox http://www.microcreative.pl/blog/?p=369. It is in polish, so I had to use google translate. So, my problem is that when I use snap function, the window covers the taskbar. I want to adjust the snap to drop below the taskbar but I don't know how to do that with the script file. Does anybody know how?

Here is the script:
Code: [Select]
#!/bin/bash
# Simulate Aero-Snap (for one monitor).
#
# The xdpyinfo command which is used actually returns [width]x[height],
# but because of the division by 2 it only returns one value, which is
# half the width of the screen.

function snap()
{
    #get screen width and divide it by two
    HALFSCREEN=`xdpyinfo | grep dimension | awk '{ print $2 / 2 }'`
    case $1 in
        R)  #place window on right half of screen
            X=$HALFSCREEN
            W=$HALFSCREEN
            ;;
        L)   #place window on left half of screen
            X=0
            W=$HALFSCREEN
            ;;
        FST)    # toggle fullscreen
            wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz
            exit 1
            ;;
    Q) # remove all efects
       wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
       exit 1
       ;;   
        *)
            exit 1
            ;;
    esac

    wmctrl -r :ACTIVE: -e 0,$X,0,$W,-1
    wmctrl -r :ACTIVE: -b add,maximized_vert
}

snap $1
« Last Edit: 21. December 2015, 00:55:21 by hammy_283 »
“They’ve done studies, you know. 60 percent of the time, it works every time.”
— Brian Fantana (Anchorman)

Offline flippy

  • Vollwertiges Mitglied
  • ***
  • Posts: 207
  • AKA "day|flip" manjaro irc
  • Branch: Testing
  • Desktop: xmonad & bspwm
  • GPU Card: nVidia GeForce GTX 550 Ti
  • GPU driver: Nvida
  • Kernel: Got 64?
  • Skill: Intermediate
Re: Fluxbox Aero Window Snapping
« Reply #1 on: 20. December 2015, 23:05:24 »
Why used those when fluxbox can do that them self. Just need to be configure just right
https://forum.manjaro.org/index.php?topic=15978.msg150189#msg150189

Offline hammy_283

  • Jr. Mitglied
  • **
  • Posts: 76
  • Branch: Stable
  • Desktop: Openbox
  • GPU Card: Integrated Intel® HD Graphics
  • GPU driver: Non-free
  • Kernel: 4.3.3-2-MANJARO x86_64
  • Skill: Intermediate
Re: Fluxbox Aero Window Snapping [SOLVED]
« Reply #2 on: 21. December 2015, 00:53:47 »
So, I switched over and it works great. Thank you for the suggestion.
“They’ve done studies, you know. 60 percent of the time, it works every time.”
— Brian Fantana (Anchorman)