• Stars
    star
    159
  • Rank 235,916 (Top 5 %)
  • Language
    Lua
  • Created over 10 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A window management module for AwesomeWM

Collision window navigation module for AwesomeWM

Warning: The master branch is for Awesome 4.0+, use the awesome3.5 branch for older versions of Awesome.

This module add some visual indicators for common window management operations. It is now easier to know the impact of a given command as a visual queue will be printed on the screen. Collision has 3 modes:

  • Focus: Move the focus from client to client
  • Move: Move a client
  • Resize: Change a client dimensions
  • Tag: Move to the previous/next tag

Installation

First, clone the repository

    mkdir -p ~/.config/awesome
    cd ~/.config/awesome
    git clone https://github.com/Elv13/collision

Now, open ~/.config/awesome/rc.lua (or copy /etc/xdg/awesome/rc.lua to ~/.config/awesome/rc.lua fist if you never modified your Awesome config before) and add this line somewhere in your rc.lua:

    require("collision")()

It is a very good idea to also change the default Mod4+arrow shortcut to something else:

    --Remove those lines:
    awful.key({ modkey,           }, "Left",   awful.tag.viewprev,
     {description = "view previous", group = "tag"}),
    awful.key({ modkey,           }, "Right",  awful.tag.viewnext,
     {description = "view next", group = "tag"}),

Your done!

Usage

Using Collision is easy. You just have to hit the arrow keys ( ) with some modifiers keys. The Shift key is usually used for grabbing something while the Control key is used to max out the effect.

Modifier 1 Modifier 2 Modifier 3 Effect
Mod4 Move the focus on the tiled layer
Mod4 Control Move the focus on the floating layer
Mod4 Shift Move a client in the tiled or floating layer
Mod4 Shift Control Move a floating client to the far side of that screen
Mod4 Mod1 (Alt) Increase a floating client size
Mod4 Mod1 (Alt) Shift Reduce a floating client size
Control Mod1 (Alt) Move to the next/previous tag
Control Mod4 Mod1 (Alt) Move to the next/previous screen
Control Mod4 Mod1 (Alt) + Shift Move tag to the next/previous screen

Using different keys

Due to the large ammount of keyboard shortcut Collision create, they are auto-generated automatically. While this make installation simpler, it also make Collision somewhat hard-coded magic. Some alternative keymaps can also be ackward to use because of the reliance on mod keys such as Alt and Control.

That being said, Collision allow some basic remapping. Instead of:

    require("collision")()

This can be used:

    require("collision") {
        --        Normal    Xephyr       Vim      G510
        up    = { "Up"    , "&"        , "k"   , "F15" },
        down  = { "Down"  , "KP_Enter" , "j"   , "F14" },
        left  = { "Left"  , "#"        , "h"   , "F13" },
        right = { "Right" , "\""       , "l"   , "F17" },
    }

Of course, if the Vim keys are used, any other shortcut binded to them have to be removed from rc.lua.

Appearance

Collision appearance can be changed in yout theme using the collision namespace

Focus

Variable Description
collision_resize_width The size of the resize handles
collision_resize_shape The gears.shape used for the resize handle
collision_resize_border_width The resize handles border width
collision_resize_border_color The resize handles border colors
collision_resize_padding The resize handles padding between the boder and arrow
collision_resize_bg The resize handles background color
collision_resize_fg The resize handles arrow color
collision_resize_arrow_border_color The arrow border color
collision_resize_arrow_border_width The arrow border width
collision_resize_size Enable the size widget when resizng
collision_resize_shape
collision_resize_size_border_width
collision_resize_size_border_color
collision_resize_size_font
collision_resize_size_shape
collision_resize_size_bg
collision_resize_size_fg
collision_focus_shape The outer shape of the "arrow" widgets
collision_focus_border_width
collision_focus_border_color
collision_focus_padding
collision_focus_bg The background of the focus change arrow
collision_focus_fg The foregroung filling color of the arrow
collision_focus_bg_center The focussed client circle background
collision_focus_shape_center The focused client widget shape (default: circle)
collision_focus_arrow_border_color The color of the arrow border
collision_focus_arrow_border_width The width of the arrow border
collision_screen_shape
collision_screen_border_width
collision_screen_border_color
collision_screen_padding
collision_screen_bg
collision_screen_fg
collision_screen_bg_focus
collision_screen_fg_focus

Settings

-- Swap clients across screen instead of adding them to the other tag
collision.settings.swap_across_screen = true

Other

The collision.select_screen(idx) function allow to select a screen and can be assigned to shortcuts.

The collision.highlight_cursor(timeout) method will highlight the current mouse cursor position.

Use collision.mouse.highlight() and collision.mouse.hide()

Notes

Using the focus arrows to select empty screens only work in Awesome 3.5.7+

More Repositories

1

radical

An extensible menu subsystem for Awesome WM
Lua
223
star
2

tyrannical

Dynamic tagging configuration system for awesomeWM
Lua
211
star
3

awesome-configs

My AwesomeWM configuration
Lua
126
star
4

blind

An pack of advanced themes for Awesome WM
Lua
39
star
5

repetitive

Repetitive tasks eradicator module for Awesome WM
Lua
29
star
6

reclaimail

Reproduce GMail server side processing locally using containers
Lua
24
star
7

luakit-config

My luakit config
Lua
10
star
8

Config_Files

My desktop and laptop config files, may be useful for some Gentoo/ZSH/Bash/KDE users. I have to warn that some of the optimizations used here are stupid, mostly broken and may slow down most applications. I sometime just wan't to try things ;)
Vim Script
9
star
9

urxvt-dbus

Enable URXVT to be controlled over dbus
Perl
7
star
10

wirefu

An usable DBus bindings for lua
Lua
7
star
11

libringqt

A model/view based library to use the GNU Ring.cx protocol in QML and QtWidgets applications
C++
6
star
12

forgotten

Registry (persistent variables storage) module for Lua scripts and Awesome WM
Lua
5
star
13

quickviews_presentation

A set of slides
HTML
3
star
14

Shorter

Display Awesome WM keyboard shortcuts on the desktop
Lua
3
star
15

awesome

Pull requests for Awesome WM
C
3
star
16

sflphone-kde

temporary home of SFLPhone KDE until it move to KDE servers
C++
3
star
17

retrograde

Port Awesome 3.4 widget syntax to 3.5+
Lua
3
star
18

Scripts

A bunch of bash script I use frequently
Shell
3
star
19

QBM

A quick boot and display manager
C
3
star
20

Kimberlite

WYSIWYG HTML editor for KDE
C++
3
star
21

Patched-Awesome

A patched version of Awesome with some bug fix and features
C
2
star
22

LuTe

An extensible terminal for Lua addicts
C++
2
star
23

ultiLayout

Dynamic layout for Awesome 3.4
Lua
2
star
24

rssstock

An RSS reader based on curl with many modes and small footprint
C++
2
star
25

SFL-Doombot

A GDB plugin to upload and manage crash backtraces automatically
Python
2
star
26

kdelibs_gsoc2010

A branch of KDElibs implementing idea part of my 2010 Google Summer of Code project
1
star
27

elv13.github.io

HTML
1
star
28

drawer

A bunch of pull-down panel for AwesomeWM
Lua
1
star
29

Electronic-binary-logic-tools

A set of tool for logic gate circuits
C++
1
star
30

lua_async_binding

Temporary repository for the new Awesome async API
C
1
star
31

Umbrello-ng

New UI for umbrello
C++
1
star
32

CroNG

Proof of concept of a cron daemon using D-Bus to tell it's status
C
1
star
33

Umbrello-ng2

An other fork of Umbrello, the old one is too old to be rebased proprely
C++
1
star
34

qml-experiments

QML experiment
C++
1
star
35

KliNG

A "revolution" in command line history, but mosly unmaintened. It have a lot of cool features, but take too much time to maintain.
C++
1
star