GithubHelp home page GithubHelp logo

guotsuan / awesome-revelation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bioe007/awesome-revelation

174.0 6.0 25.0 3.32 MB

Show all clients all screens in Awesome window manager

License: GNU Lesser General Public License v3.0

Lua 100.00%
awesome

awesome-revelation's Introduction

revelation.lua

Provides Mac OSX like 'Expose' view of all clients.

This is a fork from revelation It is modified from the original revelation.lua for incorporating with awesome 3.5 or later. It also have some features.

Now master branch works for both master and stable awesome WM

Changes since 2015-09-26

When all clients are exposing, you can zoom (Modkey + Shift + hintbox charater or right button of the mouse) or kill a client (middle button of the mouse) and the position of hintboxes will be updated accordingly.

Changes since 2014-02-19

  • Now the revlation is able to handle the special clients(float, fullscreen or maximized etc.)
  • When you select an minimized client, the revelation will un-minimized it and then focuse on it.
  • Added an option to change character ordering

Changes after 2013-12-30

  • Now it is possible, in revelation.init({...}), to change the default settings of revelation module.

  • Function revelation(...) now accept the parameter as a table {rule={...}, is_excluded=..., curr_tag_only=...}.

  1. To add specify rules revelation({rule={...},...}).
  2. To exclude the clients matched by the rules instead of including revelation({rule={...}, is_excluded=true}).
  3. {...,curr_tag_only=true} make the revelation only collect the client from current tags.

Changes from the original revelation

  • Support awesome 3.5 or later

  • Add the support of multiple screens. Now multiple 'Expose' views will be shown on the multiple screens at the same time.

  • The way of selecting and focusing the client was changed. The old way that is navigating clients by pressing the keys "j, h, k, l" and then selecting the client by pressing key "Enter" was deprecated. Now each client in the 'Expose' views come with a letter surrounding by a hint box, you can select the client by pressing the corresponding letter in the hint box. The idea and codes of this method was copied from the module hint.

  • Add zoom mode. Add the function of zooming the client by pressing the right button of the mouse.

  • The unwanted clients can be excluded by the parameter{rule={...}....}.

Screenshot

screenshot

Usage

Installation

(From user's awesome configuration directory, usually ~/.config/awesome)

  1. Clone the repository:

    git clone https://github.com/guotsuan/awesome-revelation revelation
    
  2. Include it at the top of your rc.lua file: local revelation=require("revelation")

  3. Important: Add revelation.init() after beautiful.init()

  4. Define a global keybinding (e. g. ModKey + e) for revelation in your rc.lua:

    globalkeys = awful.util.table.join(
    awful.key({ modkey,           }, "Left",   awful.tag.viewprev       ), 
    awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
    awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
    awful.key({ modkey,           }, "e",      revelation),
    awful.key({ modkey,           }, "j",
    function ()
        awful.client.focus.byidx( 1)
        if client.focus then client.focus:raise() end
    end),
    

    NOTE: Always double check the key binding syntax against the version of Awesome which you are using.

  5. Restart Awesome (usually Modkey + Control + r) and try the keybinding Modkey + e.

It should bring up all clients from the current tags on all screens and set the layout to fair. You can focus clients with the cursor keys, and then press the left button to select, or you can directly focus a client by pressing the corresponding key shown in the hint box. Press the right mouse button to zoom the client or Escape to abort.

Configuration

Revelation's configuration is done through the init() function

There are three basic settings, shown with default values:

-- The name of the tag created for the 'exposed' view
revelation.tag_name = 'Revelation'

-- A table of matcher functions (used in client filtering)
revelation.exact = awful.rules.match
revelation.any   = awful.rules.match_any

-- Character order for selecting clients
revelation.charorder = "jkluiopyhnmfdsatgvcewqzx1234567890",

The rule matching functions must conform to awful.rules.match prototypes.

For client matching rules, we follow the same syntax as awful.rules expects. If rule.any == true, then we call the config.match.any function.

to change the settings, use:

 revelation.init({tag_name = ..., match = {...}, charorder = ...})

Examples

All clients:

 awful.key({modkey}, "e", revelation)

To match all urxvt terminals:

 awful.key({modkey}, "e", function()
            revelation({rule={class="URxvt"}})
         end)

To match clients with class 'foo' or 'bar':

 awful.key({modkey}, "e", function()
            revelation({
                        rule{class={"foo", "bar"},
                        any=true}
                        })
        end)

To exclude the clients, we set:

 awful.key({modkey}, "e", function()
         revelation({rule={class="conky"}, is_excluded=true})
         end)

To set only collect clients from current tag

 awful.key({modkey}, "e", function()
             revelation({rule={class="conky"}, is_excluded=true, 
            curr_tag_only=true})
             end)

Credits

Maintenance

* Quan Guo <[email protected]>
* Perry Hargrave <[email protected]>

Contributions, many thanks!

* Daniel Hahler <[email protected]>
* Yauhen Kirylau
* Nikola Petrov <[email protected]>

Original authors

* Espen Wiborg <[email protected]>
* Julien Danjou <[email protected]>

(c) 20013-2014 Quan Guo
(c) 2009-12 Perry Hargrave
(c) 2008 Espen Wiborg, Julien Danjou

awesome-revelation's People

Contributors

actionless avatar barlik avatar blueyed avatar ckyrouac avatar fptje avatar guotsuan avatar jinleileiking avatar jmitchener avatar nikolavp avatar senorsmile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

awesome-revelation's Issues

awful.tag.history.restore attempts to display revelation tag after it has been deleted

In awesome v4.3, after using revelation (after selecting a client from it or escaping from it to cancel), running awful.tag.history.restore (Mod + Esc) will attempt to view only the revelation tag and will thus hide all tags. Tapping Mod + Esc again from this position will do nothing, and one must return to a tag via other means.

I think the behavior of awful.tag.history.restore immediately after exiting the revelation tag should be, if possible, to restore the tag that awful.tag.history.restore would have restored before revelation was run. If that's easier said than done, then awful.tag.history.restore should simply do nothing, rather than awkwardly rendering itself useless.

Totally open and grateful for a hack or workaround, either on the revelation side or some sort of wrap-around function for awful.tag.history.restore. Best regards

EDIT: This at least prevents me from accidentally hiding my tags as I use awful.tag.history.restore a lot without thinking (often just tapping it twice quickly is second nature):


    awful.key({ modkey, }, "Escape", function () 
            if tag_history_blocked == nil then awful.tag.history.restore() end 
    end, {description = "go back", group = "tag"}),

...

tag.connect_signal("property::selected", function(t) if t.name == revelation.tag_name then tag_history_blocked = true elseif not t.selected then tag_history_blocked = nil end end)

Triggers resize events for clients

Calling revelation triggers the resize event for clients, which makes e.g. Vim change its internal window layout (splits): because there is less space for the whole Vim window, the internal windows/splits get shrunken.
After picking a window via revelation, the original (internal) window/split layout isn't restored.

This affects any application which adjusts it's inner layout when being resized to something smaller, but does not restore it when it gets resized back to the original size.

It would be nice, if this could be avoided.

Weird behavior on multiple screens

Hi, thank you for this awesome plugin to awesome wm 🚀

Steps to reproduce:

  1. Have multiple screens (each with its tags)
  2. Call revelation
  3. Choose one client
  4. Weird behavior: all clients are attached to all tags.

Fails to start on awesome 3.5.6

When I put

local revelation = require("revelation")
local gears     = require("gears")
local awful     = require("awful")
awful.rules     = require("awful.rules")
                  require("awful.autofocus")
local wibox     = require("wibox")
local beautiful = require("beautiful")
local naughty   = require("naughty")
local drop      = require("scratchdrop")
local lain      = require("lain")
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua")
revelation.init()

so the require at the top and revelation init after beautiful init, I get an error on this line (44 in init.lua):

if type(awful.client.object.toggle_tag) == 'function' then

(Can't access object it is Nil).
When I comment out the the if and the first branch it works.
Version is 3.5.6 and lua.rc is based on copycat powerarrow-darker.

Clients in floating layout tag aren't restored

I'm using the master branch of Awesome and clients in a floating tag retain their positions from the Revelation view after either selecting a window or cancelling. Tiled clients and floating clients within tiled tags are correctly restored to their original positions.

awesome-revelation isn't working with awesome upstream

Hi,

Revelation isn't working with upstream awesome. The error message is:

Oops!, something is wrong in revelation.expose_callback!
.config/awesome/awesome-revelation/init.lua:250: attempt to index a nil value (field '?')

I'm using awesome v4.1-207-g24edeac4 (Technologic) (upstream from git).
Revelation is also from git upstream.

Revelation not working with 3.5.6 and master branch

Hey,

revelation is not working for me.
When calling revelation I get an error and nothing happens:

W: awesome: luaA_dofunction:78: error while running function
stack traceback:
    /home/max/.config/awesome/revelation/init.lua:230: in function 'revelation.restore'
    /home/max/.config/awesome/revelation/init.lua:193: in function 'revelation.expose'
    (...tail calls...)
    /usr/share/awesome/lib/awful/key.lua:42: in function </usr/share/awesome/lib/awful/key.lua:42>
error: /home/max/.config/awesome/revelation/init.lua:230: attempt to index a nil value (field '?')

bring all clients to current tag

Is it possible to bring all clients to current tag? I've already disabled zoom option and I wonder whether it is possible to disable additional tag ('Revision') which is created every time.

Persistent "Revelation" tag

Hi, I just cloned the project and found it great.

The only thing that bothered me was the fact that after choosing a client, the just created "Revelation" tag persisted on my wibox, which is somehow 'pollutant'. So I adapted it to delete this tag after choosing the client.

It should be important to be added to the project ?

Support zooming via keyboard, e.g. using Shift + hint key

Zooming appears to be possible with the mouse only.

It would be nice to have this available via keyboard, too.

You can use the following code in the keygrabber to detect if Shift is pressed:

awful.util.table.hasitem(mod, "Shift")

Empty letterboxes with awesome master

I've not investigated, but with awesome master I am seeing empty (grey) letterboxes, where the actual letters are missing.

Please let me know in case you cannot reproduce it, and I'll check further.

Error on awesome-3.5.3

W: awesome: a_glib_poll:239: Last main loop iteration took 0.548 this warning to that value.
W: awesome: luaA_dofunction:78: error while running function
stack traceback:
/home/foo/.config/awesome/revelation/init.lua:166: in function </home/foo/.config/awesome/revelation/init.lua:124>
(tail call): ?
/usr/share/awesome/lib/awful/key.lua:42: in function </usr/share/awesome/lib/awful/key.lua:42>
error: /home/foo/.config/awesome/revelation/init.lua:166: attempt to index field '?' (a nil value)

Any ideas?

Hints only mode

When I use the only-this-tag option for revelation, it is confusing that it changes the layout to a different one containing the exact same clients. This goes against the principle of least surprise. I suggest to make it fall back to hints-only behavior when called for only the current tag.

Handle errors better: restore always

In case of errors (e.g. #4), awesome-revelation does not restore the clients when it aborts, which results in a messed up state.

I think this could be fixed by wrapping the functionality, e.g. by using pcall and call the restore function always.

curr_tag_only + minimized clients

Hello,

Thanks for sharing this awesome tool :)

awesome v4.3-1647-ge6f5c7980-dirty (Too long)
 • Compiled against Lua 5.1.4 (running with LuaJIT 2.1.1702233742)
 • API level: 4
 • D-Bus support: yes
 • xcb-errors support: yes
 • execinfo support: yes
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
 • Transparency enabled: yes
 • Custom search paths: no

I'd like to use curr_tag_only and show minimized clients on the current tag. Default behavior only includes clients that are visible. I was able to include minimized clients by changing line 188:

From: match_clients(rule, awful.client.visible(scr), t[scr], is_excluded)
To: match_clients(rule, mouse.screen.selected_tag:clients(), t[scr], is_excluded)

I'm not sure mouse.screen.selected_tag:clients() is the best approach here, but it seems to work, mostly.

Issue:

When using 2 displays, clients that are minimized are not restored properly, ie, the client remains visible even when not selected. When using a single display everything works as expected.

I ran into #29 myself, the recommend fix, t[scr]:delete() works for the bug described in #29, but has no effect on this issue.

I've spent the good part of a day trying to figure this one out, pretty stumped at this point. If anyone has any ideas I am all ears!

Thanks for your time.

EDIT:

I may have figured it out. Trying to fix a hintbox bug. I'll close and post the solution when I know it works reliably.

Running revelation.init() and beautiful.init("path")

Init is never run in the source or specified to be run in the configuration portion of the readme.me for either beautiful or revelation.

This version will crash without running init. This I'm not sure how this extension would ever work without that step unless I'm missing something huge.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.