Commit Graph

2725 Commits

Author SHA1 Message Date
Simon Désaulniers ffead7dcda hotkeys_popup: keys for qutebrowser (#1829) 2017-06-11 00:10:42 +02:00
Emmanuel Lepage Vallée 7c44b05deb Merge pull request #1825 from psychon/magnifier-relayout
Re-arrange the magnifier layout on focus changes
2017-06-09 05:24:38 -04:00
Emmanuel Lepage Vallée 1a5d9d09fd wibar: Fix with width and height beautiful properties (#1826)
There was code that always set the values. The fallback was never
executed.

Fix #1824
2017-06-09 05:21:49 -04:00
Uli Schlachter 3bb8efd2db Re-arrange the magnifier layout on focus changes
Just re-arranging on every focus change would cause useless/needless
re-arranges (which have no effect except to waste CPU time). Thus, this
adds a special (undocumented) flag on layouts that makes sure that a
rearrange occurs when the focus changes.

Fixes: https://github.com/awesomeWM/awesome/issues/1799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-09 10:13:14 +02:00
Uli Schlachter 9b991fb40b awful.menu: DPIfy the default menu size
Related-to: https://github.com/awesomeWM/awesome/issues/1807
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:12:15 +02:00
Caleb Maclennan ffca875633 Add aweful.util.pread() so API docs have deprication notice (#1502)
* Add awful.util.pread() so API docs have deprication notice

* Update util.lua

* Update util.lua

* Update util.lua
2017-06-06 00:55:11 +02:00
Daniel Hahler 105638e920 client: update_implicitly_floating on manage (#1803)
Ref: https://github.com/awesomeWM/awesome/pull/1748#issuecomment-304010490
2017-06-01 21:27:53 +02:00
Uli Schlachter 801a1f0a89 Deprecate widget-drawing functions in gears.surface
This marks the functions gears.surface.widget_to_svg() and
gears.surface.widget_to_surface() as deprecated in awesome 5. This means
that by the time that awesome 6 becomes a thing, we can finally remove
these...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 6de6419180 Add functions to draw widgets to a cairo surface
These are supposed to eventually replace the already-existing functions
in gears.surface which have a similar signature

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter e7a1745b86 Fix Luacheck warnings (#1798)
This fixes warnings that were introduced with f22ef5014d /
https://github.com/awesomeWM/awesome/pull/1477.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 15:33:56 +02:00
Emmanuel Lepage Vallée 27c3b96a08 Merge pull request #1477 from Oblomov/dpifallback
Fall back to reported DPI if Xft.dpi is not present
2017-05-25 16:41:26 -04:00
Emmanuel Lepage Vallée caff37d867 Merge pull request #1791 from Elv13/impl_1508
beautiful: Save the theme path
2017-05-25 16:40:37 -04:00
Emmanuel Lepage Vallee ac8af66005 beautiful: Save the theme path
Fix #1508
2017-05-25 04:40:45 -04:00
Haochen Tong c1bcad5f5e parse_desktop_file: rtrim lines before parsing (#1677) 2017-05-25 01:22:13 +02:00
BuildTools 37d2654d5d client: emit ewmh geometry requests as signals 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 9bc46e4648 client: Honor the client maximization requests again
This implementes the FIXME added a few commits ago. A new
request::geometry handler turns client requests into normal
lua `c.maximized = true` property changes.
2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee b570e6d347 client: Add request::geometry for client maximization
This way the correct logic can be implented in Lua
2017-05-23 22:33:26 +02:00
Benoit de Chezelles be29ee6768 naughty: avoid notification flickering on replace (#1785)
Fixes https://github.com/awesomeWM/awesome/issues/1737.
2017-05-23 15:37:46 +02:00
Emmanuel Lepage Vallée b6e6a04895 Merge pull request #1776 from psychon/emit_property_floating
Always emit property::floating when needed
2017-05-16 13:57:51 -04:00
Daniel Hahler c9bfd934e7 beautiful.load_font: handle font height of 0 (#1782)
This might happen if no fonts are installed.  It now falls back to the
size from the font description.
2017-05-14 20:14:18 +02:00
Uli Schlachter 40e9393d94 awful.autofocus: Discriminate sticky clients (#1697)
A relatively common problem with awesome is with mixing sticky clients
and the focus history. Once a sticky client ever had the focus, it will
always get the focus after a tag switch. This is because the focus
history is global and the sticky client is always the most recently
focused and currently visible client in the list.

Work around this by discriminating sticky clients: First try to find a
client to focus, but ignore sticky clients. When this does not find
anything, try again, but this time also consider sticky clients.

(Basically the same issue exists with clients that are on multiple tags,
but I guess that one can be ignored.)

Fixes: https://github.com/awesomeWM/awesome/issues/733
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:32:28 +02:00
Uli Schlachter f22a69d54e Fix fullscreen clients with gravity != NorthWest (#1764)
Once upon a time, 4b9584fdb1 already fixed this problem: We have to
set the border width to zero before applying the new geometry to the
client, because changing the border width makes the client move
according to its gravity.

Then came e54387904b and made this code use awful.placement instead
of just fullscreening the client itself (without explaining why in the
commit message!). After this commit, the border width was just ignored
and left as-is. This was then fixed in 0bf8bb6a64 (no idea which
callback the commit message refers to, the old code was basically just
c.border_width=0, c:geometry(screen_geo)). However, now the border width
was again changed after the geometry and the bug that was fixed by
4b9584fdb1 was back.

This commit fixes this regression again by making sure that the border
width is set to zero before the geometry is set. This becomes slightly
more complicated, because now it is also awful.placement's job to
restore the old border width.

This is why this commit adds a new option to awful.placement so that it
sets the border width to zero after creating its memento of the old
border width.

Fixes: https://github.com/awesomeWM/awesome/issues/1607
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:31:14 +02:00
Daniel Hahler 9d1d5d5461 Merge pull request #1762 from psychon/fix-menubar-traversal
Fix menubar traversal
2017-05-13 23:27:13 +02:00
Quentin Minster 155c37e759 Fix single layout not appearing in the keyboardlayout widget (#1771)
Change indexing so that a keyboard map with a single group still gets
displayed in awful's keyboardlayout widget.

Signed-off-by: Quentin Minster <quentin@minster.io>
2017-05-13 23:25:09 +02:00
Emmanuel Lepage Vallee 0df1586f10 menu: Check if the client is still valid before accessing props
Fix #1777
2017-05-11 12:47:06 -04:00
Uli Schlachter e1bad41fc8 Always emit property::floating when needed
There are some cases where a client's floating state "silently" changes.
For example, a fullscreen client will be considered floating. However,
even though c.floating changes its value in this case, we did not emit
the property::floating signal.

Fix this by explicitly tracking the "implicitly floating" state. When
some property that influences this "implicitly floating" state changes,
we update it and if a client which was not explicitly assigned a
floating state observes a change in this value, property::floating is
emitted.

This was tested by running a terminal and two xeyes in a tag with a
tiling layout where awful.ewmh was patched so that clients do not change
their geometry when fullscreening or maximizing. It was observable that
after this patch e.g. the titlebar and the tasklist update to show the
floating state of the client which became implicitly floating due to
being maximized.

Fixes: https://github.com/awesomeWM/awesome/issues/1662
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-11 16:22:16 +02:00
Thomas G 5e431d2fb1 Update notification size in `naughty.replace_text` (#1756)
Fixes #1707
2017-05-07 18:01:35 +02:00
Uli Schlachter 0dbe8a344d menubar.utils: Fix for invalid utf8 file names
The previous commit made this code handle invalid directories correctly.
However, it was still possible that we come across invalid file names
for which :get_path() returns nil and then we assumed this was a file
name.

Fix this by silently ignoring such files.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-01 13:26:17 +02:00
Uli Schlachter f958b6a023 menubar.utils: Don't switch between path and GFile
Before this commit, the code always used GFile instances, then used
get_path() for a recursive call and turned the path into a GFile
instance again. This is not only inefficient, but also causes issues
with directories with invalid utf8, because the get_path function
returns nil in this case.

Fix this by keeping things as a GFile all the time.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-01 13:23:05 +02:00
Uli Schlachter 50cfa6c111 Run menubar.utils.parse_dir in protected context
Fixes: https://github.com/awesomeWM/awesome/issues/1761
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-01 13:19:19 +02:00
Emmanuel Lepage Vallee 74bb34ff00 wallpaper: Turn asserts into warning
Regression in v4.1. It causes the `rc.lua` (and the fallback) to
exit when the wallpaper is missing or something went wrong.

In <= 4.0, the wallpaper wasn't loaded, but Awesome didn't "crash".

There should be no asserts in the code called during the first
event loop iteration.
2017-04-24 03:10:03 -04:00
Matt ddf9689767 Add timezone option for textclock widget (#1743)
Adds a third parameter "timezone" to the textclock widget that is
optional. Defaults to local timezone if nil.

Signed-off-by: Matt Harrison <matt@harrison.us.com>
2017-04-21 16:34:23 +02:00
Tim Roes 993ffef666 Add the ignore_suspend flag to naughty (#1729)
Possible use-case could be a do-not-disturb mode where notifications
should be suspended, but some notifications triggered directly by
a user interaction (e.g. change of keyboard layout, etc.) should
still be shown.

Fixes: https://github.com/awesomeWM/awesome/issues/1728
2017-04-20 22:31:17 +02:00
Daniel Hahler 46f8ad4250 Merge pull request #1693 from getzze/new_widget
Improve doc for creating new widget
2017-04-19 00:26:55 +02:00
Daniel Hahler f533d0bfd8 doc: fix filesystem.make_parent_directories (#1739) 2017-04-18 15:40:57 +02:00
getzze 59662bc971 wibox.widget.base: do not call set_children if children is nil 2017-04-18 15:00:39 +02:00
Daniel Hahler e0eb0f14b3 Merge pull request #1699 from psychon/cache-dirs
Some fixes and changes to cache dirs
2017-04-18 14:40:22 +02:00
paul-axe d3e113f997 naughty: fix offset calculation for *_middle position (#1727) 2017-04-15 22:08:35 +02:00
Daniel Hahler a87387d9f3 doc fixes for awful.mouse.resize, awful.rules, awful.util (#1717) 2017-04-10 21:57:12 +02:00
Uli Schlachter 4d0c9eb86e Rename filesystem.mkdir to make_directories
The longer name is a bit more self-explanatory. The plural is meant to
indicate that this recursively creates missing parent directories and
does not just try to create the single given target directory.

Since filesystem.mkdir() is part of the v4.1 release, a deprecation stub
is needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:20:50 +02:00
Uli Schlachter 87e69e8677 Add a header to hotkeys_popup.keys.firefox to make LDoc happy
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:18:07 +02:00
Uli Schlachter f8678d39a4 Fix parameters docs in awful.hotkeys_popup.widget
This fixes broken API docs introduced in commit c183588ba1.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:15:03 +02:00
Uli Schlachter f1b78a6ff2 menubar: assert() that io.open() succeeds
Improves-the-error-for: https://github.com/awesomeWM/awesome/issues/1663
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:02:01 +02:00
Uli Schlachter 48c15e4dfb g.fs.get_cache_dir: Ensure the dir exists
This makes get_cache_dir() try to ensure the cache directory that it
returns exists.

Should-fix: https://github.com/awesomeWM/awesome/issues/1663
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:02:01 +02:00
Uli Schlachter 4bbedebea4 awful.prompt: Use g.filesystem.make_parent_dir()
The changes should not actually make a difference. If creating the
directory fails, the error will now be different, but that should be
about it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:02:01 +02:00
Uli Schlachter b4b070785f Add gears.filesystem.make_parent_dir(path)
Given a path, this function tries to recursively create parent
directories.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:02:01 +02:00
Uli Schlachter dc717af3ad gears.filesystem: Convert tabs to spaces
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 11:00:28 +02:00
axujen 8e70b71c9c Fix imagebox:set_image not returning anything
set_image should always return true or false according to the docs
2017-04-06 19:33:14 +01:00
Jonathan c183588ba1 Allow to add group rules to hotkeys_popup default instance 2017-04-03 17:49:50 +02:00
Emmanuel Lepage Vallée 63f78c29a4 Merge pull request #1688 from getzze/deprec_menubar
Remove deprecated function call
2017-04-02 21:45:06 -04:00