Commit Graph

1132 Commits

Author SHA1 Message Date
Daniel Hahler cb267e56d5 Merge pull request #637 from psychon/set_markup
Make wibox.widget.textbox:set_markup() throw Lua errors less often
2016-01-20 00:01:09 +01:00
Emmanuel Lepage Vallée 7ffb238ae8 Merge pull request #633 from Elv13/upstream_dynamic_p4
layout: Support layout with a constructor
2016-01-18 22:47:56 -05:00
Emmanuel Lepage Vallée 2736c75e43 Merge pull request #632 from Elv13/upstream_dynamic_p3
awful.layout: Split the layout parameters computation from 'arrange'
2016-01-18 22:46:59 -05:00
Emmanuel Lepage Vallee 67132e904d awful.layout: Split the layout parameters computation from 'arrange'
It is necessary to have it beforehand when creating layout objects
for unselected layouts.

In the current layout system, there is no layout object, but to allow
tabs and dynamic tagging features like ion3, layouts cannot be stateless.
2016-01-18 22:44:22 -05:00
Emmanuel Lepage Vallée 123c3d4114 Merge pull request #631 from Elv13/upstream_dynamic_p2
tag: Refactor awful.tag.setproperty to call setters
2016-01-18 22:41:15 -05:00
Emmanuel Lepage Vallée cbd366d1a1 Merge pull request #612 from Elv13/fix_awful.client_idx
awful.client.idx: Avoid error when called with a floating client
2016-01-18 17:39:43 -05:00
Emmanuel Lepage Vallee 81019487f0 awful.client.idx: Avoid error when called with a floating client
Before, it was the caller job to make sure the client wasn't floating.

This limitation is unecessary. awful.client.idx now return nil instead
of an error. awful.rules setting the master width factor are now
foolproof.
2016-01-18 17:35:33 -05:00
Emmanuel Lepage Vallée d202c1f1c2 Merge pull request #629 from Elv13/upstream_dynamic_p1
client: Add swapped, raised and lowered signals
2016-01-18 16:40:07 -05:00
Emmanuel Lepage Vallee cd0503f552 layout: Support layout with a constructor
This allow the most basic kind of stateful layouts to be created.
It is now possible to have layout instances instead of global
stateless layout arrange functions.
2016-01-18 02:12:19 -05:00
Emmanuel Lepage Vallee 55190646c4 client: Add swapped, raised and lowered signals
This allow layout "arrange" to be called less often and react on
the cause of the change itself rather than it's consequences
(usually, the "focus" signal).

Previously, the layout were re-arranged everytime the focus changed.
Now, with "raised" and "lowered", it require less "arrange".

"swapped" allow smarted layouts. Currently, swapped cause a full
re-arrange. It re-read the "index" list from scratch and create
a "new" layout. With "swapped", incremental layout changes are
possible.

Fixes https://github.com/awesomeWM/awesome/issues/616
2016-01-18 01:29:31 -05:00
Uli Schlachter 0a21931ffc awful.client.shape: Fix for API change in gears.surface
A nil-value is no longer simply passed through, so this has to do some "special
things" to work properly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 17:34:44 +01:00
Uli Schlachter b3ab06896d awful.widget.common: Follow :set_markup() API change
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-17 16:50:03 +01:00
Uli Schlachter 3793c339ce Merge branch 'surface-errors' of https://github.com/psychon/awesome 2016-01-17 16:01:03 +01:00
Uli Schlachter fd8d35cb12 Merge branch 'async-spawn-optional-callbacks' of https://github.com/actionless/awesome 2016-01-17 16:00:39 +01:00
Uli Schlachter 1aed092fea Merge branch 'util-getdir' of https://github.com/psychon/awesome 2016-01-17 15:59:54 +01:00
Emmanuel Lepage Vallee ab0e3b6112 tag: Refactor awful.tag.setproperty to call setters
*WARNING* This introduce a minor API break as awful.tag.setscreen
arguments are now swapped for consistency

This allow to introduce logic for each properties and improve
awful.tag.add and execute logic when setting properties.
2016-01-16 03:46:38 -05:00
Daniel Hahler 0d1c98a314 Merge pull request #618 from actionless/titlebar-optional-tooltips
feat(awful: titlebar): make tooltips optional
2016-01-15 21:36:30 +01:00
Uli Schlachter 4d562306d2 taglist: Remove dead code
The image "library" is long gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:43:56 +01:00
Uli Schlachter 86f2d05382 awful.menu: Remove useless surface() call
The imagebox calls surface() for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-15 18:43:10 +01:00
actionless f19b38d45b fix(awful: hotkeys): caching on multiscreen setup 2016-01-14 17:57:55 +01:00
actionless e74eb9775b feat(awful: titlebar): make tooltips optional 2016-01-06 17:09:55 +01:00
actionless 7546c236db feat(spawn, lib: awful: spawn: with_line_callback): make callbacks optional 2016-01-03 15:38:06 +01:00
Uli Schlachter 720cd879f3 Add timestamps to messages on stderr (#602)
Closes https://github.com/awesomeWM/awesome/pull/606.
Fixes https://github.com/awesomeWM/awesome/issues/602.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-31 15:38:17 +01:00
Uli Schlachter 5cbd4402d9 awful.autofocus: Handle sticky clients (#603)
Closes https://github.com/awesomeWM/awesome/pull/610.
Fixes https://github.com/awesomeWM/awesome/issues/603.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-31 15:33:51 +01:00
Daniel Hahler 9031a81396 doc fixes to awful.menu.clients 2015-12-12 20:12:08 +01:00
Dario Gjorgjevski c5ad6069d4 Add an optional filter to `awful.menu.clients` 2015-12-12 20:12:08 +01:00
Daniel Hahler 833b10eb9b Merge pull request #593 from psychon/editorconfig
Vim modelines and editorconfig
2015-12-12 19:13:53 +01:00
Daniel Hahler 69da6ee0db Merge pull request #576 from psychon/spawn_exit_code
At exit code support to spawn
2015-12-12 19:10:48 +01:00
Uli Schlachter 63653bed76 Add the right vim modeline to all lua files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:42:33 +01:00
Uli Schlachter 469433e10a awful.spawn.with_line_callback: Use an arguments table
Having many arguments can easily get confusing and hard to understand. This
commit uses a table instead so that we have names that identify what each
callback does.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-12 17:27:33 +01:00
Uli Schlachter 20c9723c5b awful.util: Add getters for themes and icon paths
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:24:30 +01:00
Uli Schlachter 8953218e5c Use get_cache_dir() instead of getdir("cache") everywhere
Just because I like that function more. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:16:26 +01:00
Uli Schlachter 5a34f6f047 Add various functions for getting directories
This adds functions for getting directories according to the XDG base dir
specification. This might be useful in general.

This also adds a function for getting the cache dir, because I like an explicit
function call more than something which "switches" based on a string argument.
Better error messages if you mis-type something. :-)

Finally, this adds a function for getting the directory containing the rc.lua
file. Sadly, awful.util.getdir("config") did not actually do that. See #218.

Fixes: https://github.com/awesomeWM/awesome/issues/218
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-12-11 18:14:41 +01:00
Barlik f6d08274a6 Use integer size when creating titlebar
Closes https://github.com/awesomeWM/awesome/pull/584.
2015-12-10 23:13:24 +01:00
ShadowKyogre 742cbd7122 Call :set_bg for the mouse finder's wibox
Before this, it was trying to assign it to `.bg`, which isn't how
backgrounds are stored on wiboxes.

Closes https://github.com/awesomeWM/awesome/pull/587.
2015-12-06 19:33:13 +01:00
actionless 0516203610 feat(lib: awful: hotkeys_popup): widget to show awesome and third-party keybindings
Closes https://github.com/awesomeWM/awesome/pull/421.
2015-12-02 01:02:15 +01:00
Uli Schlachter 44a3e27e81 awful.spawn.with_line_callback: Add exit callback
This adds support for the callback that was added in the previous commit to this
function. We can just pass on the function that the caller gives us.

Fixes: https://github.com/awesomeWM/awesome/issues/185
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-29 11:56:05 +01:00
Daniel Hahler 58bd21ad79 layout.arrange: fix screen arg in call to tag.getgap
Fixes https://github.com/awesomeWM/awesome/pull/568#issuecomment-158682756.
2015-11-22 00:30:21 +01:00
Daniel Hahler 269bb90e18 Only use useless_gap with multiple tiled clients
Fixes https://github.com/awesomeWM/awesome/issues/564.
Closes https://github.com/awesomeWM/awesome/pull/568.
2015-11-20 17:17:21 +01:00
Daniel Hahler c8e078b1bf doc: fix example with awful.prompt.run hooks
It should return `command` for it to be executed.
2015-11-19 22:14:01 +01:00
Uli Schlachter b7d398f339 awful.widget.tasklist: Use pairs instead of ipairs
This is a weak table whose entries might be removed by the garbage collector.
I'm not sure if this will every cause problems, but it's better to be prepared
for tables having "nil holes" (which would mean ipairs ignores some entries).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-19 20:13:37 +01:00
Uli Schlachter 7eed74b814 Fix multiple tasklists on the same screen (#563)
The code already tried to handle this correctly, but at some point it used the
wrong variable as the screen number...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-19 20:11:42 +01:00
Daniel Hahler ba0d8e38e5 awful.prompt.run: handle command return value from hooks 2015-11-08 12:33:00 +01:00
Daniel Hahler b3c7efd5e4 Add awful.widget.prompt.spawn_and_handle_error helper
This is meant to avoid boilerplate code when creating prompt hooks.
2015-11-08 12:32:53 +01:00
Emmanuel Lepage Vallee ce2d31cbde prompt: Add the ability to add new shortcuts to awful.prompt
Example:

awful.prompt.run({ prompt = "Run: ", hooks = {
    {{         },"Return",function(command)
         local result = awful.util.spawn(command)
         mypromptbox[mouse.screen].widget:set_text(type(result) == "string" and result or "")
         return true
    end},
    {{"Mod1"   },"Return",function(command)
         local result = awful.util.spawn(command,{sticky=true})
         mypromptbox[mouse.screen].widget:set_text(type(result) == "string" and result or "")
         return true
    end},
    {{"Shift"  },"Return",function(command)
         local result = awful.util.spawn(command,{ontop=true,floating=true})
         mypromptbox[mouse.screen].widget:set_text(type(result) == "string" and result or "")
         return true
    end}
    }
},...)
2015-11-08 12:31:36 +01:00
Daniel Hahler a410326ba6 Improve doc for awful.spawn: module/spawn/with_shell 2015-11-05 01:53:57 +01:00
Daniel Hahler 1222b5b5fd Merge pull request #535 from psychon/textbox_preferred_size
Add functions for querying a textbox's preferred size

Closes https://github.com/awesomeWM/awesome/pull/535.
2015-10-30 20:31:17 +01:00
Benjamin Petrenko 0a11cd0c4d Make client.movetotag emit request::activate on client
Closes https://github.com/awesomeWM/awesome/pull/439.
2015-10-26 23:09:08 +01:00
Daniel Hahler 872c321e81 Merge pull request #507 from psychon/closest_screen
Update the definition of "closest screen" to take into account that a
screen is a rectangle and not just the top-left corner.

Closes https://github.com/awesomeWM/awesome/pull/507.
2015-10-26 23:07:43 +01:00
Daniel Hahler 57e3927cbd Add awful.util.is_dir
Extracted from https://github.com/awesomeWM/awesome/pull/187.

Closes https://github.com/awesomeWM/awesome/pull/536.
2015-10-26 23:06:08 +01:00