Skip to content

Switch clients in Awesome WM with the familiar preview functionality

License

Notifications You must be signed in to change notification settings

berlam/awesome-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Alt-Tab Switcher

This plugin integrates the familiar Alt-Tab functionality in the awesome window manager.

Screenshot of awesome-switcher-preview

Features:

  • Live previews while alt-tabbing AND/OR Opacity effects for unselected clients
  • Easily adjustable settings
  • No previews when alt-tab is released within some time-frame
  • Backward cycle using shift
  • Intuitive order, respecting your client history
  • Includes minimized clients (in contrast to some of the default window-switching utilies)

Installation

First clone the repo into your $XDG_CONFIG_HOME/awesome directory:

    user@example:~$ cd $XDG_CONFIG_HOME/awesome
    user@example:~/.config/awesome$ git clone https://github.com/troglobit/awesome-switcher.git

Then and add the dependency to your Awesome rc.lua config file:

    local switcher = require("awesome-switcher")

Configuration

Optionally edit any subset of the following settings, the defaults are:

    switcher.settings.preview_box = true,                                 -- display preview-box
    switcher.settings.preview_box_bg = "#ddddddaa",                       -- background color
    switcher.settings.preview_box_border = "#22222200",                   -- border-color
    switcher.settings.preview_box_fps = 30,                               -- refresh framerate
    switcher.settings.preview_box_delay = 150,                            -- delay in ms
    switcher.settings.preview_box_title_font = {"sans","italic","normal"},-- the font for cairo
    switcher.settings.preview_box_title_font_size_factor = 0.8,           -- the font sizing factor
    switcher.settings.preview_box_title_color = {0,0,0,1},                -- the font color
    
    switcher.settings.client_opacity = false,                             -- opacity for unselected clients
    switcher.settings.client_opacity_value = 0.5,                         -- alpha-value

Then add key-bindings. On my particular system, and I guess most, Shift-Tab is captured by the keygrabber as a single key, namely ISO_LEFT_TAB. Therefore, this is what my keybindings look like:

    awful.key({ "Mod1",           }, "Tab",
      function ()
          switcher.switch( 1, "Alt_L", "Tab", "ISO_Left_Tab")
      end),
    
    awful.key({ "Mod1", "Shift"   }, "Tab",
      function ()
          switcher.switch(-1, "Alt_L", "Tab", "ISO_Left_Tab")
      end),

Credits

This plugin was created by Joren Heit and later improved upon by Mattias Berla.

License

ISC License, functionally equivalent to the simplified BSD and MIT licenses, with language removed deemed unnecessary by the Berne convention.

About

Switch clients in Awesome WM with the familiar preview functionality

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%